/* =========================================================
   DIYORDIY — flat design system v2
   Flat surfaces · zero shadow · soft rounded geometry
   Palette: ink / paper / cobalt / lime / coral
   ========================================================= */
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap");

:root {
  --ink: #0d0d10;
  --ink-2: #3b3b44;
  --muted: #6c6c78;
  --muted-2: #9a9aa6;

  --line: #dcdce2;
  --line-2: #ebebef;
  --paper: #f4f4f1;
  --paper-2: #e8e8e4;
  --white: #ffffff;

  --brand: #cdf145;
  --brand-dark: #b2dc22;
  --brand-tint: #f2fad0;
  --lime: #cdf145;
  --lime-tint: #f0fac8;
  --coral: #ff5b2e;
  --coral-tint: #ffe7e0;
  --mint: #d9f2e2;
  --sky: #dfe8ff;

  --display: "Space Grotesk", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1240px;
  --bw: 1px;

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.035em;
  margin: 0;
}

h1 { font-size: clamp(2.7rem, 5.8vw, 5rem); line-height: .94; letter-spacing: -.045em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); }

/* 中日韩字形占满字身框，.94 的行高会压到下一行；给 CJK 单独放宽 */
:lang(zh) h1, :lang(ja) h1, :lang(ko) h1 { line-height: 1.12; letter-spacing: -.03em; }
:lang(zh) h2, :lang(ja) h2, :lang(ko) h2 { line-height: 1.22; letter-spacing: -.02em; }
:lang(zh) h3, :lang(ja) h3, :lang(ko) h3 { line-height: 1.4; letter-spacing: 0; }
h3 { font-size: 1.18rem; letter-spacing: -.02em; line-height: 1.25; }

p { margin: 0 0 1em; }
small { font-size: .8rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 860px; }

.eyebrow {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--brand);
  flex: 0 0 auto;
}

.lede { font-size: 1.04rem; color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .lede { margin-inline: auto; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 15px 28px;
  border: var(--bw) solid var(--ink);
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .14s linear, color .14s linear, border-color .14s linear;
  white-space: nowrap;
}
.btn:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }

.btn-clay { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.btn-clay:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

.btn-quiet { background: transparent; border-color: transparent; color: var(--ink-2); padding-inline: 6px; }
.btn-quiet:hover { background: transparent; color: var(--ink); }

.btn-block { width: 100%; }
.btn-sm { padding: 10px 16px; font-size: .7rem; letter-spacing: .08em; border-radius: var(--r-xs); }
.btn[disabled] { opacity: .4; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45em;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 2px solid var(--ink); padding-bottom: 3px;
  transition: gap .14s linear, color .14s linear, border-color .14s linear;
}
.link-arrow:hover { gap: .75em; color: var(--ink); border-color: var(--ink); }

/* ---------------- header ---------------- */
.topbar {
  background: var(--brand);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 16px;
}
.topbar span { opacity: .78; }

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: var(--bw) solid var(--ink);
}
/* 促销条 + 导航条整块吸顶：桌面和手机都要固定。
   原来桌面端只让 .site-head 自己 sticky，但它被这个 relative 父容器框住了，
   父容器只有 130px 高，滚出父容器就失效 —— 所以桌面端一直不吸顶。 */
.head-fixed { position: sticky; top: 0; z-index: 50; }
.head-fixed .site-head { position: static; }
.head-inner { display: flex; align-items: center; gap: 40px; height: 76px; }

.brand {
  font-family: var(--display);
  font-size: 1.18rem;
  letter-spacing: .02em;
  font-weight: 700;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 7px;
}
.brand .dot { width: 7px; height: 7px; background: var(--brand); display: block; }

.nav { display: flex; gap: 28px; }
.nav a {
  font-size: .83rem; color: var(--ink-2); font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
  transition: color .14s linear, border-color .14s linear;
}
.nav a:hover { color: var(--ink); border-color: var(--brand); }
.nav a.is-active { color: var(--ink); border-color: var(--ink); }

.head-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.cur-select {
  border: var(--bw) solid var(--line);
  background: var(--white);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .08em;
}
.cur-select:hover { border-color: var(--ink); }

/* ---------- 自绘下拉（assets/js/dropdown.js） ----------
   原生 select 展开的列表是系统画的：方角 + 系统蓝高亮，改成 CSS 也管不了。
   这里用一套自绘的 listbox 取代它，壳和列表都是站内的圆角 + 纸色/墨色，
   原生 select 缩成 1px 留在 DOM 里负责取值和触发现有 change 监听。 */
