/* ============================================================
   皮皮的小铺子 —— 收图 H5（移动优先）
   品牌视觉令牌：
     背景 #FBF6EF / 卡片白底 + 描边 #E7D2BF
     主色（焦糖棕）#C98A5E / 文字（深棕）#6E4329
     标题字体：站酷快乐体 ZCOOLKuaiLe
     圆角 14–16px；手帐线描小涂鸦只点缀边角
   ============================================================ */

@font-face {
  font-family: "ZCOOLKuaiLe";
  src: url("./assets/fonts/ZCOOLKuaiLe-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FBF6EF;
  --card: #FFFFFF;
  --border: #E7D2BF;
  --brand: #C98A5E;            /* 焦糖棕 */
  --brand-deep: #B0703F;       /* 焦糖棕加深，用于按下/边框强调 */
  --ink: #6E4329;              /* 深棕文字 */
  --ink-soft: #9A7A60;         /* 次级文字 */
  --ink-faint: #B9A48F;        /* 占位/极淡 */
  --privacy-bg: #EAF3E6;       /* 隐私条浅绿 */
  --privacy-ink: #4C6B3F;
  --chip-bg: #FBEFE3;
  --chip-ink: #A86B41;
  --ok: #5FA463;
  --danger: #C25B4A;
  --radius: 16px;
  --radius-sm: 14px;
  --shadow: 0 6px 18px rgba(110, 67, 41, 0.08);
  --shadow-soft: 0 2px 8px rgba(110, 67, 41, 0.06);
  --maxw: 480px;
  --bottombar-h: 76px;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.title-font {
  font-family: "ZCOOLKuaiLe", -apple-system, "PingFang SC", sans-serif;
  font-weight: normal;
  letter-spacing: 0.5px;
}

img { display: block; max-width: 100%; }

/* ── 通用布局 ───────────────────────────────────── */
.page { padding: 16px 16px 24px; }
.page--picker { padding-bottom: calc(var(--bottombar-h) + 24px); }

.section { margin: 22px 0; }
.section-title {
  font-size: 19px;
  margin: 0 0 10px;
  color: var(--ink);
}

.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }

/* ── 卡片 ───────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

/* ── 按钮 ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(201, 138, 94, 0.32);
}
.btn-primary:active { background: var(--brand-deep); }

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--border);
}
.btn-soft {
  background: var(--chip-bg);
  color: var(--chip-ink);
  border-color: var(--border);
}
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 16px 20px; font-size: 17px; }
.btn-sm { padding: 8px 12px; font-size: 14px; border-radius: 12px; }

/* ── 输入 ───────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}
.input, .textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(201, 138, 94, 0.14);
}
.textarea { resize: vertical; min-height: 78px; line-height: 1.5; }
.input.invalid, .textarea.invalid { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12px; margin-top: 5px; }

/* ── chips ──────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.chip {
  font: inherit;
  font-size: 13px;
  background: var(--chip-bg);
  color: var(--chip-ink);
  border: 1px dashed var(--brand);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease;
}
.chip:active { transform: scale(0.96); background: #f6e2cf; }

/* ── 隐私条 ──────────────────────────────────────── */
.privacy {
  background: var(--privacy-bg);
  color: var(--privacy-ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.privacy .ico { flex: none; font-size: 16px; line-height: 1.5; }

/* ── 首页品牌头 ─────────────────────────────────── */
.brand-head {
  text-align: center;
  padding: 28px 8px 14px;
  position: relative;
}
.brand-logo {
  font-size: 34px;
  margin: 0 0 4px;
  color: var(--ink);
}
.brand-slogan { font-size: 15px; color: var(--brand-deep); margin: 0; }
/* 边角小涂鸦 */
.brand-head::before,
.brand-head::after {
  content: "";
  position: absolute;
  width: 40px; height: 40px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  opacity: 0.18;
}
.brand-head::before { left: 6px; top: 14px; border-style: dashed; }
.brand-head::after {
  right: 8px; bottom: 6px;
  border-radius: 60% 40% 50% 50%;
  transform: rotate(18deg);
}

/* ── 成品轮播 ─────────────────────────────────────── */
.carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-item {
  flex: 0 0 auto;
  width: 72%;
  scroll-snap-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.carousel-item img { width: 100%; height: 180px; object-fit: cover; }

/* ── 模板大按钮 ─────────────────────────────────── */
.plan {
  position: relative;
  text-align: left;
  padding: 18px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  width: 100%;
  cursor: pointer;
  margin-bottom: 14px;
  transition: transform 0.06s ease, box-shadow 0.15s ease;
}
.plan:active { transform: scale(0.99); }
.plan--reco { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan-badge {
  position: absolute;
  top: -10px; right: 14px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
}
.plan-title { font-size: 19px; margin: 0 0 4px; color: var(--ink); }
.plan-sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 8px; }
.plan-price { font-size: 15px; color: var(--brand-deep); font-weight: 600; }
.plan-cta { margin-top: 10px; font-size: 14px; color: var(--brand); }

/* ── 流程步骤 ─────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.step { text-align: center; }
.step-no {
  width: 34px; height: 34px; line-height: 34px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--chip-bg);
  color: var(--chip-ink);
  font-size: 15px;
}
.step-label { font-size: 12.5px; color: var(--ink-soft); }

/* 对比 / 口碑 */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare figure { margin: 0; }
.compare img { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.compare figcaption { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }
.compare-fallback {
  height: 150px; border-radius: 12px; border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-size: 13px; background: #fff;
}
.quote {
  background: var(--chip-bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--border);
}
.quote .who { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink-soft); }

/* 页脚 */
.foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}
.foot a, .linklike {
  color: var(--brand-deep);
  text-decoration: underline;
  cursor: pointer;
  background: none; border: none; font: inherit; padding: 0;
}

/* ── 选模板确认页 ───────────────────────────────── */
.confirm-list { margin: 12px 0; padding: 0; list-style: none; }
.confirm-list li {
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  display: flex; gap: 10px;
}
.confirm-list li:last-child { border-bottom: none; }
.confirm-list .k { flex: none; color: var(--brand); }

/* ── 选图页：顶部固定提示 ───────────────────────── */
.picker-hint {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 246, 239, 0.94);
  backdrop-filter: blur(6px);
  margin: -16px -16px 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--ink);
}

/* ── 月份分隔 ─────────────────────────────────────── */
.month-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 2px 4px;
  color: var(--ink-faint);
  font-size: 12px;
}
.month-divider::before,
.month-divider::after {
  content: ""; flex: 1; height: 0;
  border-top: 2px dashed var(--border);
}

