/* 颜色和字体从袜子本身来：藏青、燕麦、学院红，标题用宋体像吊牌和画册 */
@font-face { font-family: "SockSerif"; src: url(/serif-sc.woff2) format("woff2"); font-weight: 600; font-display: swap; }
:root {
  --paper: #f7f6f2; --surface: #fff; --oat: #ece7dd; --oat-2: #f4f1ea; --oat-3: #faf8f4;
  --ink: #1c2540; --ink-2: #2b3760; --sub: #5f6372; --mute: #9a9ca6; --line: #e7e4dd; --line-2: #d5d1c8;
  --red: #a8322d; --accent: var(--ink); --accent-soft: #eceef4; --bad: #b3261e; --ok: #2f6b3f;
  --bg: var(--paper); --radius: 14px; --side: 228px;
  --shadow-card: 0 1px 2px rgba(28, 37, 64, .05), 0 1px 1px rgba(28, 37, 64, .03);
  --shadow-pop: 0 2px 6px rgba(28, 37, 64, .06), 0 22px 48px -20px rgba(28, 37, 64, .32);
  --shadow-lift: 0 1px 2px rgba(28, 37, 64, .04), 0 16px 34px -18px rgba(28, 37, 64, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --serif: "SockSerif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 14px/1.6 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--oat); }

/* 外框：左边一条导航（像工作台），右边是页面 */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 14px 18px; background: var(--surface); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 8px; padding: 0 10px 18px; color: var(--ink); text-decoration: none; position: relative; }
/* 品牌下沿：像袜子罗口的藏青粗条 + 燕麦细线 + 学院红细线 */
.brand::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 5px; border-radius: 1px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 3px), linear-gradient(var(--ink) 0 3px, var(--oat) 3px 4px, var(--red) 4px 5px); }
.brand-mark { width: 24px; height: 24px; align-self: center; flex: none; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: .06em; white-space: nowrap; }
.brand small { font-size: 11px; color: var(--mute); letter-spacing: .04em; white-space: nowrap; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--sub); text-decoration: none; font-weight: 500; transition: color .18s var(--ease), background-color .18s var(--ease); }
#nav a svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#nav a:hover { color: var(--ink); background: var(--oat-3); }
#nav a.on { color: var(--ink); background: var(--oat-2); font-weight: 600; }
#nav a.on::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav-count { margin-left: auto; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; font-weight: 400; }
.nav-count:empty { display: none; }
.side-foot { margin-top: auto; padding: 0 12px; color: var(--mute); font-size: 12px; line-height: 1.7; }
main { padding: 32px 40px 64px; min-width: 0; }
.view { display: none; }
.view.on { display: block; }

/* 每页的标题区：大标题 + 一句说明，右边放这一页的主要操作 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.2; letter-spacing: .05em; margin: 0 0 6px; }
.page-head .hint { margin: 0; font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.toolbar .search { width: 260px; flex: none; margin-bottom: 8px; padding-left: 34px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9ca6' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E") no-repeat 11px center / 16px; }
/* 页签：下划线式，数字淡一点 */
.tabs .seg { flex-wrap: nowrap; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs .seg button { position: relative; border: 0; border-radius: 0; background: transparent; padding: 10px 10px 12px; font-size: 14px; color: var(--sub); }
.tabs .seg button:hover { background: transparent; color: var(--ink); }
.tabs .seg button.on { background: transparent; color: var(--ink); font-weight: 600; }
.tabs .seg button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--red); }
.tabs .seg .cnt { margin-left: 5px; font-size: 12px; color: var(--mute); font-weight: 400; font-variant-numeric: tabular-nums; }

