/* Jiangsu Huimei website. Colours, type and the carton stamp come from the app's Theme.kt. */

@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #F7F4EE;
  --card: #FDFBF7;
  --raised: #EFE9DF;
  --line: rgba(31, 27, 22, 0.08);
  --line-strong: rgba(31, 27, 22, 0.16);
  --text: #1F1B16;
  --text2: #5E554A;
  --muted: #7B7266;
  --accent: #D71920;
  --accent-hover: #C2161C;
  --accent-ink: #B3141A;
  --shadow: 0 1px 2px rgba(31, 27, 22, 0.06), 0 8px 24px rgba(31, 27, 22, 0.06);
  --map-light: block;
  --map-dark: none;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans SC", "Noto Sans Arabic", "Noto Nastaliq Urdu", "Noto Sans Devanagari", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --top-h: 64px;
  --tab-h: 0px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161513; --card: #1C1A18; --raised: #262421;
    --line: rgba(239, 233, 222, 0.08); --line-strong: rgba(239, 233, 222, 0.16);
    --text: #EFE9DE; --text2: #AAA398; --muted: #8A847A;
    --accent-hover: #E52A31; --accent-ink: #FF6B6B;
    --shadow: none; --map-light: none; --map-dark: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161513; --card: #1C1A18; --raised: #262421;
  --line: rgba(239, 233, 222, 0.08); --line-strong: rgba(239, 233, 222, 0.16);
  --text: #EFE9DE; --text2: #AAA398; --muted: #8A847A;
  --accent-hover: #E52A31; --accent-ink: #FF6B6B;
  --shadow: none; --map-light: none; --map-dark: block;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/24px var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tab-h);
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .i.flip, [dir="rtl"] .doc-nav .i { transform: scaleX(-1); }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.block { margin-top: 80px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1200px; margin: 0 auto; height: var(--top-h); padding: 0 32px; display: flex; align-items: center; gap: 32px; }
.logo img { height: 40px; width: auto; }
.nav-top { display: flex; gap: 4px; margin-inline-start: auto; }
.nav-top a {
  height: 36px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 8px;
  font-size: 14px; color: var(--text2); transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.nav-top a:hover { color: var(--text); background: var(--raised); }
.nav-top a.on { color: var(--accent-ink); font-weight: 500; }
.top-tools { display: flex; gap: 8px; }
.tool {
  height: 36px; min-width: 36px; padding: 0 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--text2); cursor: pointer;
  font-size: 14px; transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.tool:hover { color: var(--text); background: var(--raised); }
.lang-wrap { position: relative; }
.menu {
  position: absolute; inset-inline-end: 0; top: 44px; min-width: 200px; max-height: min(480px, 70vh); overflow: auto;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; padding: 4px; box-shadow: var(--shadow);
  animation: rise 160ms var(--ease);
}
.menu li button {
  width: 100%; height: 36px; padding: 0 12px; border: 0; background: none; text-align: start; border-radius: 8px; cursor: pointer;
  font-size: 15px; color: var(--text);
}
.menu li button:hover { background: var(--raised); }
.menu li button[aria-selected="true"] { color: var(--accent-ink); font-weight: 500; }
@keyframes rise { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Shared pieces ---------- */
.stamp {
  display: inline-flex; flex-direction: column; gap: 2px; padding: 8px 12px;
  border: 1.5px solid var(--accent-ink); border-radius: 4px; color: var(--accent-ink);
  font: 500 13px/18px var(--mono); unicode-bidi: plaintext;
}
.stamp span { unicode-bidi: plaintext; }
.btn {
  height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 100ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--raised); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--line-strong); }
.btn.ghost { background: none; color: var(--text2); }
.btn.ghost:hover { color: var(--text); background: var(--raised); }
.text-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; margin-inline-end: -8px;
  border: 0; background: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--accent-ink);
}
.text-btn:hover { background: var(--raised); }
.link { font-size: 14px; color: var(--text2); border-radius: 6px; padding: 4px; }
.link:hover { color: var(--text); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.list-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.h3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.sub { font-size: 14px; line-height: 20px; color: var(--text2); }
.body { font-size: 16px; line-height: 26px; color: var(--text2); }
h2 { font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -0.005em; }
.page-head { padding-top: 48px; margin-bottom: 32px; }
.page-head h1 { font-size: 36px; line-height: 44px; font-weight: 500; letter-spacing: -0.01em; }
.page-head p { margin-top: 8px; font-size: 16px; color: var(--text2); max-width: 640px; }
.section-head { margin-bottom: 16px; }
.section-head p { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--text2); }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.auto-dir { unicode-bidi: plaintext; text-align: start; }