.dd { position: relative; display: inline-block; max-width: 100%; }
.dd-native {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0;
  opacity: 0; border: 0; pointer-events: none; appearance: none;
}
.dd-btn {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: var(--bw) solid var(--line); border-radius: var(--r-sm);
  background: var(--white); color: var(--ink);
  padding: 9px 10px; font-size: .74rem; font-weight: 600; letter-spacing: .08em;
  text-align: left; cursor: pointer; transition: border-color .12s linear;
}
.dd-btn:hover { border-color: var(--ink); }
.dd-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }
.dd-val { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-car {
  flex: 0 0 auto; width: 0; height: 0; margin-top: 3px;
  border: 4px solid transparent; border-top-color: currentColor;
}
.dd-menu {
  position: absolute; z-index: 80; top: calc(100% + 6px); left: 0; min-width: 100%;
  max-height: min(300px, 56vh); overflow-y: auto; padding: 6px;
  background: var(--white); border: var(--bw) solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 28px -18px rgba(13, 13, 16, .55);
}
.dd.up .dd-menu { top: auto; bottom: calc(100% + 6px); }
.dd-menu { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.dd-menu::-webkit-scrollbar { width: 8px; }
.dd-menu::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.dd-menu::-webkit-scrollbar-track { background: transparent; }
.dd-opt {
  display: block; width: 100%; border: 0; background: transparent;
  padding: 9px 10px; border-radius: var(--r-xs);
  font-size: .78rem; font-weight: 500; letter-spacing: .02em;
  color: var(--ink); text-align: left; white-space: nowrap; cursor: pointer;
}
.dd-opt:hover, .dd-opt.cur { background: var(--paper-2); }
.dd-opt.on { background: var(--brand-tint); font-weight: 700; }
.dd-lang { max-width: 118px; }
.dd-lang .dd-menu { min-width: 140px; }
/* 表单里的国家选择器：跟同排输入框一模一样的壳 */
label.f .dd { display: block; width: 100%; margin-top: 6px; }
label.f .dd-btn {
  padding: 12px; font-size: .9rem; font-weight: 400; letter-spacing: 0;
  border-radius: var(--r-sm);
}
label.f .dd-btn:hover { border-color: var(--muted-2); }
label.f .dd-menu { left: 0; right: 0; }


.cart-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: var(--bw) solid var(--line); padding: 9px 12px;
  background: var(--white); border-radius: var(--r-sm);
}
.cart-pill:hover { border-color: var(--ink); }
.cart-pill b { font-weight: 700; color: var(--ink); }

/* ---------------- sections ---------------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-alt { background: var(--paper-2); }
.section-white { background: var(--white); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .eyebrow { color: var(--muted-2); }
.section-ink .eyebrow::before { background: var(--brand); }
.section-ink .lede, .section-ink p { color: #b9b9c4; }
.section-ink h2, .section-ink h3 { color: var(--white); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; margin-bottom: 56px; }
.sec-head .t { max-width: 46ch; }

/* ---------------- hero ---------------- */
.hero { position: relative; background: var(--white); border-bottom: var(--bw) solid var(--ink); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 64px;
  align-items: center;
  padding: 84px 0 92px;
}
/* 行高压到 .94 时三行字框是重叠的，第三行那条荧光绿背景会啃掉第二行的字脚，
   英文尤其明显（d/b 的下缘被盖住）。这里单独把 hero 标题的行高放宽一点点。 */
.hero h1 { margin-bottom: 26px; line-height: 1.06; }
.hero h1 .it { color: var(--ink); font-style: normal; background: var(--brand); padding: .02em .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .lede { font-size: 1.06rem; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.hero-meta { display: flex; gap: 0; margin-top: 52px; border-top: var(--bw) solid var(--line); }
.hero-meta div { padding: 18px 30px 0 0; margin-right: 30px; border-right: var(--bw) solid var(--line); }
.hero-meta div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-meta div b {
  display: block; font-family: var(--display); font-size: 1.6rem; font-weight: 600;
  letter-spacing: -.03em; line-height: 1;
}
.hero-meta div span {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  display: block; margin-top: 8px;
}

.hero-art { position: relative; }
/* height:auto is required: the <img> carries width/height attributes for CLS,
   and without this the height attribute wins over aspect-ratio */
.hero-art img { filter: saturate(.88) contrast(1.02); aspect-ratio: 4/3.4; object-fit: cover; width: 100%; height: auto; position: relative; z-index: 1; border-radius: var(--r-xl); }


.hero-tag {
  position: absolute; left: -26px; bottom: 40px; z-index: 2;
  background: var(--brand);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  padding: 16px 18px;
  font-size: .76rem;
  max-width: 230px;
  line-height: 1.5;
  color: var(--ink-2);
}
.hero-tag b { display: block; font-family: var(--display); font-size: .94rem; margin-bottom: 5px; color: var(--ink); letter-spacing: -.01em; }

/* ---------------- trust ---------------- */
.trust-strip { background: var(--ink); }
.trust-strip .wrap {
  display: flex; justify-content: space-between; gap: 12px 26px; flex-wrap: wrap;
  padding: 16px 32px;
  font-size: .69rem; letter-spacing: .12em; text-transform: uppercase; color: #d8d8e0;
  font-weight: 500;
}
.trust-strip .wrap span { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.trust-strip .wrap span::before { content: ""; width: 5px; height: 5px; background: var(--brand); flex: 0 0 auto; }

/* ---------------- steps ---------------- */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--bw); background: var(--line);
  border: var(--bw) solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.step {
  background: var(--white); padding: 34px 26px 38px;
  transition: background .16s linear, color .16s linear;
}
.step:hover { background: var(--ink); }
.step:hover .num { color: var(--brand); }
.step:hover h3 { color: var(--white); }
.step:hover h3 { color: var(--white); }
.step:hover p { color: rgba(255,255,255,.78); }
.step .num {
  font-family: var(--display); font-size: .8rem; font-weight: 700;
  letter-spacing: .1em; color: var(--ink);
}
.step h3 { margin: 20px 0 10px; font-size: 1.1rem; }
.step p { font-size: .87rem; color: var(--ink-2); margin: 0; }
.section-alt .step { background: var(--white); }

/* ---------------- cards / grids ---------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

.card {
  background: var(--white);
  border: var(--bw) solid var(--line);
  padding: 30px;
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .14s linear;
}
.card:hover { border-color: var(--ink); }
.card h3 { margin-bottom: 8px; }
.card img { border-radius: var(--r-md); }
.card p { font-size: .89rem; color: var(--ink-2); margin-bottom: 0; }
.card .pill {
  border-radius: 100px;
  display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink); background: var(--brand);
  padding: 4px 8px; margin-bottom: 16px;
}

.swatch-row { display: flex; gap: 6px; margin-top: 20px; }
.sw { border-radius: 6px; width: 26px; height: 26px; border: var(--bw) solid rgba(13,13,16,.14); display: block; }

/* ---------------- gallery ---------------- */
.gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gal-item { position: relative; overflow: hidden; background: var(--paper-2); display: block; border-radius: var(--r-lg); }
.gal-item .art {
  display: block; aspect-ratio: 1/1.14; width: 100%;
  background-repeat: repeat; background-size: 44% auto; background-position: center;
  transition: transform .3s ease;
}
.gal-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 18px 16px 14px;
  background: var(--ink); color: var(--white);
  font-size: .74rem; font-weight: 500;
  display: flex; justify-content: space-between; gap: 10px;
  transform: translateY(100%); transition: transform .2s linear;
}
.gal-item:hover .cap { transform: none; }
.gal-item:hover .art { transform: scale(1.02); }

/* ---------------- pricing table ---------------- */
.table-round { border: var(--bw) solid var(--ink); border-radius: var(--r-lg); overflow: hidden; }
.price-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .89rem; }
.price-table th, .price-table td { text-align: left; padding: 16px 16px; border-bottom: var(--bw) solid var(--line); }
.price-table thead th {
  background: var(--ink); color: var(--white);
  font-family: var(--sans); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
  border-bottom: 0;
}
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-table tbody tr:hover { background: var(--lime-tint); }
.price-table td.num { font-family: var(--display); font-size: 1.02rem; font-weight: 600; }

/* ---------------- split ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split img { width: 100%; height: auto; filter: saturate(.88) contrast(1.02); border-radius: var(--r-xl); }
.feature-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 0; border-top: var(--bw) solid var(--line); }
.feature-list li {
  display: grid; grid-template-columns: 34px 1fr; gap: 12px;
  font-size: .89rem; color: var(--ink-2);
  padding: 14px 0; border-bottom: var(--bw) solid var(--line);
}
.feature-list .b {
  width: 22px; height: 22px; background: var(--brand); color: var(--ink);
  display: grid; place-items: center; font-size: .62rem; font-weight: 700;
  font-family: var(--display);
}
.section-ink .feature-list { border-color: #2a2a33; }
.section-ink .feature-list li { border-color: #2a2a33; color: #b9b9c4; }
.section-ink .feature-list .b { background: var(--brand); color: var(--ink); }

/* ---------------- quotes ---------------- */
.quote { border-top: 3px solid var(--ink); padding-top: 24px; }
.section-ink .quote { border-color: var(--brand); }
.quote p {
  font-family: var(--display); font-size: 1.14rem; line-height: 1.38; letter-spacing: -.02em;
  color: var(--ink);
}
.section-ink .quote p { color: var(--white); }
.quote cite { font-style: normal; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.quote .stars { color: var(--coral); letter-spacing: .1em; font-size: .8rem; margin-bottom: 14px; display: block; }

/* ---------------- faq ---------------- */
.faq { border-top: var(--bw) solid var(--ink); }
.faq details { border-bottom: var(--bw) solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px;
  font-family: var(--display); font-size: 1.05rem; font-weight: 500; letter-spacing: -.015em;
  padding: 22px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--ink); font-family: var(--display); font-weight: 500;
  font-size: 1.3rem; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 22px; color: var(--ink-2); font-size: .9rem; max-width: 74ch; }

/* ---------------- footer ---------------- */
.site-foot { background: var(--ink); color: #d5d5de; padding: 76px 0 32px; }
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.3fr; gap: 42px; }
.site-foot h4 {
  font-family: var(--sans); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 18px; font-weight: 600;
}
.site-foot a { display: block; font-size: .86rem; color: #d5d5de; padding: 6px 0; }
.site-foot a:hover { color: var(--brand); }
.foot-brand .brand { color: var(--white); margin-bottom: 18px; display: inline-flex; }
.foot-brand .brand .dot { background: var(--brand); }
.foot-brand p { font-size: .86rem; color: #a8a8b4; max-width: 34ch; }
.foot-note {
  border-top: var(--bw) solid #2a2a33; margin-top: 56px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: .74rem; color: #8e8e9c;
}
.news { display: flex; gap: 0; margin-top: 16px; }
.news input {
  flex: 1; background: transparent; border: var(--bw) solid #33333e; border-right: 0;
  padding: 12px 14px; color: var(--white); font-size: .84rem; min-width: 0;
}
.news input::placeholder { color: #74747f; }
.news input:focus { outline: none; border-color: var(--brand); }
.news button {
  border: var(--bw) solid var(--brand); background: var(--brand); color: var(--ink);
  padding: 0 18px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.news button:hover { background: transparent; color: var(--brand); }

/* closing call-to-action band */
.cta-band { background: var(--brand); color: var(--ink); }
.cta-band .eyebrow { color: rgba(13,13,16,.62); }
.cta-band .eyebrow::before { background: var(--ink); }
.cta-band h2 { color: var(--ink); }
.cta-band .lede { color: rgba(13,13,16,.78); }
.cta-band .btn { background: var(--ink); border-color: var(--ink); color: var(--white); }
.cta-band .btn:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }

/* =========================================================
   STUDIO
   ========================================================= */
/* 设计台是一屏应用：页面本身不滚动，只有左右两栏内容区滚动 */
html:has(> body.studio-shell) { overflow: hidden; }
body.studio-shell {
  background: var(--paper);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.studio-shell .site-head { position: relative; flex: 0 0 auto; }
.studio-shell .studio-top { position: relative; flex: 0 0 auto; }
.studio-top { border-bottom: var(--bw) solid var(--line); background: var(--white); z-index: 30; }
.studio-top .wrap { display: flex; align-items: center; gap: 24px; height: 58px; }
.crumbs { font-size: .76rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.crumbs b { color: var(--ink); font-weight: 600; }
.studio-progress {
  margin-left: auto; display: flex; gap: 10px; align-items: center;
  font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  font-weight: 600;
}
.studio-progress i { width: 22px; height: 2px; background: var(--line); display: block; }
.studio-progress i.on { background: var(--brand-dark); }

.studio-grid {
  display: grid;
  grid-template-columns: 306px minmax(0, 1fr) 372px;
  gap: 0;
  align-items: stretch;
  border-bottom: var(--bw) solid var(--line);
  min-height: 0;
}
.studio-shell .studio-grid { flex: 1 1 auto; height: auto; }
.panel { padding: 28px 26px 110px; overflow-y: auto; overscroll-behavior: contain; }
.panel-l {
  border-right: var(--bw) solid var(--line); background: var(--white);
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
}
.panel-l .panel-scroll { padding: 30px 26px 34px; }
.panel-r {
  border-left: var(--bw) solid var(--line); background: var(--white);
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
}
.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 28px 26px 26px; overscroll-behavior: contain; }
.panel-scroll { scrollbar-width: thin; scrollbar-color: #c8c8d2 transparent; }
.panel-scroll::-webkit-scrollbar { width: 10px; }
.panel-scroll::-webkit-scrollbar-track { background: transparent; }
.panel-scroll::-webkit-scrollbar-thumb { background: #d3d3dc; border-radius: 10px; border: 3px solid var(--white); }
.panel-scroll:hover::-webkit-scrollbar-thumb { background: #b9b9c4; }

/* 一屏装下更多选项：工具区整体收一点行距 */
.studio-shell .panel-l .panel-scroll,
.studio-shell .panel-r .panel-scroll { padding: 22px 22px 24px; }
.studio-shell .tile { padding: 9px 11px; }
.studio-shell .opt-label { margin: 18px 0 8px; }
.panel-c { background: var(--paper); display: flex; flex-direction: column; overflow: hidden; }

.panel-title {
  font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); margin: 0 0 18px; display: flex; gap: 8px; align-items: center;
}
.panel-title::before { content: ""; width: 8px; height: 8px; background: var(--brand); }

/* uploader */
.dropzone {
  border: 1px dashed #b9b9c4;
  border-radius: var(--r-md);
  background: var(--paper);
  padding: 26px 16px;
  text-align: center;
  transition: border-color .14s linear, background .14s linear;
  cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); border-style: solid; background: var(--brand-tint); }
.dropzone .ic { font-size: 1.3rem; color: var(--ink); font-weight: 600; }
.dropzone b { display: block; font-size: .86rem; margin-top: 8px; font-weight: 600; }
.dropzone span { font-size: .72rem; color: var(--muted); display: block; margin-top: 5px; line-height: 1.5; }

.uploaded {
  display: flex; gap: 12px; align-items: center; margin-top: 12px;
  border: var(--bw) solid var(--line); border-radius: var(--r-md); padding: 8px; background: var(--white);
}
.uploaded img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--r-xs); }
.uploaded .meta { font-size: .75rem; min-width: 0; }
.uploaded .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.uploaded .meta span { color: var(--muted); }
.uploaded button { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: .72rem; text-decoration: underline; }

.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.preset { border: var(--bw) solid var(--line); border-radius: var(--r-sm); overflow: hidden; padding: 0; background: none; aspect-ratio: 1; transition: border-color .12s linear; }
.preset .sw-img {
  display: block; width: 100%; height: 100%;
  background-repeat: repeat; background-size: 50% auto; background-position: center;
}
.preset:hover { border-color: var(--ink); }
.preset.sel { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: -1px; }

.opt-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin: 24px 0 10px; color: var(--ink);
}
.opt-label span { font-weight: 500; color: var(--muted); font-size: .68rem; letter-spacing: .06em; text-transform: none; }
.hint { font-size: .72rem; color: var(--muted); line-height: 1.55; margin-top: 10px; }

/* preview stage — 一个画框 + 一个可拖动缩放的相机 */
.stage {
  /* 四边留边固定 24px，画框尺寸由 fitStage() 算好写进来 */
  flex: 1 1 auto; position: relative; min-height: 0; padding: 24px;
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
/* 悬到可点选的布面上时给个可点光标；grabbing 定义在后面，拖动时优先 */
.stage.pickable { cursor: pointer; }
.stage.grabbing { cursor: grabbing; }
/* 宽高由 fitStage() 按画布比例算好写进来，照片正好铺满这个圆角框 */
.stage-inner {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 60%; height: 60%;
  border-radius: var(--r-lg); overflow: hidden; background: #fff;
  box-shadow: inset 0 0 0 1px rgba(13,13,16,.08);
}
.mock { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.mock canvas { display: block; width: 100%; height: 100%; }

/* 等比缩放：整张产品图始终完整可见，不裁切 */
.stage-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 26px 20px; font-size: .72rem; color: var(--ink-2);
  border-top: var(--bw) solid rgba(13,13,16,.12);
  background: var(--white);
}
.stage-tools { display: flex; gap: 5px; flex: 0 0 auto; }
.stage-tools .chip { padding: 6px 9px; font-size: .63rem; letter-spacing: .04em; }
.chip-reset { color: var(--muted); }
.chip-reset:hover { color: var(--ink); }
#stageCaption {
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip {
  border: var(--bw) solid var(--line); background: rgba(255,255,255,.6); border-radius: var(--r-xs);
  padding: 7px 12px; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-2);
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* option tiles */
.tiles { display: grid; gap: 6px; }
.tile {
  display: flex; align-items: center; gap: 12px;
  border: var(--bw) solid var(--line); border-radius: var(--r-md);
  padding: 11px 12px; background: var(--white); text-align: left; width: 100%;
  transition: border-color .12s linear, background .12s linear;
}
.tile:hover { border-color: var(--ink); }
.tile.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.tile.sel .tick { border-radius: 4px; }
.tile .t-main { display: block; font-size: .84rem; font-weight: 600; letter-spacing: -.005em; }
.tile .t-sub { display: block; font-size: .71rem; color: var(--muted); line-height: 1.45; }
.tile .t-price { margin-left: auto; font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tile .tick {
  width: 15px; height: 15px; border-radius: 4px; border: var(--bw) solid var(--line); flex: 0 0 auto;
  display: grid; place-items: center; font-size: .5rem; color: transparent; background: var(--white);
}
.tile.sel .tick { background: var(--brand); border-color: var(--brand); color: var(--ink); }

.colors { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- print designer ---- */
.pat-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.pat-btn {
  position: relative;
  border: var(--bw) solid var(--line); border-radius: var(--r-md);
  background: var(--white); padding: 0; overflow: hidden; cursor: pointer;
  transition: border-color .12s linear;
}
.pat-btn:hover { border-color: var(--ink); }
.pat-btn.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
/* 自己上传的图形：完整显示单个图形，而不是把一张图当无缝纹理铺满 */
.pat-mine .pat-thumb {
  background-size: 46% auto; background-repeat: no-repeat;
  background-position: center; background-color: var(--paper);
}
.pat-del {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  display: grid; place-items: center; width: 18px; height: 18px;
  border: var(--bw) solid var(--line); border-radius: 50%;
  background: rgba(255,255,255,.96); color: var(--ink-2);
  font-size: .78rem; line-height: 1; cursor: pointer;
}
.pat-del:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pat-thumb {
  display: block; width: 100%; aspect-ratio: 1.45 / 1;
  background-repeat: repeat; background-size: 30px 30px; background-position: center;
  border-bottom: var(--bw) solid var(--line);
}
.pat-thumb.is-plain { background: #F3EEE2; }
.pat-thumb.is-blank {
  background-image: repeating-linear-gradient(135deg, #ededf1 0 7px, #f8f8f6 7px 14px);
}
.pat-cap {
  display: block; font-size: .55rem; letter-spacing: .07em; text-transform: uppercase;
  padding: 5px 0 6px; color: var(--ink-2);
}
.pat-btn.on .pat-cap { color: var(--ink); font-weight: 600; }

.pat-controls { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.ctl { display: block; }
.ctl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.ctl-head > span {
  font-size: .56rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2);
}
/* 步进器：− / 可输入数值 / +，沿用站内边框、圆角与聚焦样式 */
.stepper {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  border: var(--bw) solid var(--line); border-radius: var(--r-xs);
  background: var(--white); overflow: hidden; height: 24px;
}
.stepper:hover { border-color: var(--muted-2); }
.stepper:focus-within { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.step-btn {
  flex: 0 0 22px; height: 100%; padding: 0; border: 0; background: transparent;
  color: var(--ink-2); font: inherit; font-size: .8rem; line-height: 1; cursor: pointer;
  transition: background .12s linear, color .12s linear;
}
.step-btn:hover { background: var(--ink); color: var(--white); }
.step-btn:active { background: var(--muted-2); }
.ctl-num {
  width: 46px; height: 100%; padding: 0 2px; text-align: center;
  border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: .64rem; letter-spacing: 0; text-transform: none;
  -moz-appearance: textfield;
}
.ctl-num::-webkit-outer-spin-button, .ctl-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ctl-num:focus { outline: none; }
.step-unit { font-style: normal; font-size: .6rem; color: var(--muted); margin-right: 2px; }
.ctl-num-wrap { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.ctl-unit { font-style: normal; font-size: .62rem; color: var(--muted); min-width: 8px; }
.ctl input[type="range"] {
  width: 100%; height: 16px; accent-color: var(--ink); cursor: pointer; display: block;
}
.ctl-label {
  font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.ctl-choices { display: flex; gap: 4px; margin-top: 4px; }
.ctl-choices button {
  flex: 1; border: var(--bw) solid var(--line); background: var(--white);
  border-radius: var(--r-xs); padding: 5px 0; font-size: .58rem; cursor: pointer;
  font-family: var(--sans); color: var(--ink-2); transition: all .12s linear;
}
.ctl-choices button.on { background: var(--ink); border-color: var(--ink); color: var(--white); }

.ink-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }

/* own graphic: upload a PNG and tile it as a print element */
.motif-box { margin-top: 10px; display: flex; align-items: stretch; gap: 8px; }
.motif-drop {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  border: var(--bw) dashed #b9b9c4; border-radius: var(--r-md);
  background: var(--paper); padding: 8px 10px; text-align: left;
}
.motif-drop:hover { border-color: var(--brand); border-style: solid; background: var(--brand-tint); }
.motif-thumb {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: var(--r-xs);
  background: var(--white) center/contain no-repeat;
  border: var(--bw) solid var(--line);
}
.motif-thumb.empty {
  background-image: linear-gradient(135deg, transparent 46%, #c9c9d2 46%, #c9c9d2 54%, transparent 54%);
}
.motif-txt { min-width: 0; }
.motif-txt b { display: block; font-size: .74rem; font-weight: 600; line-height: 1.3; }
.motif-txt i { display: block; font-style: normal; font-size: .62rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
.motif-clear {
  border: var(--bw) solid var(--line); background: var(--white); border-radius: var(--r-sm);
  font-size: .62rem; color: var(--muted); padding: 0 9px;
}
.motif-clear:hover { border-color: var(--ink); color: var(--ink); }.ink-dot {
  width: 25px; height: 25px; border-radius: 7px; padding: 0; cursor: pointer;
  border: var(--bw) solid rgba(13,13,16,.16); position: relative; transition: transform .12s linear;
}
.ink-dot:hover { transform: translateY(-2px); }
.ink-dot.sel { outline: 2px solid var(--ink); outline-offset: 2px; }

/* free colour picker swatch */
.ink-add, .color-add {
  background: conic-gradient(from 210deg, #d94a3d, #e0a53c, #8fae6b, #6f9db5, #8d7fb3, #c98ba5, #d94a3d);
}
.ink-add input, .color-add input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; border: 0; padding: 0;
}
.ink-add::after, .color-add::after {
  content: "+"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 15px; line-height: 1; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  pointer-events: none; font-weight: 600;
}
.color-dot {
  width: 28px; height: 28px; border-radius: 8px; border: var(--bw) solid rgba(13,13,16,.16);
  position: relative; padding: 0; transition: transform .12s linear;
}
.color-dot:hover { transform: translateY(-2px); }
.color-dot.sel { outline: 2px solid var(--ink); outline-offset: 2px; }

.seg { display: flex; border: var(--bw) solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--white); }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 8px 0; font-size: .74rem; font-weight: 600;
  color: var(--ink-2); transition: background .12s linear, color .12s linear;
}
.seg button + button { border-left: var(--bw) solid var(--line); }
.seg button.on { background: var(--ink); color: var(--white); }

/* price summary — compact: total + one-line config, breakdown on demand */
.summary {
  flex: 0 0 auto;
  background: var(--white); border-top: var(--bw) solid var(--ink);
  padding: 12px 22px 14px;
}
.sum-head { display: flex; align-items: baseline; gap: 10px; }
.sum-head .sum-label {
  font-size: .6rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted);
}
.sum-total {
  margin-left: auto; font-family: var(--display); font-size: 1.44rem; font-weight: 600;
  letter-spacing: -.035em; line-height: 1.1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sum-more {
  border: 0; background: none; padding: 0; align-self: center;
  font-size: .64rem; color: var(--ink-2); letter-spacing: .02em;
  text-decoration: underline; text-underline-offset: 3px;
}
.sum-more:hover { color: var(--ink); }
.sum-sub {
  margin: 3px 0 10px; font-size: .7rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sum-detail { border-top: var(--bw) solid var(--line-2); margin-bottom: 10px; padding-top: 8px; }
.sum-detail .sum-row { font-size: .76rem; padding: 2px 0; }
.sum-detail .fineprint { text-align: left; margin: 7px 0 0; font-size: .64rem; }
.btn-checkout { padding: 11px 16px; font-size: .72rem; }

.sum-row { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-2); padding: 4px 0; }
.sum-row.total {
  font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em;
  padding-top: 14px; margin-top: 10px; border-top: var(--bw) solid var(--line);
  align-items: baseline; font-weight: 600;
}
.sum-row.total b {
  font-family: var(--display); font-size: 1.6rem; font-weight: 600;
  letter-spacing: -.03em; color: var(--ink); text-transform: none;
}
.cta-row { display: flex; gap: 8px; margin-top: 14px; }
.cta-row .btn { flex: 1; }
.fineprint { font-size: .68rem; color: var(--muted); margin-top: 10px; text-align: center; line-height: 1.5; }

.tabs { display: flex; gap: 20px; border-bottom: var(--bw) solid var(--line); margin-bottom: 22px; }
.tabs button { border: 0; background: none; padding: 0 0 10px; font-size: .76rem; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--ink); border-color: var(--brand); }

/* =========================================================
   CHECKOUT / ORDER
   ========================================================= */
.co-grid { display: grid; grid-template-columns: 1.2fr .95fr; gap: 60px; padding: 52px 0 96px; align-items: start; }
.co-aside { position: sticky; top: 132px; background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r-xl); padding: 26px; }

.steps-line {
  display: flex; gap: 12px; margin-bottom: 34px; font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-2); font-weight: 600; align-items: center;
}
.steps-line span.on { color: var(--ink); }
.steps-line span.on::before { content: "●"; color: var(--ink); margin-right: 6px; font-size: .5rem; vertical-align: middle; }
.steps-line .sep { color: var(--line); }

.fieldset { margin-bottom: 36px; }
.fieldset > h3 { font-size: 1.02rem; margin-bottom: 16px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f-full { grid-column: 1 / -1; }
label.f { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
label.f input, label.f select {
  display: block; width: 100%; margin-top: 6px;
  border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--white);
  padding: 12px; font-size: .9rem; letter-spacing: 0;
  text-transform: none; color: var(--ink); font-weight: 400;
}
label.f input:hover, label.f select:hover { border-color: var(--muted-2); }
label.f input:focus, label.f select:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }

.pay-opt {
  display: flex; gap: 12px; align-items: center; border: var(--bw) solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; background: var(--white); margin-bottom: 8px; cursor: pointer; font-size: .88rem;
  transition: border-color .12s linear;
}
.pay-opt:hover { border-color: var(--ink); }
.pay-opt.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.pay-opt .logo { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: auto; font-weight: 600; }

/* 配送方式两个选项之间留出明显间距，选中态的内描边不会和下一个框粘在一起 */
#shipTiles { display: grid; gap: 10px; }

.mini-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: var(--bw) solid var(--line-2); }
.mini-item img, .mini-item .ph { width: 66px; height: 76px; object-fit: cover; background: var(--paper-2); border-radius: var(--r-sm); }
.mini-item .mi-t { font-size: .86rem; font-weight: 600; }
.mini-item .mi-s { font-size: .74rem; color: var(--muted); line-height: 1.5; font-weight: 400; }

/* order status */
.order-head { padding: 52px 0 30px; border-bottom: var(--bw) solid var(--ink); }
.order-head .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.order-no { font-family: var(--display); font-size: 1rem; font-weight: 600; letter-spacing: .01em; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  border: var(--bw) solid var(--ink); border-radius: 100px; padding: 6px 12px;
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; background: var(--brand); font-weight: 700;
}
.badge::before { content: ""; width: 5px; height: 5px; background: var(--ink); }

.track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; margin: 44px 0 8px; }
.track .node { text-align: center; position: relative; padding-top: 24px; font-size: .7rem; color: var(--muted-2); font-weight: 600; letter-spacing: .02em; }
.track .node::before {
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--white); border: var(--bw) solid var(--line); z-index: 2;
}
.track .node::after {
  content: ""; position: absolute; top: 10px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 1;
}
.track .node:first-child::after { display: none; }
.track .node.done { color: var(--ink); }
.track .node.done::before { background: var(--brand-dark); border-color: var(--brand-dark); }
.track .node.done::after { background: var(--brand-dark); }
.track .node.now { color: var(--ink); }
.track .node.now::before { background: var(--ink); border-color: var(--ink); }
.track .node small { display: block; font-size: .64rem; color: var(--muted); margin-top: 3px; font-weight: 400; }

.tl { list-style: none; padding: 0; margin: 0; }
.tl li {
  display: grid; grid-template-columns: 104px 1fr; gap: 16px;
  padding: 14px 0; border-bottom: var(--bw) solid var(--line-2); font-size: .85rem;
}
.tl li:last-child { border-bottom: 0; }
.tl time { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* =========================================================
   FACTORY PORTAL
   ========================================================= */
.portal-bar { background: var(--ink); color: #c9c9d2; font-size: .72rem; letter-spacing: .06em; padding: 10px 0; }
.portal-bar .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.portal-bar b { color: var(--white); font-weight: 600; }
.portal { background: var(--paper); min-height: 100vh; padding-bottom: 80px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: var(--bw) solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: 30px; }
.kpi { background: var(--white); padding: 20px 22px; }
.kpi span { font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi b {
  display: block; font-family: var(--display); font-size: 2rem; font-weight: 600;
  letter-spacing: -.04em; margin-top: 8px; line-height: 1;
}
.kpi em { font-style: normal; font-size: .72rem; color: var(--ink-2); font-weight: 500; }

.table-card { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); margin-top: 20px; overflow: hidden; }
.table-card .th { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: var(--bw) solid var(--line); }
.table-card .th h3 { font-size: .96rem; font-family: var(--display); font-weight: 600; letter-spacing: -.01em; }
table.orders { width: 100%; border-collapse: collapse; font-size: .84rem; }
table.orders th {
  text-align: left; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: 11px 22px;
  border-bottom: var(--bw) solid var(--line); background: var(--paper);
}
table.orders td { padding: 13px 22px; border-bottom: var(--bw) solid var(--line-2); vertical-align: middle; }
table.orders td.spec { font-size: .82rem; }
table.orders tr:last-child td { border-bottom: 0; }
table.orders tbody tr[data-id]:hover { background: var(--paper); }
.tid { font-variant-numeric: tabular-nums; font-size: .81rem; font-weight: 500; }
.thumb { width: 36px; height: 42px; object-fit: cover; background: var(--paper-2); border-radius: 6px; }
.state {
  display: inline-block; font-size: .63rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 5px 9px; white-space: nowrap;
  background: var(--paper-2); color: var(--ink-2);
  border-radius: 100px;
}
.state.received { background: var(--coral-tint); color: #b23a17; }
.state.proof { background: var(--lime-tint); color: #4f6b05; }
.state.printing { background: var(--brand-tint); color: #5f7a06; }
.state.sewing { background: var(--mint); color: #14663a; }
.state.shipped { background: var(--sky); color: #17399c; }
.state.delivered { background: var(--ink); color: var(--brand); }

.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: var(--bw) solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: 24px; }
.flow .n { background: var(--white); padding: 20px 18px; position: relative; }
.flow .n b { display: block; font-size: .82rem; margin-bottom: 6px; font-weight: 600; }
.flow .n span { font-size: .72rem; color: var(--muted); line-height: 1.5; display: block; }
.flow .n i { display: none; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 14px);
  background: var(--ink); color: var(--white); padding: 14px 22px;
  border-radius: var(--r-md);
  border-left: 4px solid var(--brand);
  font-size: .82rem; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .2s linear, transform .2s linear; z-index: 200;
  max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1140px) {
  .studio-grid { grid-template-columns: 272px minmax(0, 1fr) 336px; }
  .gal { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 960px) {
  body { font-size: 15px; }
  .nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding: 52px 0 64px; }
  .hero-art img { filter: saturate(.88) contrast(1.02); aspect-ratio: 4/3; }
  .hero-tag { left: 12px; bottom: 12px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .grid-3, .grid-4, .co-grid { grid-template-columns: 1fr; gap: 20px; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .gal { grid-template-columns: 1fr 1fr; }
  /* 手机端整页要能上下滚：桌面端锁的是 html，这里必须放开 */
  html:has(> body.studio-shell) { overflow: auto; }
  .studio-grid { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  body.studio-shell { height: auto; display: block; overflow: visible; }
  .studio-shell .site-head { position: sticky; top: 0; }
  .panel-l, .panel-r { border: 0; border-top: var(--bw) solid var(--line); display: block; overflow: visible; padding: 0; }
  .panel { padding: 24px 20px 40px; overflow: visible; }
  .panel-r { display: block; padding: 0; overflow: visible; }
  .panel-l { padding: 0; }
  .panel-scroll { overflow: visible; padding: 24px 20px 8px; }
  /* 上下两栏（1 你的图案 / 2 选规格）在手机端用同一套内边距，
     否则左栏会吃到 .panel 的 24px 左右内边距、右栏没有，两段错位 */
  .studio-shell .panel-l .panel-scroll,
  .studio-shell .panel-r .panel-scroll { padding: 24px 20px 28px; }
  .panel-c { order: -1; min-height: 0; overflow: visible; }
  /* 预览框按 3:2（四张底图的实际比例）定高，照片正好撑满画框，不留白边 */
  .stage { height: auto; aspect-ratio: 3 / 2; min-height: 0; padding: 0; }
  /* 手机端展示区取消矩形圆角：整幅照片直角铺满，和整页的直角版式一致 */
  .stage-inner { left: 0; top: 0; width: 100%; height: 100%; transform: none; border-radius: 0; }
  .stage-foot { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px 18px; }
  /* 展示框下方这排切换按钮等分撑满整行，不再挤在左侧留出空白 */
  .stage-tools {
    flex: 1 1 auto; min-width: 0; width: 100%;
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px;
  }
  /* 长语言（de/fr）里 Four-piece 这类词会比格子宽，允许折行，绝不横向溢出 */
  .stage-tools .chip { width: 100%; padding: 7px 2px; text-align: center; line-height: 1.2; overflow-wrap: anywhere; }
  .panel-c { min-width: 0; }
  .track { grid-template-columns: 1fr 1fr 1fr; gap: 20px 0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .co-aside { position: static; }
  .section { padding: 64px 0; }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 34px; }
  .price-table { font-size: .8rem; }
  .price-table th, .price-table td { padding: 12px 10px; }
  table.orders th:nth-child(4), table.orders td:nth-child(4) { display: none; }
}

/* 手机端所有输入框统一 16px：低于 16px 时 iOS 会在聚焦瞬间把整页放大，
   而且尺码、门牌、邮箱这些框本来就该看得清、点得准 */
@media (max-width: 960px) {
  input, select, textarea { font-size: 16px !important; }
}

@media (max-width: 760px) {
  /* 用 clip 而不是 hidden：hidden 会把 body 变成滚动容器，
     里面的 position:sticky 就失效了（首页页头固定不住就是这个原因） */
  html, body { overflow-x: clip; }
  .wrap { padding: 0 20px; max-width: 100%; }
  /* .wrap 的横向 padding 会盖掉 .hero-grid 的上下 padding，导致样图贴着下方黑色保障条；
     这里提高选择器权重，把上下留白补回来 */
  .hero .hero-grid { padding: 40px 20px; }
  /* 「由你创作」的样例在手机端一行四列，缩略图更紧凑 */
  .gal { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .gal-item { border-radius: var(--r-sm); }
  /* 四列后每格只有 80px 宽，悬浮字幕放不下也不该出现，点图直接进设计台 */
  .gal-item .cap { display: none; }
  .head-inner { gap: 8px; height: 66px; }
  .brand { font-size: 1rem; letter-spacing: 0; }
  .head-right { gap: 6px; }
  .head-right .dd-btn { padding: 7px 8px; font-size: .7rem; gap: 6px; }
  .head-right .dd-lang { max-width: 96px; }
  .head-right .dd-lang .dd-menu { min-width: 128px; }
  .cur-select { padding: 7px 8px; font-size: .7rem; }
  .cart-pill { padding: 7px 10px; gap: 5px; font-size: .68rem; }
  .cart-pill span { display: none; }
  .cart-pill:not(.has) { display: none; }
  .head-right .btn { padding: 9px 12px; font-size: .66rem; }
  .studio-progress { display: none; }
  .stage-foot { flex-wrap: wrap; row-gap: 8px; }
  /* 摘要那行原来是 nowrap + 省略号，在 390 宽上会撑出 441px 的横向溢出 */
  #stageCaption { width: 100%; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.5; }
  .hero-meta { flex-wrap: wrap; }
  .hero-meta div { padding-right: 20px; margin-right: 20px; }
  .tile .t-price { white-space: nowrap; }
  .kpi b { font-size: 1.5rem; }
  table.orders th:nth-child(2), table.orders td:nth-child(2) { display: none; }
  /* 手机端订单表只剩 5 列（订单 / 规格 / 发货日 / 状态 / 操作），但每列上下左右
     各 22px 内边距，光间距就吃掉 220px，整表撑到 451px 宽、比卡片宽 116px，
     状态徽标和操作按钮都被卡片裁掉。列间距收到 8px，徽标和按钮同步收窄 */
  table.orders { font-size: .78rem; table-layout: fixed; }
  table.orders th, table.orders td { padding: 10px 8px; overflow-wrap: break-word; hyphens: auto; }
  /* 固定列宽：内容再长也不许把表撑出卡片（德/俄语的长单词会到 400px+） */
  table.orders th:nth-child(1) { width: 20%; }
  table.orders th:nth-child(3) { width: 28%; }
  table.orders th:nth-child(5) { width: 12%; }
  table.orders th:nth-child(6) { width: 19%; }
  table.orders th:nth-child(7) { width: 21%; }
  table.orders th { font-size: .55rem; letter-spacing: .05em; }
  table.orders th:first-child, table.orders td:first-child { padding-left: 11px; }
  table.orders th:last-child, table.orders td:last-child { padding-left: 4px; padding-right: 11px; }
  table.orders td.spec { font-size: .74rem; }
  table.orders .state { font-size: .52rem; letter-spacing: 0; padding: 4px 6px; white-space: normal; text-align: center; line-height: 1.25; }
  table.orders .btn-sm { padding: 4px 5px; font-size: .53rem; white-space: normal; line-height: 1.2; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
  table.orders .tid { font-size: .71rem; }
  .order-head .row { gap: 18px; }
  .trust-strip .wrap { justify-content: flex-start; }
}

@media (max-width: 560px) {
  h1 { font-size: 2.4rem; }
  /* 样例区保持一行四列，不放回单列 */
  .steps, .f-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .track { grid-template-columns: 1fr 1fr; }
}

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

/* =========================================================
   PRINT DESIGNER — surfaces, sources, library, AI
   ========================================================= */

/* which fabric surface is being designed */
.surf-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 12px; }
/* 五个分面标签时，最后单独一个铺满整行，不留下半格空白 */
.surf-tab:last-child:nth-child(odd) { grid-column: 1 / -1; }
.surf-tab {
  border: var(--bw) solid var(--line); border-radius: var(--r-md);
  background: var(--white); padding: 9px 8px 8px; text-align: left;
  transition: border-color .12s linear, background .12s linear;
}
.surf-tab b {
  display: block; font-family: var(--display); font-size: .64rem; font-weight: 600;
  letter-spacing: -.01em; line-height: 1.2;
}
.surf-tab i {
  display: block; font-style: normal; font-size: .56rem; color: var(--muted);
  margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.surf-tab:hover { border-color: var(--ink-2); }
.surf-tab.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.surf-tab.on i { color: var(--ink-2); }

.surf-state {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 8px 0 0; font-size: .6rem; color: var(--muted);
}
/* 摘要行与「点击布面编辑」的提示文案已按需求删除，这里只留功能小按钮 */
.surf-state:empty { display: none; }
.mini-chip {
  border: var(--bw) solid var(--line); background: var(--white); border-radius: 100px;
  padding: 3px 9px; font-size: .56rem; letter-spacing: .02em; color: var(--ink-2);
  transition: all .12s linear;
}
.mini-chip:hover { border-color: var(--ink); color: var(--ink); }
.mini-chip.on { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* where the print comes from */
.src-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  margin-top: 16px; border: var(--bw) solid var(--line);
  border-radius: var(--r-sm); overflow: hidden; background: var(--white);
}
.src-tabs button {
  border: 0; background: transparent; padding: 8px 2px;
  font-size: .58rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); border-right: var(--bw) solid var(--line);
  transition: background .12s linear, color .12s linear;
}
.src-tabs button:last-child { border-right: 0; }
.src-tabs button:hover { color: var(--ink); }
.src-tabs button.on { background: var(--ink); color: var(--white); }

.src-pane { margin-top: 14px; }
.src-pane[hidden] { display: none; }

/* upload zone, compact */
.dropzone.dz-sm { padding: 16px 12px; }
.dropzone.dz-sm b { margin-top: 4px; font-size: .76rem; }
.dropzone.dz-sm span { font-size: .66rem; }
.dropzone.dz-sm .ic { font-size: 1rem; }

/* library grid */
.lib-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin-top: 10px;
}
.lib-grid:empty { display: none; }
.lib-item { position: relative; }
.lib-pick {
  display: block; width: 100%; padding: 0; border: var(--bw) solid var(--line);
  border-radius: var(--r-sm); overflow: hidden; background: var(--paper-2); aspect-ratio: 1;
}
.lib-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-item.on .lib-pick { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.lib-pick:hover { border-color: var(--ink-2); }
.lib-del {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px;
  border: 0; border-radius: 50%; background: rgba(13,13,16,.72); color: #fff;
  font-size: 12px; line-height: 1; display: grid; place-items: center; opacity: 0;
  transition: opacity .12s linear;
}
.lib-item:hover .lib-del, .lib-item:focus-within .lib-del { opacity: 1; }
.lib-name {
  display: block; font-size: .52rem; color: var(--muted); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* AI pane */
.ai-field { display: block; }
.ai-field > span {
  display: block; font-size: .56rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 5px;
}
.ai-field textarea {
  width: 100%; resize: vertical; min-height: 64px;
  border: var(--bw) solid var(--line); border-radius: var(--r-md);
  background: var(--white); padding: 9px 10px; font-size: .76rem; line-height: 1.5;
  font-family: var(--sans);
}
.ai-field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 10px; }
.ai-chip {
  border: var(--bw) solid var(--line); background: var(--white); border-radius: 100px;
  padding: 3px 8px; font-size: .55rem; color: var(--muted); line-height: 1.4;
}
.ai-chip:hover { border-color: var(--ink); color: var(--ink); }
#aiGo { margin-top: 2px; }
#aiGo[disabled] { opacity: .6; cursor: progress; }

/* price tile "popular" pill */
.pop {
  background: var(--brand); color: var(--ink); padding: 2px 7px; border-radius: 100px;
  font-size: .56rem; letter-spacing: .1em; font-weight: 700; vertical-align: 1px;
}

/* language + currency selects sit side by side */
.head-right .lang-select { max-width: 108px; }
html[dir="rtl"] .head-right { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .nav { margin-right: 24px; }

@media (max-width: 760px) {
  .head-right .lang-select { max-width: 78px; }
  .surf-tab b { font-size: .58rem; }
  .surf-tab i { display: none; }
  .lib-grid { grid-template-columns: repeat(4, 1fr); }
  .src-tabs button { font-size: .54rem; }
}
.surf-tab b, .surf-tab i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.surf-tab { min-width: 0; }

/* 直接双击打开时的提示（画布被浏览器标记为跨源） */
.serve-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  max-width: 460px; background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: var(--r-md); font-size: .74rem; line-height: 1.55;
  z-index: 4;
}
.serve-hint b { display: block; font-family: var(--display); font-size: .8rem; margin-bottom: 3px; }
.serve-hint code { background: rgba(255,255,255,.14); padding: 1px 5px; border-radius: 4px; }

/* =========================================================
   账号 / 登录弹窗
   ========================================================= */
.auth-pill {
  border: var(--bw) solid var(--line);
  background: var(--white);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink);
  cursor: pointer;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color .14s linear, background .14s linear;
}
.auth-pill:hover { border-color: var(--ink); }
.auth-pill.is-in { background: var(--brand); border-color: var(--ink); font-weight: 700; }

.auth-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(27, 27, 24, .46);
  display: grid; place-items: center;
  padding: 20px;
}
.auth-mask[hidden] { display: none; }

.auth-card {
  position: relative;
  width: min(430px, 100%);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 26px 26px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22);
}
.auth-x {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border: 0; background: transparent;
  font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer;
}
.auth-x:hover { color: var(--ink); }
.auth-title { margin: 0 0 8px; font-size: 1.32rem; }
.auth-en { font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .06em; margin-left: 8px; text-transform: uppercase; }
.auth-sub { margin: 0 0 18px; font-size: .84rem; line-height: 1.55; color: var(--ink-2); }
.auth-dim { color: var(--muted); font-size: .78rem; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form[hidden] { display: none; }
.auth-label { font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.auth-input {
  width: 100%; box-sizing: border-box;
  border: var(--bw) solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font: inherit; font-size: .92rem;
  background: var(--white); color: var(--ink);
}
.auth-input:focus { outline: none; border-color: var(--ink); }
.auth-code { letter-spacing: .32em; font-size: 1.18rem; font-weight: 700; text-align: center; }
.auth-go { width: 100%; margin-top: 4px; }
.auth-foot { display: flex; justify-content: space-between; margin-top: 4px; }
.auth-link {
  border: 0; background: transparent; padding: 2px 0;
  font: inherit; font-size: .78rem; color: var(--muted);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.auth-link:disabled { opacity: .5; cursor: default; text-decoration: none; }
.auth-link:not(:disabled):hover { color: var(--ink); }
.auth-err {
  margin: 12px 0 0; min-height: 1.2em;
  font-size: .78rem; color: #c0392b;
  opacity: 0; transition: opacity .12s linear;
}
.auth-err.is-on { opacity: 1; }
html.auth-open, html.auth-open body { overflow: hidden; }

/* =========================================================
   LEGAL / POLICY PAGES
   ========================================================= */
.legal { padding: 56px 0 100px; background: var(--white); border-bottom: var(--bw) solid var(--ink); }
.legal-head { border-bottom: var(--bw) solid var(--ink); padding-bottom: 26px; margin-bottom: 52px; }
.legal-head h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.04em; margin-bottom: 16px; }
.legal-head .lede { font-size: 1rem; max-width: 62ch; }
.legal-meta {
  display: flex; gap: 20px; flex-wrap: wrap; margin-top: 18px;
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  font-weight: 500;
}
.legal-grid { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 64px; align-items: start; }

.legal-toc { position: sticky; top: 28px; border-top: 2px solid var(--ink); padding-top: 16px; }
.legal-toc h4 {
  font-family: var(--sans); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin: 0 0 14px;
}
.legal-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex; gap: 10px; font-size: .82rem; color: var(--ink-2); padding: 6px 0;
  line-height: 1.35; transition: color .14s linear;
}
.legal-toc a::before {
  content: counter(toc, decimal-leading-zero); color: var(--muted-2);
  font-size: .68rem; font-weight: 600; letter-spacing: .06em; padding-top: 2px; flex: 0 0 auto;
}
.legal-toc a:hover { color: var(--ink); }
.legal-toc a.is-active { color: var(--ink); font-weight: 600; }
.legal-toc a.is-active::before { color: var(--coral); }

.legal-body { max-width: 70ch; }
.legal-body section { scroll-margin-top: 24px; }
.legal-body h2 {
  font-size: 1.28rem; letter-spacing: -.025em; margin: 0 0 12px;
  padding-top: 34px; display: flex; gap: 12px; align-items: baseline;
}
.legal-body section:first-of-type h2 { padding-top: 0; }
.legal-body h2 .n {
  font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .1em;
  color: var(--muted-2); flex: 0 0 auto;
}
.legal-body h3 { font-size: .98rem; letter-spacing: -.01em; margin: 26px 0 8px; }
.legal-body p { font-size: .91rem; color: var(--ink-2); line-height: 1.7; }
.legal-body ul, .legal-body ol { padding-left: 20px; margin: 0 0 18px; }
.legal-body li { font-size: .91rem; color: var(--ink-2); line-height: 1.68; margin-bottom: 7px; }
.legal-body li::marker { color: var(--muted-2); }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body p a, .legal-body li a, .legal-body dd a, .legal-body td a {
  color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-thickness: 1px; text-decoration-color: var(--muted-2);
}
.legal-body p a:hover, .legal-body li a:hover, .legal-body dd a:hover, .legal-body td a:hover {
  text-decoration-color: var(--ink);
}
body.ck-lock { overflow: hidden; }

.legal-callout {
  border-left: 3px solid var(--brand); background: var(--brand-tint);
  padding: 16px 20px; margin: 0 0 26px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.legal-callout p { margin: 0; font-size: .87rem; color: var(--ink-2); }
.legal-callout p + p { margin-top: 8px; }
.legal-callout strong { color: var(--ink); }
.legal-callout.is-warn { border-left-color: var(--coral); background: var(--coral-tint); }

.legal-table { width: 100%; border-collapse: collapse; margin: 6px 0 26px; }
.legal-table th {
  text-align: left; font: 600 .66rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 0 16px 10px 0; border-bottom: var(--bw) solid var(--ink); vertical-align: bottom;
}
.legal-table td {
  padding: 13px 16px 13px 0; border-bottom: var(--bw) solid var(--line);
  font-size: .86rem; color: var(--ink-2); vertical-align: top; line-height: 1.55;
}
.legal-table td strong { color: var(--ink); }
.legal-table th:last-child, .legal-table td:last-child { padding-right: 0; }

.legal-dl { border-top: var(--bw) solid var(--line); margin: 0 0 26px; }
.legal-dl div {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px;
  padding: 12px 0; border-bottom: var(--bw) solid var(--line);
}
.legal-dl dt { font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.legal-dl dd { margin: 0; font-size: .88rem; color: var(--ink-2); }

.legal-note {
  border-top: var(--bw) solid var(--ink); margin-top: 44px; padding-top: 20px;
  font-size: .78rem; color: var(--muted); line-height: 1.6;
}
.legal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }

@media (max-width: 960px) {
  .legal { padding: 36px 0 68px; }
  .legal-grid { grid-template-columns: 1fr; gap: 34px; }
  .legal-toc { position: static; }
  .legal-toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .legal-dl div { grid-template-columns: 1fr; gap: 4px; }
  .legal-table { display: block; overflow-x: auto; }
}
@media (max-width: 560px) {
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-body h2 { padding-top: 28px; }
}

/* =========================================================
   COOKIE CONSENT  (opt-in — nothing fires before a choice)
   ========================================================= */
.ck {
  position: fixed; z-index: 120; left: 16px; right: 16px; bottom: 16px;
  max-width: 940px; margin: 0 auto;
  background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  padding: 20px 24px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap;
  box-shadow: 0 18px 40px -24px rgba(13, 13, 16, .45);
}
.ck[hidden] { display: none; }
.ck-copy { flex: 1 1 380px; min-width: 0; }
.ck-copy h3 { font-family: var(--display); font-size: 1rem; letter-spacing: -.02em; margin: 0 0 6px; }
.ck-copy p { margin: 0; font-size: .82rem; color: var(--ink-2); line-height: 1.55; max-width: 62ch; }
.ck-copy a { border-bottom: var(--bw) solid var(--line); }
.ck-copy a:hover { border-color: var(--ink); }
.ck-acts { display: flex; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.ck-btn {
  border: var(--bw) solid var(--ink); background: var(--white); color: var(--ink);
  padding: 11px 18px; border-radius: var(--r-sm);
  font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  transition: background .14s linear, color .14s linear, border-color .14s linear;
}
.ck-btn:hover { background: var(--paper-2); }
.ck-btn--solid { background: var(--ink); color: var(--white); }
.ck-btn--solid:hover { background: var(--brand); border-color: var(--brand); color: var(--ink); }
.ck-btn--quiet { border-color: transparent; background: transparent; color: var(--muted); padding-inline: 10px; }
.ck-btn--quiet:hover { background: transparent; color: var(--ink); }

.ck-modal {
  position: fixed; inset: 0; z-index: 130; background: rgba(13, 13, 16, .55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ck-modal[hidden] { display: none; }
.ck-panel {
  background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  width: min(560px, 100%); max-height: 86vh; overflow: auto; padding: 28px;
}
.ck-panel h3 { font-family: var(--display); font-size: 1.24rem; letter-spacing: -.025em; margin: 0 0 8px; }
.ck-panel > p { font-size: .85rem; color: var(--ink-2); margin: 0 0 22px; }
.ck-row {
  display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding: 16px 0; border-top: var(--bw) solid var(--line);
}
.ck-row:last-of-type { border-bottom: var(--bw) solid var(--line); }
.ck-row-t { font-size: .88rem; font-weight: 600; color: var(--ink); margin: 0 0 3px; }
.ck-row-d { font-size: .79rem; color: var(--muted); margin: 0; line-height: 1.5; }
.ck-switch {
  flex: 0 0 auto; width: 46px; height: 26px; border-radius: 999px; border: var(--bw) solid var(--ink);
  background: var(--paper-2); position: relative; cursor: pointer; transition: background .16s linear;
}
.ck-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--ink); transition: transform .16s linear;
}
.ck-switch[aria-checked="true"] { background: var(--brand); }
.ck-switch[aria-checked="true"]::after { transform: translateX(20px); }
.ck-switch[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.ck-panel-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.ck-panel-acts .ck-btn--solid { flex: 1 1 160px; }

/* The studio is a fixed-height app: a centred banner would sit on top of the
   "continue to checkout" button in the right rail, so pin it bottom-left. */
body.studio-shell .ck {
  left: 16px; right: auto; max-width: 430px; margin: 0;
  flex-wrap: wrap; gap: 14px; padding: 18px 20px;
}
body.studio-shell .ck-copy { flex: 1 1 100%; }
body.studio-shell .ck-acts { width: 100%; }
body.studio-shell .ck-acts .ck-btn { flex: 1 1 auto; text-align: center; }

@media (max-width: 620px) {
  .ck { padding: 16px 18px; gap: 14px; border-radius: var(--r-md); left: 10px; right: 10px; bottom: 10px; }
  .ck-acts { width: 100%; }
  .ck-acts .ck-btn { flex: 1 1 auto; text-align: center; }
  .ck-panel { padding: 22px 18px; }
}

/* footer legal links sit inline inside .foot-note (site-foot a is block) */
.foot-note .foot-links { display: inline; }
.foot-note .foot-links a {
  display: inline; padding: 0; color: inherit;
  text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: #3a3a46; text-decoration-thickness: 1px;
}
.foot-note .foot-links a:hover { color: var(--brand); text-decoration-color: var(--brand); }

/* =========================================================
   MOBILE HEADER SHEET
   640px 以下：语言 / 币种 / 订单 / 登录 收进面板，
   页头只留 品牌 + 主按钮 + 菜单键。见 assets/js/mobile-nav.js。
   面板里放的是原节点（搬进搬出），不是克隆。
   ========================================================= */
.head-menu {
  display: none;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: var(--bw) solid var(--line); border-radius: var(--r-sm);
  background: var(--white); cursor: pointer;
  transition: border-color .14s linear;
}
.head-menu:hover { border-color: var(--ink); }
.head-menu span {
  display: block; width: 16px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform .16s linear;
}
.head-menu.is-on span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.head-menu.is-on span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }
.head-menu:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.head-sheet {
  /* 高于首次访问的 cookie 条（120）：否则面板下半截被它压住，
     语言列表展开后基本看不见。关闭面板后 cookie 条恢复原位。 */
  position: absolute; left: 0; right: 0; top: 100%; z-index: 125;
  background: var(--white);
  border-bottom: var(--bw) solid var(--ink);
  box-shadow: 0 24px 44px -32px rgba(13, 13, 16, .55);
  padding: 2px 20px 22px;
  /* 100% = 定位它的那个页头（首页含促销条约 130px），不是固定 66px，
     否则小屏上最后一行会被切在视口外 */
  max-height: calc(100vh - 100% - 2px);
  max-height: calc(100dvh - 100% - 2px);
  overflow-y: auto; overscroll-behavior: contain;
}
.head-sheet[hidden] { display: none; }

.hm-nav { display: grid; }
.hm-nav[hidden] { display: none; }
.hm-nav a {
  padding: 12px 2px;
  font-size: .95rem; font-weight: 500; color: var(--ink);
  border-bottom: var(--bw) solid var(--line);
}
.hm-nav a:hover { color: var(--ink); }

.hm-pref[hidden] { display: none; }
.hm-pref > .hm-sep {
  margin: 16px 0 8px;
  font-family: var(--sans); font-size: .62rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.hm-slot { display: grid; gap: 8px; }
.hm-slot > .dd { display: block; max-width: none; }
.hm-slot .dd-btn { padding: 11px 12px; font-size: .82rem; }
/* 面板里下拉改成行内展开：贴底展开的浮层在可滚动面板里会被裁掉 */
.hm-slot .dd-menu {
  position: static; margin-top: 6px; min-width: 0; max-height: 216px;
  box-shadow: none;
}
.hm-slot > .cart-pill {
  display: flex; justify-content: center;
  padding: 12px; font-size: .78rem;
}
.hm-slot .cart-pill span { display: inline; }
.hm-slot > .auth-pill {
  display: block; width: 100%; max-width: none;
  padding: 12px; font-size: .78rem; text-align: center;
}

/* .site-head 自己有 z-index:50，会形成层叠上下文，面板的 z-index 只能在这个
   上下文里比大小 —— 所以展开时把整个页头抬到 cookie 条（120）之上。 */
html.hm-open .site-head,
html.hm-open .head-fixed { z-index: 126; }

@media (max-width: 640px) {
  .head-menu { display: flex; }
  html.has-headsheet .head-right > .dd,
  html.has-headsheet .head-right > .cart-pill,
  html.has-headsheet .head-right > .auth-pill { display: none; }
  .head-right { gap: 6px; }
}

/* trader identity line under the footer note — EU/UK consumer rules want the
   legal entity, postal address and registration number reachable from every page */
.foot-ident {
  margin: 14px 0 0; max-width: 96ch;
  font-size: .7rem; line-height: 1.7; color: #8e8e9c;
}
.foot-ident strong { color: #d5d5de; font-weight: 500; }
@media (max-width: 640px) { .foot-ident { font-size: .67rem; } }

/* =========================================================
   结算页：登录闸门提示条
   ========================================================= */
.co-auth {
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  background: var(--brand);
  padding: 18px 20px 20px;
  margin-bottom: 22px;
}
.co-auth[hidden] { display: none; }
.co-auth-t { font-family: var(--display); font-weight: 600; font-size: 1.02rem; letter-spacing: -.01em; }
.co-auth-en {
  font-family: var(--body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(27, 27, 24, .55);
  margin-left: 8px;
}
.co-auth-p { margin: 8px 0 14px; font-size: .82rem; line-height: 1.6; color: var(--ink-2); }
.co-auth-en + .co-auth-p { margin-top: 8px; }
@media (max-width: 560px) {
  .co-auth { padding: 16px 16px 18px; }
  .co-auth-en { display: block; margin: 4px 0 0; }
}

/* 订单页：未完成支付的提示条 */
.pay-due {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 2px solid #c0392b;
  background: #fdf1ef;
  color: #7d2418;
  border-radius: var(--r-lg);
  padding: 14px 18px;
  margin: 4px 0 22px;
}
.pay-due-t b { display: block; font-size: .95rem; font-weight: 600; }
.pay-due-t span { display: block; font-size: .78rem; color: #a3442f; margin-top: 3px; }
.pay-due-t em {
  display: block; font-style: normal; font-size: .72rem;
  color: #c0392b; margin-top: 6px; overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .pay-due { flex-direction: column; align-items: stretch; }
}

/* ---------- 微信扫码支付页（自建二维码，不走 Stripe 托管页） ---------- */
body.pay-body { min-height: 100vh; display: flex; flex-direction: column; }
.pay-wrap { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 8px 16px; }
.pay-card { width: 100%; max-width: 408px; background: var(--white); border: 1px solid rgba(13,13,16,.1); border-radius: 20px; padding: 16px 22px 14px; }
.pay-head { display: flex; align-items: center; justify-content: space-between; }
.pay-brand { display: inline-flex; align-items: center; gap: 8px; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.pay-brand i { width: 22px; height: 22px; border-radius: 6px; background: var(--ink); color: var(--brand); display: grid; place-items: center; font-style: normal; font-size: .66rem; letter-spacing: 0; }
.pay-close { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(13,13,16,.14); display: grid; place-items: center; color: var(--ink-2); text-decoration: none; font-size: .95rem; line-height: 1; }
.pay-close:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pay-kicker { margin: 12px 0 0; text-align: center; font-size: .8rem; color: var(--ink-2); }
.pay-amount { margin: 4px 0 0; text-align: center; font-size: clamp(1.5rem, 4.4vh, 1.95rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.pay-ord { margin: 2px 0 12px; text-align: center; font-size: .7rem; color: var(--ink-2); opacity: .75; letter-spacing: .04em; }
.pay-qr { width: min(218px, 31vh, 68vw); aspect-ratio: 1 / 1; margin: 0 auto; border: 1px solid rgba(13,13,16,.1); border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--white); }
.pay-qr img { width: 100%; height: 100%; display: block; }
.pay-qr.is-dim { filter: grayscale(1); opacity: .3; }
.pay-wait { font-size: .78rem; color: var(--ink-2); padding: 0 20px; text-align: center; }
.pay-timer { margin-top: 9px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .74rem; color: var(--ink-2); }
.pay-timer .dot { width: 6px; height: 6px; border-radius: 50%; background: #639922; display: inline-block; }
.pay-timer.is-out .dot { background: #a32d2d; }
.pay-timer b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.pay-hr { height: 1px; background: rgba(13,13,16,.08); margin: 12px 0 10px; }
.pay-note { margin: 0; text-align: center; font-size: .72rem; color: var(--ink-2); }
.pay-acts { display: flex; gap: 10px; margin-top: 12px; }
.pay-acts .btn { flex: 1 1 0; }
.pay-done { text-align: center; padding: 22px 0 6px; }
.pay-done .tick { width: 50px; height: 50px; border-radius: 50%; background: var(--brand); color: var(--ink); display: grid; place-items: center; margin: 0 auto 10px; font-size: 1.3rem; }
.pay-foot { flex: 0 0 auto; padding: 6px 0 10px; text-align: center; }
.pay-foot p { margin: 0; font-size: .68rem; color: var(--ink-2); opacity: .8; }
@media (max-width: 520px) {
  .pay-wrap { padding: 10px 12px; }
  .pay-card { padding: 14px 16px 12px; border-radius: 16px; }
  .pay-qr { width: min(200px, 30vh, 70vw); }
}

/* 结算页支付方式：两个并排大按钮，视觉权重对齐 Stripe 的快捷支付那一排 */
.pay-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.pay-pick .pay-opt { margin-bottom: 0; flex-direction: column; align-items: flex-start; gap: 3px; padding: 13px 15px; }
.pay-pick .pp-t { font-weight: 600; font-size: .9rem; letter-spacing: 0; }
.pay-pick .pp-s { font-size: .68rem; color: var(--muted); letter-spacing: .04em; }
.pay-pick .pp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; font-style: normal; }
@media (max-width: 420px) { .pay-pick { grid-template-columns: 1fr; } }

/* ---------- 订单详情页：紧凑三段式（头部信息 / 明细+记录 / 全部订单） ---------- */
.od-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
.od-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.od-line .order-no { font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; }
.od-meta { display: flex; gap: 14px; flex-wrap: wrap; margin: 7px 0 0; font-size: .78rem; color: var(--ink-2); }
.od-head-r { text-align: right; font-size: .74rem; color: var(--ink-2); line-height: 1.6; }
.od-head-r b { color: var(--ink); font-weight: 500; display: block; font-size: .9rem; }
.od-k { display: block; font-size: .72rem; opacity: .8; }
.track-slim { padding: 14px 0 4px; }
.track-slim .node { font-size: .68rem; }
.od-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; padding-top: 16px; align-items: start; }
.od-col { display: grid; gap: 12px; }
.od-card { background: var(--white); border: var(--bw) solid var(--line); border-radius: var(--r-md); }
.od-card-pad { padding: 16px 18px; }
.od-list { margin-top: 26px; padding-bottom: 40px; }
.od-list-h { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.od-list-h h2 { font-size: .95rem; margin: 0; font-weight: 500; }
.od-list-h span { font-size: .76rem; color: var(--ink-2); }
.od-row { display: grid; grid-template-columns: 38px minmax(0,1fr) 92px 84px 84px 14px; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; font-size: .82rem; }
.od-row:hover { background: rgba(13,13,16,.025); }
.od-row img { width: 38px; height: 44px; object-fit: cover; border-radius: 3px; background: var(--paper-2); display: block; }
.od-row-id { font-weight: 500; letter-spacing: .01em; }
.od-row-st { font-size: .72rem; color: var(--ink-2); }
.od-row-amt { font-variant-numeric: tabular-nums; text-align: right; }
.od-row-d { font-size: .72rem; color: var(--muted); text-align: right; }
.od-row-go { color: var(--muted); }
.od-row.unpaid .od-row-id::after { content: " · 待支付"; color: #c0392b; font-size: .72rem; font-weight: 400; }
@media (max-width: 900px) {
  .od-grid { grid-template-columns: 1fr; }
  .od-row { grid-template-columns: 34px minmax(0,1fr) auto 14px; gap: 10px; }
  .od-row-st, .od-row-d { display: none; }
  .od-head-r { text-align: left; }
}
.track-slim { margin: 0; padding: 14px 0 2px; }
.od-card .tl li { padding: 9px 0; grid-template-columns: 88px 1fr; gap: 12px; font-size: .8rem; }
.od-card .sum-row { font-size: .84rem; }
.od-actions { display: grid; gap: 8px; }
.od-actions .btn { width: 100%; justify-content: center; }
.od-row.cur { background: rgba(13,13,16,.045); }
.od-list.collapsed .od-row:nth-of-type(n+11) { display: none; }
.od-more { display: block; width: 100%; margin-top: 12px; padding: 11px; border: var(--bw) solid var(--line); background: transparent; border-radius: var(--r-md); font-size: .82rem; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.od-more:hover { border-color: var(--ink); color: var(--ink); }