.panel { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; border: 1px solid var(--line); }
.hint { color: var(--sub); font-size: 12px; }
h3 { font-size: 15px; margin: 22px 0 8px; color: var(--ink); font-weight: 600; letter-spacing: .01em; }
h3:first-child { margin-top: 0; }
label { display: block; font-size: 12px; color: var(--sub); margin: 12px 0 5px; font-weight: 500; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 11px; background: var(--surface); transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: #c4bfb4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28, 37, 64, .08); }
input::placeholder, textarea::placeholder { color: var(--mute); }
input[type=color] { padding: 1px; height: 32px; }
input[type=radio], input[type=checkbox] { width: auto; padding: 0; border: 0; accent-color: var(--ink); box-shadow: none; }
button { cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 7px 15px; font-size: 13.5px; line-height: 1.45; font-weight: 500; transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease); }
button:not([class]), button.primary, button.sm, button.ghost, button.danger, a.btn { white-space: nowrap; }
button:hover { border-color: var(--ink); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
button:disabled { cursor: default; opacity: .45; }
button.primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 1px 2px rgba(28, 37, 64, .2); }
button.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
button.sm { padding: 4px 11px; font-size: 12.5px; border-radius: 8px; }
button.ghost { border-color: transparent; background: transparent; color: var(--sub); box-shadow: none; }
button.ghost:hover { color: var(--ink); background: var(--oat-2); }
button.danger { color: var(--bad); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
/* 选项：圆角小胶囊，选中的是藏青底 */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { padding: 5px 13px; font-size: 13px; border-color: var(--line); border-radius: 999px; background: var(--surface); }
.seg button:hover { border-color: var(--line-2); background: var(--oat-3); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.yarn { display: flex; align-items: center; gap: 6px; }
.yarn i { flex: none; width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .15); }
.yarn select { flex: 1; min-width: 0; }
.list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lib-link { display: block; text-align: center; margin-bottom: 6px; }
.o-new { width: 100%; }

/* 素材库 */
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; }
.as-grid.pick { max-height: 60vh; overflow: auto; }
.as-card { display: flex; flex-direction: column; gap: 1px; padding: 0 0 13px; text-align: left; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); transition: border-color .2s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.as-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.as-card.off { opacity: .5; }
.as-card.as-up { border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; }
.as-card.as-up:hover { border-color: var(--ink); background: var(--surface); }
.as-card.as-up b { color: var(--accent); }
.as-card.as-up small { white-space: normal; }
.as-up .as-img { background: transparent; }
.as-plus { width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 26px; font-weight: 300; line-height: 48px; text-align: center; transition: transform .25s var(--ease); }
.as-up:hover .as-plus { transform: scale(1.06) rotate(90deg); }
.as-grid .sheet-wait { grid-column: span 3; }
.as-guide { margin: 0 0 18px; }
.as-card b, .as-card small { padding: 0 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-card b { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.as-card small { color: var(--sub); font-size: 12px; line-height: 1.55; }
.as-card small + small { color: var(--mute); }
.as-img { position: relative; aspect-ratio: 1; background: var(--oat-2); display: flex; align-items: center; justify-content: center; padding: 12px; margin-bottom: 11px; }
.as-img img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.as-ip { position: absolute; left: 8px; top: 8px; background: var(--bad); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.cut-row .as-ip { position: static; }
.as-ai { position: absolute; right: 8px; top: 8px; background: rgba(255, 255, 255, .92); color: var(--ink); border: 1px solid var(--line); font-size: 11px; padding: 0 8px; border-radius: 999px; letter-spacing: .02em; }
.td > label { display: block; margin: 12px 0 4px; color: var(--sub); font-size: 13px; }
.td .seg { flex-wrap: wrap; }
.td-base { display: flex; align-items: center; gap: 10px; }
.td-base img { width: 56px; height: 56px; object-fit: contain; background: #f6f4ef; border-radius: 8px; }
.td-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.td-out { margin-top: 10px; }
.td-ideas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.td-idea { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.td-idea b { display: block; }
.td-idea small { color: var(--sub); }
.td-idea p { margin: 4px 0 0; font-size: 13px; }
.as-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.as-big { background: #f6f4ef; border-radius: 10px; display: flex; align-items: center; justify-content: center; min-height: 320px; }
.as-big img { max-width: 100%; max-height: 60vh; }
.cut-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 14px; align-items: start; }
.cut-stage { position: relative; user-select: none; }
.cut-stage img { width: 100%; display: block; border-radius: 8px; max-height: 72vh; object-fit: contain; }
.cut-layer { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.cbox { position: absolute; border: 2px solid #ff3b30; background: rgba(255, 59, 48, .08); cursor: move; }
.cbox.on { border-color: var(--accent); background: rgba(28, 37, 64, .12); }
.cbox span { position: absolute; left: -2px; top: -18px; background: #ff3b30; color: #fff; font-size: 11px; padding: 0 5px; border-radius: 4px 4px 0 0; pointer-events: none; }
.cbox.on span { background: var(--accent); }
.cbox .grip { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: #fff; border: 2px solid currentColor; border-radius: 3px; cursor: nwse-resize; color: #ff3b30; }
.cut-side { max-height: 72vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.cut-row { display: grid; grid-template-columns: 22px 1fr 88px 70px auto; gap: 4px; align-items: center; padding: 4px; border-radius: 8px; }
.cut-row.on { background: var(--accent-soft); }
.cut-row b { color: #ff3b30; font-size: 12px; text-align: center; }
.cut-row input, .cut-row select { padding: 3px 6px; font-size: 12px; }
.trim-asset { display: flex; align-items: center; gap: 8px; background: #faf8f4; border-radius: 8px; padding: 4px 8px; }
.trim-asset img { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 4px; }

/* 款式库 */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.home-recent .lib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-recent .lib-thumbs { height: 200px; }
.lib-grid.styles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.lib-card { display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-card); overflow: hidden; text-decoration: none; color: var(--ink); transition: border-color .2s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.lib-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.lib-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 232px; padding: 16px 12px 8px; background: var(--oat-2); }
.lib-thumbs img { width: 100%; height: 100%; object-fit: contain; min-height: 0; mix-blend-mode: multiply; transform: scale(1.3); transform-origin: 55% 88%; }
.lib-thumbs.empty { display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: 12px; background: #faf8f4; }
.lib-one { position: relative; height: 220px; padding: 12px; display: flex; align-items: center; justify-content: center; background: var(--oat-2); }
.lib-one > img:not(.lib-photo) { mix-blend-mode: multiply; }
.lib-one img.lib-photo { position: absolute; right: 6px; bottom: 6px; width: 64px; height: 96px; object-fit: cover; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.lib-one img { width: 100%; height: 100%; object-fit: contain; }
.lib-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #faf8f4; border-radius: 6px; color: var(--sub); font-size: 11px; }
.lib-info { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line); }
.lib-info b { font-size: 15px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-info small { color: var(--sub); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-info button { align-self: flex-start; padding: 0; margin-top: 2px; }

/* 开款 */
.list { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow: auto; }
.list .item, .listpop .item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; border-radius: 8px; padding: 6px 8px; margin: 2px 0; background: transparent; }
.list .item:hover, .listpop .item:hover { background: var(--bg); }
.list .item.on, .listpop .item.on { background: var(--accent-soft); }
.list .item i, .listpop .item i { flex: none; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .12); }
.list .item small, .listpop .item small { color: var(--sub); display: block; font-size: 11px; }
.dtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 16px; flex-wrap: wrap; }
.dtop-l, .dtop-r { display: flex; align-items: center; gap: 8px; }
.dtop .state { color: var(--sub); font-size: 12px; min-width: 110px; text-align: right; }
.dtop button:disabled { opacity: .4; cursor: default; border-color: var(--line-2); }
#dMine { font-weight: 600; color: var(--ink); }
.dname { width: 280px; font-size: 17px; font-weight: 600; border-color: transparent; background: transparent; }
.dname:hover, .dname:focus { border-color: var(--line-2); background: #fff; }
.mine-wrap { position: relative; }
.listpop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 300px; max-height: 70vh; overflow: auto; background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 10px 40px rgba(20, 20, 40, .22); }
#dQ { margin-bottom: 6px; }
.design2 { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.stage { position: sticky; top: 24px; padding: 14px 16px; }
.pane-head { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 6px; }
.pane-head .hint { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.pane-tools input { flex: 1; min-width: 0; }
.pane-tools button { flex: none; }
.listpop .item .ithumb { flex: none; width: 30px; height: 45px; object-fit: contain; background: #fff; border-radius: 4px; border: 1px solid var(--line); }
.big-shot { width: min(100%, 560px); height: auto; }
.shot.on { border-color: var(--accent); }
.ai-go { width: 100%; padding: 12px; font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.ai-find { width: 100%; padding: 9px; font-size: 14px; font-weight: 600; margin: -4px 0 12px; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.trend-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; width: 1080px; max-width: 100%; }
.trend-head .th-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.trend-head select { width: 220px; flex: none; }
.trend-head button, .trend-head a.btn { flex: none; }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; width: 1080px; max-width: 100%; }
.tk { background: #fff; border-radius: var(--radius); border: 2px solid transparent; box-shadow: 0 1px 2px rgba(20, 20, 40, .06); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.tk:hover { border-color: var(--line-2); }
.tk.on { border-color: var(--accent); box-shadow: 0 2px 14px rgba(28, 37, 64, .16); }
.tk-imgs { position: relative; display: grid; gap: 2px; height: 190px; background: #f4f2ee; cursor: zoom-in; }
.tk-imgs img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.tk-imgs.n2 { grid-template-columns: 1fr 1fr; }
.tk-imgs.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.tk-imgs.n3 img:first-child { grid-row: 1 / 3; }
.tk-more { position: absolute; right: 6px; bottom: 6px; background: rgba(30, 33, 48, .75); color: #fff; font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.tk-shots { display: grid; gap: 2px; height: 150px; background: #f4f2ee; cursor: zoom-in; }
.tk-shots img { width: 100%; height: 150px; object-fit: cover; object-position: center 20%; display: block; }
.tk-band { display: flex; height: 64px; }
.tk-band i { flex: 1; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
.tk-band small { font-size: 10px; color: rgba(0, 0, 0, .55); background: rgba(255, 255, 255, .6); padding: 0 4px; border-radius: 3px; white-space: nowrap; }
.tk-why, .tk-idea { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-shop { margin: 0; font-size: 12px; color: var(--bad); }
.tk-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.tk-src { margin-top: auto; }
.tk-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tk-title b { font-size: 15px; }
.tk-tag { font-size: 11px; padding: 0 7px; border-radius: 999px; background: var(--bg); color: var(--sub); }
.tk-tag.next { background: #e9f5ec; color: var(--ok); }
.tk-tag.hot { background: #fdecea; color: var(--bad); }
.hot-box { width: 1080px; max-width: 100%; margin-bottom: 12px; }
.hot-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.hot-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.hot-it { flex: none; width: 128px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); font-size: 12px; }
.hot-it img { width: 128px; height: 128px; object-fit: cover; border-radius: 8px; background: #f4f2ee; }
.hot-it b { color: var(--bad); font-size: 13px; }
.hot-it small { color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot-it span { color: var(--sub); font-size: 11px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tb-steps { margin: 4px 0 6px; padding-left: 18px; }
.tb-steps li { margin: 2px 0; }
.tb-btns { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.hint.ok { color: var(--ok); }
.tk-check { margin-left: auto; font-size: 12px; color: var(--sub); border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; }
.tk.on .tk-check { background: var(--accent); color: #fff; border-color: var(--accent); }
.tk-why { margin: 0; font-size: 12px; color: var(--sub); }
.tk-els { display: flex; flex-wrap: wrap; gap: 4px; }
.tk-el { font-size: 12px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.tk-el.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tk-pal { display: flex; gap: 4px; align-items: center; }
.tk-pal i { flex: none; width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .1); }
.tk-pal small { color: var(--sub); font-size: 11px; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-idea { margin: 0; font-size: 12px; background: #faf8f4; border-radius: 6px; padding: 6px 8px; }
.tk-src { font-size: 11px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 2px 8px; }
.tk-src a { color: var(--sub); }
.pick-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--accent); border-radius: var(--radius); padding: 10px 16px; margin-top: 12px; width: 1080px; max-width: 100%; box-shadow: 0 6px 24px rgba(20, 20, 40, .18); }
.pick-bar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-bar small { color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inspo-box { background: var(--accent-soft); border-radius: 10px; padding: 2px 12px 10px; margin-bottom: 4px; }
.inspo-it { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 4px; }
.inspo-it span { color: var(--sub); font-size: 12px; }
.inspo-it .pal { display: flex; gap: 2px; margin-left: auto; flex: none; }
.inspo-it .pal i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .1); }
.tk-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tk-gallery figure { margin: 0; }
.tk-gallery img { width: 100%; height: 220px; object-fit: cover; border-radius: 8px; display: block; background: #f4f2ee; }
.tk-gallery figcaption { font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-gallery figcaption a { color: var(--sub); }
.batch-bar { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: var(--radius); padding: 10px 16px; margin-bottom: 10px; width: 1080px; max-width: 100%; box-shadow: 0 1px 2px rgba(20, 20, 40, .06); }
.batch-bar.bad { color: var(--bad); }
.batch-bar .spin { width: 16px; height: 16px; border-width: 2px; margin: 0; }
.sheet-wait { background: #fff; border-radius: var(--radius); width: 1080px; max-width: 100%; min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px; text-align: center; color: var(--sub); }
.sheet-wait b { font-size: 18px; color: var(--ink); }
.sheet-wait span { max-width: 520px; }
.sfig { position: relative; }
.fig-wait { height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--sub); font-size: 12px; }
.fig-busy { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; background: rgba(30, 33, 48, .82); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.fig-busy .spin { width: 12px; height: 12px; border-width: 2px; margin: 0; border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }
.fig-plan { margin: 4px 6px 0; display: flex; align-items: center; gap: 4px; background: #fff7e6; border: 1px solid #f3c77a; color: #8a5a00; padding: 3px 4px 3px 10px; border-radius: 8px; font-size: 12px; line-height: 1.4; }
.fig-plan span { flex: 1; min-width: 0; }
.fig-plan button { flex: none; border: 0; background: transparent; color: #8a5a00; padding: 0 6px; font-size: 14px; line-height: 1; }
.sfig.planned img { outline: 2px dashed #f3c77a; outline-offset: -2px; border-radius: 6px; }
.queue-bar { position: sticky; top: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; background: #fbf4e6; border: 1px solid #efdcb6; border-left: 3px solid #c8902c; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; width: 1080px; max-width: 100%; box-shadow: var(--shadow-lift); }
.queue-bar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.queue-bar small { color: #8a5a00; }
.role-tag { display: inline-block; font-size: 11px; color: var(--ink); background: var(--oat-2); border-radius: 999px; padding: 0 8px; margin-right: 6px; }
.fig-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2px; margin-top: 6px; }
.fig-tools button, .fig-tools .btn { border: 0; background: transparent; box-shadow: none; padding: 3px 6px; font-size: 12px; border-radius: 6px; color: var(--sub); }
.fig-tools button:hover:not(:disabled), .fig-tools .btn:hover { background: var(--oat-2); color: var(--ink); border: 0; }
.fig-tools button.on { background: var(--oat-2); color: var(--red); font-weight: 600; }
.photos4 { margin-top: 10px; align-items: stretch; }
.p4-label { font-size: 12px; color: #333; text-align: right; padding: 6px 6px 0 0; }
.pcell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 330px; margin: 0 6px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #f6f4ef; cursor: zoom-in; color: var(--sub); font-size: 12px; }
.pcell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcell.empty { cursor: default; border: 1px dashed #d9d5cc; background: transparent; }
.pcell.queued { border-color: #f3c77a; background: #fff7e6; color: #8a5a00; }
.pcell.wait { cursor: default; }
.pcell .pold, .pcell .pq { position: absolute; left: 6px; right: 6px; bottom: 6px; background: rgba(30, 33, 48, .78); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 6px; text-align: center; }
.pcell .pq { top: 6px; bottom: auto; background: #f3c77a; color: #5c3b00; }
.details4 { margin-top: 10px; align-items: start; }
.details4 .pcell { height: 120px; }
.dcells { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 6px; }
.dcell { position: relative; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #f6f4ef; cursor: zoom-in; aspect-ratio: 1; }
.socks4 .dcell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dcell span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(30, 33, 48, .62); color: #fff; font-size: 10px; padding: 1px 4px; text-align: center; }
.dcells .pold { grid-column: 1 / -1; font-size: 11px; color: var(--bad); }
img.zoomable { cursor: zoom-in; }
.zv { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: rgba(18, 20, 28, .94); }
.zv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: #fff; }
.zv-bar .hint { color: #aab; margin: 0; }
.zv-stage { flex: 1; overflow: hidden; display: flex; align-items: center; justify-content: center; user-select: none; }
.zv-stage img { max-width: 96%; max-height: 100%; transform-origin: center center; background: #fff; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.photo-pair figure { margin: 0; text-align: center; }
.photo-pair img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 8px; background: #fff; }
.photo-pair figcaption { font-size: 12px; color: var(--sub); margin-top: 4px; }
.tips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hero { width: 100%; height: calc(100vh - 250px); min-height: 460px; border-radius: 12px; background: var(--oat-3); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-img { padding: 0; border: 0; background: transparent; width: 100%; height: 100%; cursor: zoom-in; position: relative; }
.hero-img:hover { border: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .3s; }
.hero-img.stale img { opacity: .5; }
.hero-badge { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: rgba(30, 33, 48, .86); color: #fff; padding: 7px 14px; border-radius: 999px; font-size: 13px; }
.hero-badge .spin { width: 14px; height: 14px; border-width: 2px; margin: 0; border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }
.plan-box { text-align: center; }
.plan-box canvas { width: min(100%, 720px); height: auto; }
.hero-wait, .hero-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px; text-align: center; color: var(--sub); max-width: 300px; }
.hero-wait b, .hero-empty b { color: var(--ink); font-size: 15px; }
#dHeroState.warn { color: #b0651c; font-weight: 600; }
.shots { margin-top: 8px; }
.shots:empty { display: none; }
.shots-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.shots-head .hint { margin: 0; }
.shots-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.shot { flex: none; width: 132px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.shot img { width: 122px; height: 183px; object-fit: cover; border-radius: 6px; background: #f5f4f1; }
.shot small { color: var(--sub); font-size: 11px; }
.shot.pending { height: 213px; justify-content: center; border: 1px dashed #cfccc4; color: var(--sub); font-size: 12px; text-align: center; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin-bottom: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.shot-cmp { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; align-items: start; }
.shot-cmp figure { margin: 0; text-align: center; }
.shot-cmp img { width: 100%; border-radius: 8px; background: #f7f6f3; }
.shot-cmp figcaption { font-size: 12px; color: var(--sub); margin-top: 4px; }
a.btn { display: inline-block; text-decoration: none; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 14px; color: var(--ink); background: var(--surface); font-weight: 500; transition: border-color .18s var(--ease), background-color .18s var(--ease); }
a.btn:hover { border-color: var(--ink); }
a.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
a.btn.primary:hover { background: var(--ink-2); }
.rows-box { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.rows-box summary { cursor: pointer; font-size: 12px; color: var(--sub); }
.rows-box #dRows { margin-top: 6px; }
.steps { padding: 6px 0; max-height: calc(100vh - 48px); overflow: auto; position: sticky; top: 24px; }
.step { border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; user-select: none; }
.step summary::-webkit-details-marker { display: none; }
.step summary::after { content: '▾'; margin-left: 6px; color: var(--sub); transition: transform .15s; }
.step:not([open]) summary::after { transform: rotate(-90deg); }
.step summary:hover { background: var(--oat-3); }
.step .num { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; display: grid; place-items: center; }
.step .st { font-weight: 600; }
.step .ss { margin-left: auto; color: var(--sub); font-size: 12px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-body { padding: 0 18px 18px; }
.step-body > label:first-child, .step-body > .grid2:first-child label { margin-top: 0; }
.step-body .sub { border-left: 3px solid var(--accent-soft); padding-left: 10px; margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.btnrow { display: flex; gap: 8px; margin-top: 12px; }
.empty-steps { padding: 30px 16px; text-align: center; color: var(--sub); }
.ptiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ptile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; font-size: 12px; border-radius: 10px; }
.ptile .picon { width: 40px; height: 40px; border-radius: 8px; }
.ptile.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.ypick { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 4px 8px 4px 4px; }
.ypick i { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .14); box-shadow: inset 0 0 0 2px #fff; }
.ypick span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ypop { position: absolute; z-index: 60; width: 280px; background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 10px 40px rgba(20, 20, 40, .25); }
.ygrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.ysw { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .14); }
.ysw:hover { transform: scale(1.12); }
.ysw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.ysame { width: 100%; margin-bottom: 8px; font-size: 12px; }
.ysame.on { border-color: var(--accent); background: var(--accent-soft); }
.ytip { margin-top: 8px; font-size: 12px; color: var(--sub); text-align: center; min-height: 18px; }
.seqrow, .trimrow { display: grid; gap: 6px; align-items: center; margin: 4px 0; }
.seqrow { grid-template-columns: 64px 1fr 28px; }
.trimrow { grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 8px; padding: 8px; position: relative; }
.trimrow .del { position: absolute; top: 4px; right: 4px; }
@media (max-width: 1100px) { .design2 { grid-template-columns: 1fr; } .stage, .steps { position: static; max-height: none; } }

/* 下单表每款下面的纱线行 */
.yrows { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.yrows th { width: 54px; color: var(--sub); font-weight: normal; text-align: right; padding: 3px 8px 3px 0; vertical-align: top; }
.yrows td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.yi { display: flex; align-items: center; gap: 5px; line-height: 1.6; }
.yi i { flex: none; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .15); }

/* 下单表 */
.orders { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; justify-items: center; }
.orders .sheet-wrap { width: 1080px; max-width: 100%; }
.sheet-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; background: var(--surface); border: 1px solid var(--line); color: var(--sub); border-radius: 12px; padding: 10px 16px; margin-bottom: 16px; font-size: 13px; }
.sheet-guide b { color: var(--ink); font-weight: 600; }
.sheet-guide span { display: inline-flex; align-items: center; gap: 6px; }
.sheet-guide i { font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--oat-2); color: var(--ink); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* 首页：袜子是门面——最近一组站在燕麦台面上，三个出款入口各配一双出过的袜子局部 */
.home { max-width: 1180px; margin: 0 auto; }
.hero2 { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; margin: 0 0 36px; }
.hero2 h1 { font-family: var(--serif); font-weight: 600; font-size: 46px; line-height: 1.16; letter-spacing: .02em; margin: 0 0 16px; text-wrap: balance; }
.hero2 p { color: var(--sub); font-size: 15px; line-height: 1.75; max-width: 28em; margin: 0; }
.shelf { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; gap: 8px; height: 360px; padding: 28px 32px 0; border-radius: 24px; background: var(--oat); overflow: hidden; text-decoration: none; }
/* 设计稿四周白边多，放大 1.45 倍只裁掉白边，袜子站满台面 */
.shelf img { width: 100%; height: 300px; object-fit: contain; object-position: bottom; mix-blend-mode: multiply; transform: scale(1.45); transform-origin: 55% 92%; transition: transform .5s var(--ease); }
.shelf:hover img { transform: scale(1.45) translateY(-5px); }
.shelf:hover img:nth-child(2) { transition-delay: .04s; }
.shelf:hover img:nth-child(3) { transition-delay: .08s; }
.shelf:hover img:nth-child(4) { transition-delay: .12s; }
.shelf-cap { position: absolute; left: 22px; top: 18px; font-size: 12px; color: var(--sub); }
.shelf-cap b { color: var(--ink); font-weight: 600; margin-left: 6px; }
.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.entry { display: flex; flex-direction: column; padding: 0; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-card); overflow: hidden; transition: border-color .2s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease); }
.entry:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.entry:active:not(:disabled) { transform: translateY(-1px); }
.entry-img { display: block; width: 100%; height: 220px; object-fit: cover; object-position: 68% 50%; background: var(--oat-2); transition: transform .6s var(--ease); }
.entry:hover .entry-img { transform: scale(1.03); }
.entry-body { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px 22px; flex: 1; }
.entry-body b { font-family: var(--serif); font-weight: 600; font-size: 23px; letter-spacing: .03em; }
.entry-body > span { color: var(--sub); font-size: 13px; line-height: 1.7; }
.entry-body > .entry-go { margin-top: 10px; align-self: flex-start; padding: 8px 16px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; transition: background-color .18s var(--ease); }
.entry:hover .entry-go { background: var(--ink-2); }
.home-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.sub-row { display: flex; align-items: center; gap: 18px; padding: 16px 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-card); text-decoration: none; color: var(--ink); transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.sub-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.sub-row .num { font-family: var(--serif); font-size: 30px; font-weight: 600; min-width: 2.2em; font-variant-numeric: tabular-nums; }
.sub-row span { display: flex; flex-direction: column; min-width: 0; }
.sub-row span b { font-weight: 600; }
.sub-row small { color: var(--sub); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-note { margin: 14px 2px 0; color: var(--mute); font-size: 12px; }

/* 风格选择 */
.style-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.style-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; transition: all .15s; margin: 0 !important; }
.style-opt:hover { border-color: var(--line-2); background: var(--oat-2); }
.style-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.style-opt { position: relative; }
.style-opt input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.style-opt > div { flex: 1; min-width: 0; }
.tile-cv { display: block; max-width: 100%; image-rendering: pixelated; border-radius: 4px; }
.tile-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tile-meta { font-size: 11px; color: var(--sub); line-height: 1.4; }
.hint.bad { color: var(--bad); }
.xhs-steps { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--oat-2); font-size: 13px; }
.xhs-steps a { color: var(--ink); font-weight: 600; margin: 0 4px; }
.ref-box { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.ref-th { position: relative; width: 86px; height: 86px; border-radius: 8px; overflow: hidden; background: #f6f4ef; }
.ref-th img { width: 100%; height: 100%; object-fit: cover; }
.ref-th button { position: absolute; right: 2px; top: 2px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; line-height: 22px; }
.ref-add { width: 86px; height: 86px; border: 2px dashed var(--line-2); border-radius: 8px; background: var(--oat-2); color: var(--accent); font-size: 12px; }
.style-opt b { display: block; font-size: 14px; margin-bottom: 2px; }
.style-opt small { display: block; color: var(--sub); font-size: 12px; line-height: 1.4; }

/* 挑素材出一组 */
.as-card { position: relative; }
.as-check { position: absolute; left: 8px; top: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); background: rgba(255, 255, 255, .92); color: #fff; font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.as-card.picked { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.as-card.picked .as-check { background: var(--ink); border-color: var(--ink); }
.as-card.nopick { opacity: .45; cursor: not-allowed; }
.as-pickbar { position: sticky; bottom: 16px; width: auto; max-width: none; margin-top: 18px; }
.as-pickbar small { display: block; }
.gm-assets { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-asset { position: relative; width: 96px; display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--sub); }
.gm-asset img { width: 96px; height: 96px; object-fit: contain; background: var(--oat-2); border-radius: 10px; padding: 6px; mix-blend-mode: multiply; }
.gm-asset span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-asset button { position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 0; background: rgba(28, 37, 64, .7); color: #fff; line-height: 22px; font-size: 13px; }
.gm-add { width: 96px; height: 96px; border: 1.5px dashed var(--line-2); border-radius: 10px; background: transparent; color: var(--ink); font-size: 12.5px; white-space: normal; }
/* 每双的进度：选中 / 打样中 / 已下单 / 不要 */
.st-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.stc { padding: 1px 9px; font-size: 11.5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--mute); box-shadow: none; }
.stc:hover { border-color: var(--line-2); color: var(--ink); }
.stc.on.st-pick { background: #e7f2ea; border-color: #b9d9c2; color: var(--ok); font-weight: 600; }
.stc.on.st-sample { background: #e8eef9; border-color: #bccbe8; color: #2f4d8a; font-weight: 600; }
.stc.on.st-order { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.stc.on.st-no { background: #f6e6e4; border-color: #e5c1bd; color: var(--bad); font-weight: 600; }
.st-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; }
.st-pill.st-pick { background: #e7f2ea; color: var(--ok); }
.st-pill.st-sample { background: #e8eef9; color: #2f4d8a; }
.st-pill.st-order { background: var(--ink); color: #fff; }
.st-pill.st-no { background: #f6e6e4; color: var(--bad); }
.lib-one > .st-pill { position: absolute; left: 10px; top: 10px; z-index: 1; }
.lib-sts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lib-filter { grid-column: 1 / -1; margin-bottom: 2px; }
.lib-filter .cnt { margin-left: 4px; font-size: 11.5px; opacity: .7; }

/* 首页：每周自动新款 */
.auto-box { margin: 0 0 28px; padding: 22px 24px; }
.ab-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 12px; }
.ab-head h2 { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: .03em; margin: 0 0 4px; }
.ab-head p { margin: 0; color: var(--sub); font-size: 13px; max-width: 46em; line-height: 1.7; }
.ab-actions { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.ab-status { font-size: 12.5px; color: var(--ok); background: #e7f2ea; border-radius: 999px; padding: 3px 12px; font-weight: 500; }
.ab-warn { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 12px; padding: 10px 14px; border-radius: 12px; background: #fbf4e6; border: 1px solid #efdcb6; font-size: 12.5px; color: #8a5a00; }
.ab-warn a { color: var(--red); font-weight: 600; margin-left: 6px; text-decoration: none; }
.ab-running { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--oat-3); margin-bottom: 12px; }
.ab-running .spin { margin: 0; flex: none; }
.ab-run { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 14px; display: grid; gap: 10px; }
.ab-meta { font-size: 12.5px; color: var(--sub); }
.ab-meta b { color: var(--ink); margin-right: 8px; }
.ab-sum { margin: 0; font-size: 14px; line-height: 1.7; }
.ab-sum span { display: inline-block; font-size: 11.5px; font-weight: 600; color: #fff; background: var(--red); border-radius: 999px; padding: 0 8px; margin-right: 8px; vertical-align: 1px; }
.ab-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ab-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.ab-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: var(--oat-2); }
.ab-card b { display: block; font-size: 13.5px; }
.ab-card small { display: block; color: var(--sub); font-size: 12px; }
.ab-card em { display: block; font-style: normal; color: var(--red); font-size: 12px; margin-top: 2px; }
.ab-hot-row { display: flex; gap: 8px; overflow-x: auto; margin-top: 6px; padding-bottom: 4px; }
.ab-hot-it { flex: none; width: 92px; text-decoration: none; color: var(--sub); font-size: 11.5px; text-align: center; }
.ab-hot-it img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 3px; background: var(--oat-2); }
.ab-set .lib-card { max-width: 560px; }
.ab-empty { margin: 6px 0 0; }
.auto-tag { display: inline-block; font-size: 11px; font-weight: 600; color: #fff; background: var(--ink); border-radius: 999px; padding: 0 7px; margin-right: 6px; vertical-align: 2px; }
@media (max-width: 1000px) { .ab-head { flex-direction: column; } .ab-actions { justify-content: flex-start; } }

/* 首页进度提示 */
.home-progress { margin-bottom: 24px; padding: 20px 24px; border-left: 3px solid var(--red); }
.home-progress b { font-size: 16px; display: block; margin-bottom: 4px; }
.home-progress p { margin: 0 0 10px; color: var(--sub); font-size: 13px; }

.hs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 6px; margin: 4px 0 8px; }
.hs-stats span { background: #faf8f4; border-radius: 8px; padding: 6px 2px; text-align: center; font-size: 12px; color: var(--sub); display: flex; flex-direction: column; white-space: nowrap; }
.hs-stats b { font-size: 20px; color: var(--ink); line-height: 1.3; }
.hs-stats span.zero b { color: var(--bad); }
.hs-warn { color: #8a5a00; background: #fff7e6; border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.hs-prog { list-style: none; padding: 0; margin: 8px 0 4px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.hs-prog li { position: relative; display: flex; align-items: center; gap: 8px; padding-left: 26px; color: var(--sub); min-height: 22px; }
.hs-prog li.done { color: var(--ok); }
.hs-prog li.done::before { content: '✓'; position: absolute; left: 4px; font-weight: 700; }
.hs-prog li.on { color: var(--ink); font-weight: 700; padding-left: 0; }
.hs-prog .spin { width: 18px; height: 18px; border-width: 2px; margin: 0 0 0 2px; flex: none; }
.home-recent { margin-top: 48px; }
.hr-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.hr-head h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: .03em; margin: 0; }
.hr-head a { color: var(--sub); text-decoration: none; font-size: 13px; border-bottom: 1px solid var(--line-2); padding-bottom: 1px; }
.hr-head a:hover { color: var(--ink); border-color: var(--ink); }
@media (max-width: 1000px) {
  .hero2 { grid-template-columns: 1fr; gap: 24px; }
  .hero2 h1 { font-size: 34px; }
  .shelf { height: 280px; padding: 24px 18px 0; }
  .shelf img { height: 230px; }
  .entries, .home-sub, .home-recent .lib-grid { grid-template-columns: 1fr; }
  main { padding: 20px 16px 40px; }
  .app { display: block; }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 0 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .brand { padding: 14px 4px; }
  .brand::after, .brand small, .side-foot, #nav a.on::before, #nav a svg { display: none; }
  #nav { flex-direction: row; }
  #nav a { height: 36px; white-space: nowrap; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-actions { flex-wrap: wrap; }
  .toolbar { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .toolbar .search { width: 100%; }
  .settings { grid-template-columns: 1fr; }
  .s-index { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; } }
.sheet-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.sheet-tools.panel { background: transparent; border: 0; padding: 0; }
.sheet-tools .st-gap { flex: 0; }
.sheet-tools input.title { width: auto; flex: 1 1 240px; min-width: 200px; font-size: 22px; font-weight: 600; letter-spacing: .02em; padding: 4px 10px; border-color: transparent; background: transparent; }
.sheet-tools input.title:hover { border-color: var(--line-2); background: var(--surface); }
.sheet-tools input.title:focus { background: var(--surface); }
.sheet-tools .st-gap { flex: 1; }
.sheet-more { width: 100%; }
.sheet-more summary { cursor: pointer; color: var(--sub); font-size: 13px; width: max-content; }
.sheet-more .sm-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 2px; }
.sheet-more .sm-row { display: flex; align-items: center; gap: 10px; }
.sheet-more .sm-row > label { width: 72px; flex: none; color: var(--sub); font-size: 13px; margin: 0; }
.sheet-more select { width: 320px; max-width: 100%; }
.sheet-tools .picked { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-tools .chip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; }
.sheet-tools .chip button { border: 0; background: transparent; padding: 0 6px; color: var(--sub); font-size: 12px; }
.page { background: #fff; padding: 24px 26px; margin-bottom: 22px; border-radius: 6px; box-shadow: 0 1px 2px rgba(28, 37, 64, .06), 0 14px 36px -18px rgba(28, 37, 64, .22); width: 1080px; max-width: 100%; }
.ohead { width: 100%; border-collapse: collapse; font-size: 12px; }
.ohead th, .ohead td { border: 1px solid #b9b4aa; padding: 4px 4px; text-align: center; }
.ohead th { font-weight: 500; color: var(--sub); background: var(--oat-3); }
.ohead td { width: 7.6%; }
.ohead .hcell { min-height: 20px; padding: 2px; font-size: 12px; word-break: break-all; outline: none; }
.ohead .hcell:focus { outline: 2px solid var(--accent); background: var(--accent-soft); }
.socks4 { display: grid; grid-template-columns: 54px repeat(4, 1fr); margin-top: 8px; }
.socks4 figure { margin: 0; text-align: center; font-size: 12.5px; color: var(--ink); }
.socks4 img { width: 100%; height: 300px; object-fit: contain; }
.rows4 { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.rows4 th { width: 54px; color: #333; font-weight: normal; text-align: right; padding: 3px 6px 3px 0; vertical-align: top; }
.rows4 td { border-bottom: 1px solid var(--line); padding: 4px 6px; vertical-align: top; }

/* 设置 */
.settings { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1180px; }
.s-index { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.s-index button { border: 0; background: transparent; text-align: left; padding: 7px 12px; border-radius: 8px; color: var(--sub); font-size: 13.5px; }
.s-index button:hover { background: var(--oat-2); color: var(--ink); }
.s-main { display: grid; gap: 16px; min-width: 0; }
.s-main > .panel { scroll-margin-top: 24px; }
.settings table { width: 100%; border-collapse: collapse; }
.settings td, .settings th { padding: 3px 4px; text-align: left; font-size: 13px; }
.settings th { color: var(--sub); font-weight: normal; }
.settings td input.num { width: 80px; }
.s-save { display: flex; align-items: center; gap: 12px; }
.s-style-ta { margin: 10px 0 6px; }
.s-style-ta textarea { line-height: 1.75; font-size: 13.5px; }
.rule-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.rule { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; transition: background-color .18s var(--ease); }
.rule:hover { background: var(--oat-3); }
.rule.off { opacity: .45; }
.rule-area { flex: none; min-width: 44px; text-align: center; background: var(--oat-2); color: var(--ink); border-radius: 999px; padding: 1px 9px; font-size: 12px; margin-top: 2px; }
.rule-body { flex: 1; display: flex; flex-direction: column; }
.rule-body b { font-weight: 500; }
.rule-body small { color: var(--mute); font-size: 12px; margin-top: 2px; }
.rule-add { display: flex; gap: 8px; }
.rule-add input { flex: 1; }
.wx-dev { margin-top: 8px; }
.as-inbox { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; background: #fbf4e6; border: 1px solid #efdcb6; border-left: 3px solid #c8902c; border-radius: 12px; padding: 12px 16px; }
.as-inbox .hint { flex: 1; }
.s-adv > summary { cursor: pointer; color: var(--sub); font-weight: 600; }
.s-adv .panel { box-shadow: none; border: 1px solid var(--line); margin-top: 10px; }
.sw { display: inline-block; width: 20px; height: 20px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); vertical-align: middle; }

.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(28, 37, 64, .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border-radius: 20px; padding: 24px 28px; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-shadow: var(--shadow-pop); }
.modal.wide { width: min(1080px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head b { font-size: 18px; font-weight: 600; letter-spacing: .01em; }
.modal-head button { font-size: 20px; padding: 0 8px; line-height: 1.4; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.tgrid.four { grid-template-columns: repeat(4, 1fr); }
.tcard { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; font-size: 13px; }
button.tcard:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(28, 37, 64, .12); }
.tcard canvas.thumb { height: auto; aspect-ratio: 400 / 440; max-width: 100%; }
.cw-yarns { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11px; justify-content: center; min-height: 36px; }
.cw-btns { display: flex; gap: 6px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 50; }
.toast { background: var(--ink); color: #fff; padding: 9px 18px; border-radius: 10px; box-shadow: var(--shadow-pop); font-size: 13px; }
.toast.bad { background: var(--bad); }

@media print {
  body { background: #fff; }
  .side, .noprint, .sheet-tools { display: none !important; }
  .app { display: block; }
  main { padding: 0; }
  .view { display: none !important; }
  #view-orders { display: block !important; }
  .orders { display: block; }
  .page { box-shadow: none; margin: 0; padding: 0; width: auto; page-break-after: always; }
  .page:last-child { page-break-after: auto; }
}
@page { size: A4 landscape; margin: 8mm; }