/* ---------- Home ---------- */
.page { animation: enter 280ms var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hero {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: center;
  min-height: calc(100svh - var(--top-h) - 160px); padding-top: 40px; padding-bottom: 40px;
}
.hero h1 { font-size: 56px; line-height: 62px; font-weight: 500; letter-spacing: -0.02em; max-width: 12ch; text-wrap: balance; }
.hero .lede { margin-top: 20px; font-size: 18px; line-height: 28px; color: var(--text2); max-width: 30em; }
.hero .stamp { margin-top: 28px; }
.actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-visual {
  position: relative; height: min(560px, calc(100svh - var(--top-h) - 120px)); min-height: 420px;
  border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, var(--raised), var(--card));
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.hero-visual::after {
  content: ""; position: absolute; left: 50%; bottom: 7%; width: 34%; height: 18px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(31, 27, 22, 0.22), transparent); filter: blur(2px);
}
.hero-visual img { position: relative; z-index: 1; height: 82%; width: auto; }
.facts {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}
.facts > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 24px 12px; text-align: center; position: relative; }
.facts > div + div::before { content: ""; position: absolute; inset-inline-start: 0; top: 16px; bottom: 16px; width: 1px; background: var(--line); }
.facts b { font: 500 28px/36px var(--mono); font-variant-numeric: tabular-nums; unicode-bidi: plaintext; }
.facts span { font-size: 14px; line-height: 20px; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.product {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; cursor: pointer; text-align: start; padding: 0;
  transition: border-color 150ms var(--ease);
}
.product:hover { border-color: var(--line-strong); }
.product .shot { position: relative; height: 320px; background: linear-gradient(180deg, var(--raised), var(--card)); display: flex; align-items: center; justify-content: center; }
.cards.wide .product .shot { height: 440px; }
.product .shot img { height: calc(100% - 40px); width: auto; transition: transform 300ms var(--ease); }
.product:hover .shot img { transform: translateY(-4px); }
.product .tag {
  position: absolute; top: 16px; inset-inline-start: 16px; padding: 2px 6px; border: 1px solid var(--accent-ink); border-radius: 4px;
  color: var(--accent-ink); font: 500 12px/16px var(--mono);
}
.product .meta { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.product h3 { font-size: 20px; line-height: 28px; font-weight: 500; }
.product p { margin-top: 4px; font-size: 15px; line-height: 22px; color: var(--text2); }
.features { display: flex; gap: 16px; color: var(--text2); margin-top: auto; flex-wrap: wrap; }
.features li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.features .i { color: var(--text2); }
.cards.wide .features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cards.wide .features li { flex-direction: column; text-align: center; gap: 6px; }
.product .go { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent-ink); }

.factory { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.factory-media, .company-media { border-radius: 16px; overflow: hidden; background: var(--raised); aspect-ratio: 16 / 9; }
.factory-media video, .company-media video { width: 100%; height: 100%; object-fit: cover; }
.factory-text .sub { margin-top: 4px; }
.factory-text .body { margin-top: 16px; }
.factory-text .btn { margin-top: 24px; }

/* ---------- Products page ---------- */
.cards.wide .product .meta { padding: 24px 28px 28px; gap: 20px; }

/* ---------- Custom Size ---------- */
.sizer { --stats-h: 64px; }
.sizer-grid {
  max-width: 1440px; margin: 0 auto; padding: 24px 32px 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 520px); gap: 32px; align-items: start;
}
.viewer-col { position: sticky; top: calc(var(--top-h) + 24px); }
.viewer {
  position: relative; height: calc(100svh - var(--top-h) - var(--stats-h) - 120px); min-height: 380px;
  border-radius: 20px; border: 1px solid var(--line); background: var(--bg); overflow: hidden;
  touch-action: none; cursor: grab; user-select: none;
}
.viewer:active { cursor: grabbing; }
.viewer canvas { display: block; width: 100%; height: 100%; }
.viewer-fallback { position: absolute; inset: 0; margin: auto; height: 80%; width: auto; }
.gesture {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none; transition: opacity 250ms var(--ease);
}
.gesture.gone { opacity: 0; }
.gesture-art { width: 140px; height: 64px; }
.g-tip { fill: color-mix(in srgb, var(--text2) 16%, transparent); stroke: color-mix(in srgb, var(--text2) 70%, transparent); stroke-width: 1.5; }
.g-trail { stroke: color-mix(in srgb, var(--text2) 25%, transparent); stroke-width: 2; stroke-linecap: round; }
.gesture span {
  font-size: 13px; line-height: 16px; font-weight: 500; color: var(--text2); padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 90%, transparent);
}
.zoom { position: absolute; inset-inline-end: 12px; top: 20%; bottom: 20%; width: 28px; display: flex; align-items: center; justify-content: center; }
.zoom input { writing-mode: vertical-lr; direction: rtl; height: 100%; width: 28px; accent-color: var(--accent); cursor: pointer; }
.film-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
  font-size: 14px; color: var(--text2); display: inline-flex; align-items: center; gap: 6px;
  transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
}
.chip:hover { color: var(--text); background: var(--raised); }
.film-select {
  height: 36px; min-width: 168px; padding: 0 32px 0 12px; border: 1px solid var(--accent-ink); border-radius: 8px;
  background-color: var(--raised); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B7266' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
[dir="rtl"] .film-select { padding: 0 12px 0 32px; background-position: left 10px center; }
.film-select option { background: var(--card); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--raised); color: var(--text); border-color: var(--accent-ink); font-weight: 500; }
.chip[aria-pressed="true"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }

.form-col { padding-bottom: 48px; }
.dims { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 20px; }
.dim { display: grid; grid-template-columns: 112px minmax(0, 1fr) 132px; align-items: center; gap: 12px; min-height: 64px; }
.dim + .dim { border-top: 1px solid var(--line); }
.dim label { font-size: 14px; line-height: 18px; color: var(--text); hyphens: auto; }
.options { margin-top: 24px; display: flex; flex-direction: column; gap: 24px; }
.opt h3 { font-size: 14px; line-height: 20px; font-weight: 500; margin-bottom: 8px; }
.opt-fields { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.opt-fields .three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.three .measure select { padding-inline-end: 20px; background-position: right 4px center; }

input[type="range"].slider { width: 100%; accent-color: var(--accent); height: 28px; cursor: pointer; }
.measure, .input-suffix, .field input, .field textarea, .plain-input {
  display: flex; align-items: center; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card);
  transition: border-color 150ms var(--ease);
}
.measure:focus-within, .input-suffix:focus-within, .field input:focus, .field textarea:focus, .plain-input:focus { border-color: var(--text2); outline: none; }
.measure.bad, .input-suffix.bad, .field input.bad, .plain-input.bad { border-color: var(--accent-ink); }
.measure input, .input-suffix input {
  min-width: 0; flex: 1; height: 100%; border: 0; background: none; padding: 0 0 0 12px; outline: none;
  font: 500 15px/20px var(--mono); font-variant-numeric: tabular-nums; direction: ltr; text-align: left;
}
[dir="rtl"] .measure input { padding: 0 0 0 12px; }
.measure select {
  height: 100%; border: 0; background: none; padding: 0 24px 0 6px; font-size: 13px; color: var(--text2); cursor: pointer;
  appearance: none; -webkit-appearance: none; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B7266' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 14px;
}
.measure { direction: ltr; }
.measure select option { background: var(--card); color: var(--text); }
.labelled { display: flex; flex-direction: column; gap: 6px; }
.labelled > span, .labelled > label > span { font-size: 13px; line-height: 18px; color: var(--text2); }
.plain-input { width: 100%; padding: 0 12px; }
.next-btn { width: 100%; margin-top: 8px; }