/* ── MonthBlock ─────────────────────────────────── */
.mb {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  margin-bottom: 6px;
}
.mb-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.mb-month { font-size: 20px; color: var(--ink); }
.mb-count {
  font-size: 13px;
  color: var(--ink-soft);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 2px 10px;
}
.mb-count.done { color: var(--ok); }

.mb-sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 8px; }

/* 展示区 */
.mb-sample { margin-bottom: 12px; }
.mb-sample-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fbf2ea;
  position: relative;
}
.mb-sample-frame img { width: 100%; height: 168px; object-fit: cover; cursor: zoom-in; }
.mb-sample-ph {
  height: 120px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-faint); font-size: 13px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fff;
}
.mb-tabs { display: flex; gap: 6px; margin-bottom: 6px; }
.mb-tab {
  font: inherit; font-size: 12.5px;
  border: 1px solid var(--border);
  background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.mb-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.mb-sample-cap { text-align: center; font-size: 12px; color: var(--ink-faint); margin-top: 5px; }

/* 上传区 */
.mb-uploads { display: flex; gap: 10px; }
.mb-uploads.single { display: block; }
.up-slot { flex: 1; }
.up-slot.single { width: 100%; }
.up-box {
  border: 1.5px dashed var(--brand);
  border-radius: 12px;
  background: var(--chip-bg);
  min-height: 96px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.up-box .up-ico { font-size: 22px; margin-bottom: 4px; }
.up-box .up-label { font-size: 13px; color: var(--chip-ink); }
.up-box .up-hint { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.up-box.has-img { border-style: solid; border-color: var(--ok); padding: 0; background: #fff; }
.up-box.has-img img { width: 100%; height: 110px; object-fit: cover; }
.up-box .up-spin { font-size: 13px; color: var(--brand-deep); }
.up-check {
  position: absolute; top: 6px; left: 6px;
  background: var(--ok); color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.up-replace {
  position: absolute; right: 6px; bottom: 6px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  color: var(--ink); font: inherit; font-size: 12px;
  border-radius: 999px; padding: 3px 10px; cursor: pointer;
}
.hidden-file { display: none; }

/* 描述区 */
.mb-desc { margin-top: 12px; }
.mb-desc .examples {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--chip-bg);
  border-radius: 12px;
  padding: 8px 12px;
}
.mb-desc .ex-toggle { color: var(--brand-deep); cursor: pointer; font-size: 13px; }
.mb-desc-note { font-size: 11.5px; color: var(--ink-faint); margin-top: 6px; }

/* ── 固定底部栏 ─────────────────────────────────── */
.bottombar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  max-width: var(--maxw);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 -4px 16px rgba(110, 67, 41, 0.08);
}
.bottombar .progress { flex: 1; }
.bottombar .progress .num { font-size: 15px; color: var(--ink); }
.bottombar .progress .bar {
  height: 6px; border-radius: 999px; background: var(--chip-bg);
  margin-top: 5px; overflow: hidden;
}
.bottombar .progress .bar i {
  display: block; height: 100%; background: var(--brand);
  border-radius: 999px; transition: width 0.3s ease;
}
.bottombar .btn { flex: none; }

/* ── 弹层 / 模态 ─────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(60, 38, 22, 0.42);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal {
  background: var(--bg);
  width: 100%; max-width: var(--maxw);
  border-radius: 18px 18px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
  animation: slideUp 0.22s ease;
}
@keyframes slideUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
.modal h3 { margin: 0 0 4px; font-size: 20px; }
.modal .modal-sub { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

/* 图片放大查看 */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(20, 12, 6, 0.9);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; object-fit: contain; cursor: zoom-out; }

/* ── 成功页 ─────────────────────────────────────── */
.success-wrap { text-align: center; padding: 48px 20px; }
.success-emoji { font-size: 56px; margin-bottom: 12px; }
.success-title { font-size: 26px; margin: 0 0 10px; }
.success-text { color: var(--ink-soft); font-size: 15px; margin: 0 0 24px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottombar-h) + 24px);
  transform: translateX(-50%);
  z-index: 90;
  background: var(--ink);
  color: #fff; font-size: 14px;
  padding: 10px 16px; border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: 86%;
}

/* 通用动效淡入 */
.fade-enter-active, .fade-leave-active { transition: opacity 0.2s ease; }
.fade-enter-from, .fade-leave-to { opacity: 0; }
