/* ================= 提货端样式 ================= */
:root {
  --brand: #b8232b;
  --brand-dark: #8e1a20;
  --brand-soft: #fbeceb;
  --gold: #c9a227;
  --gold-light: #e8c86a;
  --bg: #fdfaf6;
  --card: #ffffff;
  --text: #35251b;
  --text-2: #6b5748;
  --muted: #9c8a7c;
  --line: #f0e4d6;
  --ok: #1f9d55;
  --warn: #d98324;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(120, 72, 40, 0.08);
  --shadow-lg: 0 18px 50px rgba(120, 72, 40, 0.14);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(201, 162, 39, 0.10), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(184, 35, 43, 0.09), transparent 38%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
}

/* ---------- 头部 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(253, 250, 246, 0.88);
  border-bottom: 1px solid rgba(240, 228, 214, 0.9);
}
.topbar-inner {
  max-width: 640px; margin: 0 auto; padding: 12px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center; font-size: 17px;
  box-shadow: 0 4px 12px rgba(184, 35, 43, 0.3);
}
.brand-name {
  font-family: var(--font-serif);
  font-size: 19px; font-weight: 700; letter-spacing: 2px; color: var(--brand-dark);
}
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-top: -4px; }
.tel {
  font-size: 12px; color: var(--text-2); text-decoration: none;
  border: 1px solid var(--line); padding: 6px 11px; border-radius: 999px;
  background: #fff; white-space: nowrap;
}
.tel b { color: var(--brand); }

/* ---------- 容器 ---------- */
.wrap { max-width: 640px; margin: 0 auto; padding: 18px 16px 40px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #b8232b 0%, #9d1c23 45%, #7d1419 100%);
  border-radius: 22px; padding: 26px 22px 22px; color: #fff;
  box-shadow: 0 16px 40px rgba(140, 24, 30, 0.28);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 88% 15%, rgba(232, 200, 106, 0.30), transparent 45%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 16px);
  pointer-events: none;
}
.hero-brand { font-family: var(--font-serif); font-size: 26px; font-weight: 700; letter-spacing: 4px; margin: 0 0 6px; }
.hero-slogan { font-size: 13px; color: rgba(255, 255, 255, 0.82); margin: 0 0 18px; letter-spacing: 1px; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }
.chip {
  font-size: 11.5px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(232, 200, 106, 0.4);
  color: #f6e6c2; letter-spacing: .5px;
}
.hero-crab { position: absolute; right: 14px; bottom: -6px; font-size: 74px; opacity: .16; filter: grayscale(1); }

/* ---------- 切换标签 ---------- */
.tabs {
  display: flex; gap: 6px; background: #f4ece2; border-radius: 12px; padding: 5px; margin: 18px 0 14px;
}
.tab {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 9px; font-size: 14px;
  color: var(--text-2); cursor: pointer; user-select: none; transition: all .22s; font-weight: 500;
}
.tab.active { background: #fff; color: var(--brand); box-shadow: 0 2px 10px rgba(120, 72, 40, 0.10); font-weight: 600; }

/* ---------- 卡片 ---------- */
.panel {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid rgba(240, 228, 214, 0.8);
  padding: 20px 18px; margin-bottom: 16px;
}
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; margin: 0 0 4px; color: var(--text);
}
.panel-title::before {
  content: ""; width: 3px; height: 15px; border-radius: 2px;
  background: linear-gradient(var(--brand), var(--gold));
}
.panel-desc { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }

/* ---------- 步骤条 ---------- */
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.step { display: flex; align-items: center; gap: 7px; flex: 1; }
.step-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: #f1e8dd; color: #b6a496; transition: all .25s;
}
.step-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.step.active .step-dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px rgba(184, 35, 43, 0.12); }
.step.active .step-label { color: var(--brand); font-weight: 600; }
.step.done .step-dot { background: var(--gold); color: #fff; }
.step.done .step-label { color: var(--text-2); }
.step-line { flex: 1; height: 1px; background: var(--line); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field label .req { color: var(--brand); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--text);
  background: #fdfbf8; border: 1.5px solid var(--line); border-radius: 11px;
  transition: all .2s; outline: none;
}
.input::placeholder, .textarea::placeholder { color: #c3b4a6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(184, 35, 43, 0.08);
}
.input.mono { letter-spacing: 3px; font-size: 17px; font-weight: 600; }
.textarea { resize: vertical; min-height: 68px; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239c8a7c' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

.scan-tip {
  margin: 8px 0 0; padding: 8px 10px; font-size: 12px; line-height: 1.5;
  color: var(--ok); background: rgba(31, 157, 85, 0.08);
  border: 1px solid rgba(31, 157, 85, 0.22); border-radius: 8px;
  word-break: break-all;
}

.btn {
  display: block; width: 100%; padding: 14px; font-size: 16px; font-weight: 600;
  font-family: inherit; color: #fff; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 8px 20px rgba(184, 35, 43, 0.24); transition: all .2s;
  letter-spacing: 2px;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(184, 35, 43, 0.3); }
.btn:active { transform: translateY(0) scale(.995); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost {
  background: #fff; color: var(--brand); border: 1.5px solid var(--line);
  box-shadow: none; font-weight: 500; letter-spacing: 1px;
}
.btn.ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-sm { padding: 10px; font-size: 14px; }

/* ---------- 套餐卡 ---------- */
.pkg-card {
  border: 1px solid var(--line); border-radius: 13px; padding: 14px;
  background: linear-gradient(160deg, #fffdfa, #fdf7ef); position: relative; overflow: hidden;
}
.pkg-card::before {
  content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px;
  border-radius: 50%; background: rgba(201, 162, 39, 0.08);
}
.pkg-name { font-family: var(--font-serif); font-size: 18px; font-weight: 700; color: var(--brand-dark); letter-spacing: 1px; }
.pkg-spec { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.pkg-content { font-size: 12px; color: var(--muted); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pkg-meta { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pkg-tag {
  font-size: 11px; color: var(--brand); background: var(--brand-soft);
  padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(184, 35, 43, 0.12);
}

/* ---------- 成功页 ---------- */
.result { text-align: center; padding: 8px 0 4px; }
.result-icon {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(135deg, #eaf7ee, #d6f0e0); display: grid; place-items: center;
  animation: pop .5s cubic-bezier(.2, .9, .3, 1.3);
}
.result-icon svg { width: 30px; height: 30px; stroke: var(--ok); }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.result-title { font-family: var(--font-serif); font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.result-sub { font-size: 13px; color: var(--muted); margin: 0 0 18px; }

.kv-list { text-align: left; border-top: 1px dashed var(--line); padding-top: 14px; margin-bottom: 18px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 13.5px; }
.kv .k { color: var(--muted); flex: 0 0 auto; }
.kv .v { color: var(--text); text-align: right; word-break: break-all; font-weight: 500; }
.kv .v.hl { color: var(--brand); font-family: ui-monospace, Menlo, monospace; letter-spacing: .5px; }

/* ---------- 订单状态时间线 ---------- */
.timeline { display: flex; justify-content: space-between; margin: 16px 0 6px; position: relative; }
.timeline::before {
  content: ""; position: absolute; top: 9px; left: 14px; right: 14px; height: 2px; background: var(--line);
}
.tl-item { position: relative; z-index: 1; text-align: center; flex: 1; }
.tl-dot {
  width: 20px; height: 20px; border-radius: 50%; margin: 0 auto 6px;
  background: #fff; border: 2px solid var(--line); display: grid; place-items: center;
  font-size: 10px; color: transparent;
}
.tl-item.on .tl-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.tl-item.on .tl-dot::after { content: "✓"; color: #fff; font-size: 10px; }
.tl-label { font-size: 11.5px; color: var(--muted); }
.tl-item.on .tl-label { color: var(--brand); font-weight: 600; }

/* ---------- 须知 ---------- */
.notice { font-size: 12.5px; color: var(--text-2); line-height: 1.9; white-space: pre-wrap; }
.notice-wrap { background: #fffdf9; border: 1px dashed var(--line); border-radius: 12px; padding: 14px 16px; }

.footer { text-align: center; font-size: 11.5px; color: var(--muted); padding: 10px 0 0; line-height: 2; }
.footer a { color: var(--brand); text-decoration: none; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; top: 76px; transform: translate(-50%, -14px);
  background: rgba(53, 37, 27, 0.93); color: #fff; font-size: 13.5px;
  padding: 10px 18px; border-radius: 10px; z-index: 100; opacity: 0; pointer-events: none;
  transition: all .28s; max-width: 86vw; text-align: center; line-height: 1.5;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: rgba(184, 35, 43, 0.95); }

/* ---------- 加载遮罩 ---------- */
.loading-mask {
  position: fixed; inset: 0; background: rgba(253, 250, 246, 0.72); z-index: 90;
  display: none; place-items: center; backdrop-filter: blur(2px);
}
.loading-mask.show { display: grid; }
.spinner {
  width: 34px; height: 34px; border: 3px solid rgba(184, 35, 43, 0.18);
  border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

@media (max-width: 380px) {
  .hero-brand { font-size: 22px; }
  .steps .step-label { display: none; }
}