.stats {
  position: sticky; bottom: var(--tab-h); z-index: 10; margin-top: 0;
  background: var(--card); border-top: 1px solid var(--line);
}
.stats-in { max-width: 1440px; margin: 0 auto; padding: 10px 32px; display: flex; align-items: center; gap: 32px; min-height: 64px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; min-width: 96px; }
.stat span { font-size: 12px; line-height: 16px; color: var(--muted); }
.stat b { font: 500 16px/22px var(--mono); font-variant-numeric: tabular-nums; unicode-bidi: plaintext; }
.stat.gross b { color: var(--accent-ink); }
.stats .order { margin-inline-start: auto; font-size: 14px; color: var(--text2); unicode-bidi: plaintext; }

/* ---------- Quote ---------- */
.quote-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: start; padding-bottom: 24px; }
.summary-card { padding: 20px 24px; position: sticky; top: calc(var(--top-h) + 24px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
/* Physical alignment and gap: values mix Latin and Arabic text, so logical ones would flip per value. */
.summary dd, .summary dd.num { text-align: right; padding-left: 16px; }
[dir="rtl"] .summary dd, [dir="rtl"] .summary dd.num { text-align: left; padding-left: 0; padding-right: 16px; }
.summary dt, .summary dd { padding: 7px 0; border-top: 1px solid var(--line); }
.summary dt:first-of-type, .summary dd:first-of-type { border-top: 0; }
.summary dt { font-size: 14px; line-height: 20px; color: var(--muted); }
.summary dd { font-size: 14px; line-height: 20px; font-weight: 500; text-align: end; }
.summary dd.num { font-family: var(--mono); font-variant-numeric: tabular-nums; unicode-bidi: plaintext; }
.quote-side { display: flex; flex-direction: column; gap: 24px; }
.form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; line-height: 18px; color: var(--text2); }
.field input, .field textarea { width: 100%; padding: 0 12px; font-size: 15px; }
.field textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 88px; line-height: 22px; }
.input-suffix span { padding: 0 12px; font-size: 14px; color: var(--muted); }
.input-suffix input::placeholder { color: color-mix(in srgb, var(--muted) 50%, transparent); }
.help { font-size: 13px; line-height: 18px; color: var(--muted); }
.help.error { color: var(--accent-ink); }
.send { display: flex; flex-direction: column; gap: 8px; }
.send .h3 { margin-bottom: 4px; }
.send .btn { width: 100%; }
.wechat { padding: 20px 24px; display: flex; gap: 20px; align-items: center; }
.wechat img { width: 132px; height: 132px; border-radius: 8px; background: #fff; padding: 6px; flex: none; }
.wechat .sub { margin-top: 4px; }
.mono-line { margin-top: 12px; font: 500 15px/20px var(--mono); }
.mono-line .muted { font: 400 13px var(--sans); margin-inline-end: 8px; }
.wechat .text-btn { margin-top: 8px; margin-inline-start: -8px; }

/* ---------- Company ---------- */
.company-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; padding-top: 48px; align-items: start; }
.company-media { aspect-ratio: 3 / 2; }
.company-intro h1 { font-size: 30px; line-height: 38px; font-weight: 500; letter-spacing: -0.01em; }
.company-intro .stamp { margin-top: 16px; }
.company-intro .body { margin-top: 16px; }
.kv { margin-top: 24px; }
.kv > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv dt { font-size: 14px; color: var(--muted); }
.kv dd { font-size: 15px; font-weight: 500; text-align: end; }

.steps-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.steps-arrows { display: flex; gap: 8px; flex: none; }
.steps-arrows .tool:disabled { opacity: 0.35; cursor: default; background: none; }
.steps-scroll { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; scroll-padding-inline: 32px; }
.steps-scroll::-webkit-scrollbar { display: none; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; scroll-snap-align: start; }
.step img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--raised); }
.step div { padding: 16px; }
.step .num { font: 500 12px/16px var(--mono); color: var(--accent-ink); direction: ltr; display: block; }
.step h3 { margin-top: 4px; font-size: 16px; line-height: 22px; font-weight: 500; }
.step p { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--text2); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.docs li + li { border-top: 1px solid var(--line); }
.docs button {
  width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 0; background: none; cursor: pointer; text-align: start;
  transition: background-color 150ms var(--ease);
}
.docs button:hover { background: var(--raised); }
.docs .t { flex: 1; min-width: 0; }
.docs b { display: block; font-size: 15px; line-height: 22px; font-weight: 500; }
.docs small { display: block; font-size: 13px; line-height: 18px; color: var(--muted); }
.docs .i { color: var(--muted); }
[dir="rtl"] .docs .i { transform: scaleX(-1); }
.note { margin-top: 12px; font-size: 14px; line-height: 20px; color: var(--text2); }

