:root {
  --bg: #f4f2ee;
  --card: #ffffff;
  --text: #1c1b19;
  --muted: #6d6a64;
  --line: #e4e0d8;
  --brand: #1d1d1f;
  --accent: #b08d57;
  --accent-soft: #f3ece0;
  --ok: #2f7d4f;
  --ok-soft: #e3f2e8;
  --warn: #a8641a;
  --warn-soft: #fbeedd;
  --danger: #b3261e;
  --danger-soft: #fbe5e3;
  --info: #2b5c9e;
  --info-soft: #e3ecf8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --card: #1d1c1b;
    --text: #f1efea;
    --muted: #a19d95;
    --line: #34322f;
    --brand: #f1efea;
    --accent: #d3b07a;
    --accent-soft: #2e281e;
    --ok: #6cc28f;
    --ok-soft: #1c2e23;
    --warn: #e4a35a;
    --warn-soft: #33261a;
    --danger: #f08a82;
    --danger-soft: #3a1f1d;
    --info: #86b2ec;
    --info-soft: #1c2738;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- 顶部 ---------- */
.hero {
  background: linear-gradient(160deg, #1d1d1f 0%, #2c2a26 100%);
  color: #f6f1e7;
  padding: 36px 20px 64px;
  text-align: center;
}
.hero h1 { margin: 0; font-size: 26px; letter-spacing: 1px; font-weight: 650; }
.hero p { margin: 6px 0 0; color: #cdbf9f; font-size: 14px; letter-spacing: 2px; }
.hero .contact { margin-top: 12px; font-size: 13px; color: #bdb5a6; }
.hero .contact a { color: #e7cfa1; text-decoration: none; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 48px; }
.wrap.lift { margin-top: -40px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 14px;
}
.card h2 { font-size: 16px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card h2 .num {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 12px;
}

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field label .req { color: var(--danger); margin-left: 2px; }
.input::placeholder { color: var(--muted); opacity: .6; }
/* 客户页面顶部公司名：英文 Montserrat，中文名里的汉字用思源宋体 */
.client .hero h1 { font-family: 'Montserrat', 'Noto Serif SC', 'Songti SC', serif; font-weight: 700; font-size: 27px; letter-spacing: .5px; line-height: 1.2; }
/* 客户页面字段名：英文 Montserrat 全大写小标签；中文思源宋体 */
.client .field label { font-family: 'Montserrat', 'Noto Serif SC', -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--text); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.2px; }
html[lang="zh-CN"] .client .field label { font-family: 'Noto Serif SC', 'Songti SC', serif; font-weight: 600; font-size: 14px; letter-spacing: .5px; text-transform: none; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 16px; /* 防止 iOS 放大 */
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
textarea.input { resize: vertical; min-height: 80px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 380px) { .row3 { grid-template-columns: 1fr 1fr; } }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--bg); border-radius: 14px; padding: 5px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 70px; padding: 8px 4px; border-radius: 10px; cursor: pointer;
  font-size: 13px; line-height: 1.2; text-align: center; color: var(--muted);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg label .ico { width: 24px; height: 24px; flex: none; }
.seg input:checked + label { background: var(--brand); color: var(--bg); font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.seg input:checked + label .ico { color: var(--accent); }
.seg input:focus-visible + label { box-shadow: 0 0 0 3px var(--accent-soft); }

.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { border: 0; background: transparent; width: 40px; height: 46px; font-size: 20px; cursor: pointer; color: var(--muted); }
.stepper button:active { background: var(--accent-soft); }
.stepper input { border: 0; width: 100%; text-align: center; font-size: 16px; background: transparent; outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); border-radius: 10px;
  padding: 10px 16px; cursor: pointer; font-size: 14px; text-decoration: none; color: var(--text);
  transition: transform .05s, background .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.danger { color: var(--danger); border-color: var(--danger-soft); }
.btn.block { width: 100%; padding: 15px; font-size: 17px; font-weight: 600; border-radius: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }

.error-msg { color: var(--danger); background: var(--danger-soft); padding: 10px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
/* 地址下拉 */
.places-wrap { position: relative; }
.places-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  list-style: none; margin: 0; padding: 4px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.14);
  max-height: 320px; overflow-y: auto;
}
.places-list li.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 8px; cursor: pointer; }
.places-list li.opt.active, .places-list li.opt:hover { background: var(--accent-soft); }
.places-list .ico { flex: none; font-size: 15px; line-height: 1.4; }
.places-list .txt { min-width: 0; }
.places-list .txt b { display: block; font-weight: 600; font-size: 15px; }
.places-list .txt small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.places-list li.foot { font-size: 11px; color: var(--muted); text-align: right; padding: 4px 8px 2px; }
.est { font-size: 14px; color: var(--muted); background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin-top: 2px; }
.lang-toggle {
  position: absolute; top: max(14px, env(safe-area-inset-top)); right: 14px;
  background: rgba(255,255,255,.12); color: #f6f1e7; border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; padding: 5px 14px; font-size: 14px; cursor: pointer;
}
.hero { position: relative; padding-top: 52px; }
.wrap { position: relative; z-index: 1; } /* 卡片盖在顶部背景之上 */
.top-link {
  position: absolute; top: max(14px, env(safe-area-inset-top)); left: 14px;
  color: #e7cfa1; text-decoration: none; font-size: 14px; padding: 6px 4px;
}
.notice { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; font-size: 14px; box-shadow: var(--shadow); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.quote-card { border: 2px solid var(--accent); text-align: center; }
.quote-label { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.quote-price { font-size: 40px; font-weight: 750; margin: 4px 0 2px; }
.notice.bad { background: var(--danger-soft); color: var(--danger); }
.notice.update { background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; animation: pop .5s ease-out 2; }
@keyframes pop { 0% { transform: scale(.97); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
.notice ul { margin: 8px 0 0; padding-left: 20px; color: var(--text); }
.notice .hint { margin-top: 6px; }
.contact-btns, .actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-btns .btn, .actions-row .btn { padding: 13px 8px; font-size: 15px; white-space: normal; min-width: 0; }
.contact-card .hint { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.my-item {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.my-item:first-child { border-top: 0; }
.my-item b { display: block; font-size: 15px; }
.my-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; word-break: break-word; }
.slot-msg { font-size: 14px; border-radius: 10px; padding: 10px 12px; margin: -2px 0 14px; }
.slot-msg.ok { background: var(--ok-soft); color: var(--ok); }
.slot-msg.bad { background: var(--danger-soft); color: var(--danger); }
.slot-msg .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.slot-msg .chip { border: 1px solid currentColor; background: var(--card); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }

/* ---------- 成功 / 状态页 ---------- */
.success { text-align: center; padding: 32px 20px; }
.success .big { font-size: 52px; }
.success h2 { justify-content: center; font-size: 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; white-space: pre-wrap; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.confirmed { background: var(--ok-soft); color: var(--ok); }
.badge.completed { background: var(--info-soft); color: var(--info); }
.badge.cancelled { background: var(--line); color: var(--muted); }
.badge.paid { background: var(--ok-soft); color: var(--ok); }
.badge.unpaid { background: var(--danger-soft); color: var(--danger); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--brand); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 14px; z-index: 100; box-shadow: var(--shadow); max-width: 90vw;
}
.row > *, .row3 > * { min-width: 0; }
.row, .row3 { align-items: end; } /* 字段名换行时，同一行的输入框仍然对齐 */
.row > .field, .row3 > .field { margin-bottom: 14px; } /* 同一行的字段下边距一致，底部才对得齐 */
input.input[type=date], input.input[type=time] { min-width: 0; min-height: 48px; }