.map-card { overflow: hidden; }
.map { position: relative; display: block; aspect-ratio: 1400 / 1068; }
.map img { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .map-light { display: var(--map-light); }
.map .map-dark { display: var(--map-dark); }
.city { position: absolute; display: flex; align-items: center; gap: 6px; transform: translate(-3px, -50%); font-size: 12px; line-height: 16px; color: var(--text2); white-space: nowrap; direction: ltr; }
.city i { width: 6px; height: 6px; border-radius: 50%; background: var(--text2); }
.city.near { transform: translate(calc(-100% - 6px), -50%); }
.pin { position: absolute; transform: translate(-12px, -28px); display: flex; flex-direction: column; align-items: flex-start; }
.pin svg { width: 24px; height: 28px; color: var(--accent); }
.pin-label {
  margin-top: 2px; padding: 2px 6px; background: var(--card); border: 1px solid var(--accent-ink); border-radius: 4px;
  font: 500 12px/14px var(--mono); color: var(--accent-ink); white-space: nowrap;
}
.map-text { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.address { font-size: 16px; font-weight: 500; }
.map-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.work { max-width: 720px; }
.work-list li { display: flex; align-items: center; gap: 12px; padding: 16px; font-size: 15px; }
.work-list li + li { border-top: 1px solid var(--line); }
.work-list i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); flex: none; }
.work .btn { margin-top: 24px; }

/* ---------- Footer ---------- */
.foot { margin-top: 96px; border-top: 1px solid var(--line); background: var(--card); padding: 40px 0 24px; }
[data-route-now="custom-size"] .foot { display: none; }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand { max-width: 440px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.foot-brand img { height: 40px; width: auto; margin-bottom: 4px; align-self: flex-start; }
.foot-contact { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot-contact li { display: flex; align-items: center; gap: 8px; }
.foot-contact .i { color: var(--muted); }
.foot-contact a:hover { color: var(--accent-ink); }
.foot-legal { margin-top: 32px; font-size: 12px; }

/* ---------- Document viewer ---------- */
.viewer-modal { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 96%, transparent); display: flex; flex-direction: column; animation: enter 200ms var(--ease); }
.doc-bar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--card); }
.doc-bar h2 { font-size: 16px; line-height: 22px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-count { font: 400 13px var(--mono); color: var(--muted); }
.doc-stage { flex: 1; overflow: auto; display: flex; padding: 24px; cursor: zoom-in; }
.doc-stage img { margin: auto; max-height: 100%; max-width: 100%; object-fit: contain; background: #fff; box-shadow: var(--shadow); border-radius: 4px; }
.doc-stage.zoomed { cursor: zoom-out; }
.doc-stage.zoomed img { max-height: none; max-width: none; width: min(1240px, 180%); }
.doc-nav { position: absolute; top: 50%; background: var(--card); width: 44px; height: 44px; }
.doc-nav.prev { inset-inline-start: 16px; }
.doc-nav.next { inset-inline-end: 16px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 24px); transform: translateX(-50%); z-index: 60;
  max-width: min(520px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-size: 14px; line-height: 20px; box-shadow: var(--shadow);
  animation: rise 160ms var(--ease);
}

.tabbar { display: none; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1080px) {
  .sizer-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 24px; }
  .steps { grid-template-columns: repeat(8, 240px); padding: 0 32px; max-width: none; width: max-content; }
}

@media (max-width: 860px) {
  :root { --top-h: 56px; --tab-h: calc(64px + env(safe-area-inset-bottom)); }
  .wrap, .top-in { padding: 0 20px; }
  .nav-top { display: none; }
  .top-tools { margin-inline-start: auto; }
  .logo img { height: 36px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--tab-h); padding: 0 8px env(safe-area-inset-bottom);
    background: var(--card); border-top: 1px solid var(--line);
  }
  .tabbar a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; line-height: 14px; }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar a.on { color: var(--accent-ink); font-weight: 500; }
  .block { margin-top: 56px; }

  .hero { grid-template-columns: minmax(0, 1fr) 128px; gap: 16px; min-height: 0; padding-top: 16px; padding-bottom: 0; align-items: start; }
  .hero h1 { font-size: 34px; line-height: 40px; max-width: none; }
  .hero .lede { font-size: 15px; line-height: 22px; margin-top: 16px; }
  .hero .stamp { margin-top: 20px; }
  .hero-visual { height: 360px; min-height: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
  .hero-visual img { height: 100%; }
  .hero-visual::after { bottom: -4px; width: 70%; }
  .actions { grid-column: 1 / -1; margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .actions .btn { padding: 0 12px; font-size: 14px; }
  .hero-text { display: contents; }
  .hero-text > :not(.actions) { grid-column: 1; }
  .hero h1 { grid-row: 1; } .hero .lede { grid-row: 2; } .hero .stamp { grid-row: 3; justify-self: start; }
  .hero-visual { grid-column: 2; grid-row: 1 / 4; }
  .facts { margin-top: 24px; }
  .facts > div { padding: 16px 8px; }
  .facts b { font-size: 17px; line-height: 24px; }
  .facts span { font-size: 12px; line-height: 16px; }
  .cards { gap: 12px; }
  .cards.wide { grid-template-columns: 1fr; gap: 16px; }
  .product .shot { height: 220px; }
  .cards.wide .product .shot { height: 360px; }
  .cards:not(.wide) .product .meta { padding: 12px; gap: 8px; }
  .cards:not(.wide) .product h3 { font-size: 15px; line-height: 20px; }
  .cards:not(.wide) .product p { font-size: 13px; line-height: 18px; min-height: 72px; }
  .cards:not(.wide) .features li span { display: none; }
  .cards:not(.wide) .features { gap: 10px; }
  .cards:not(.wide) .go { display: none; }
  .factory { grid-template-columns: 1fr; gap: 20px; }
  .page-head { padding-top: 24px; margin-bottom: 20px; }
  .page-head h1 { font-size: 28px; line-height: 36px; }
  .page-head p { font-size: 15px; }

  .sizer { --stats-h: 72px; }
  .sizer-grid { grid-template-columns: 1fr; padding: 12px 16px 0; gap: 16px; }
  .viewer-col { position: static; }
  .viewer { height: 44svh; min-height: 280px; }
  .dims { padding: 4px 16px; }
  .dim { grid-template-columns: 88px minmax(0, 1fr) 124px; gap: 8px; min-height: 60px; }
  .dim label { font-size: 13px; }
  .stats-in { padding: 8px 16px; gap: 8px 12px; }
  .stat { min-width: 0; flex: 1; }
  .stat b { font-size: 13px; line-height: 18px; }
  .stats .order { margin: 0; flex-basis: 100%; font-size: 12px; line-height: 16px; }

  .quote-grid { grid-template-columns: 1fr; gap: 16px; }
  .summary-card { position: static; padding: 16px; }
  .form { padding: 16px; }
  .wechat { padding: 16px; gap: 16px; }
  .wechat img { width: 112px; height: 112px; }

  .company-head { grid-template-columns: 1fr; gap: 20px; padding-top: 20px; }
  .company-intro h1 { font-size: 24px; line-height: 32px; }
  .steps { grid-template-columns: repeat(8, 248px); padding: 0 20px; gap: 12px; }
  .two-col { grid-template-columns: 1fr; gap: 56px; }
  .foot { margin-top: 64px; padding: 32px 0 20px; }
  .toast { bottom: calc(var(--tab-h) + 16px); }
  .doc-nav { top: auto; bottom: 16px; }
}

@media (max-width: 420px) {
  .two { grid-template-columns: 1fr; }
  .wechat { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
