:root {
  color-scheme: only light;
  --orange: #f2820b;
  --orange-dark: #d96f04;
  --bg: #f7f4ef;
  --card: #ffffff;
  --text: #2d2a26;
  --muted: #8a8378;
  --line: #eee7dc;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[v-cloak] { display: none; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

#app { max-width: 720px; margin: 0 auto; padding-bottom: 32px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--orange); color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 18px; font-weight: 700; }
.mode-pill {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,.25);
}
.mode-pill.mock { background: rgba(0,0,0,.25); }

.tabs { display: flex; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button {
  flex: 1 0 auto; min-width: 62px; padding: 12px 8px; border: none; background: none;
  font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tabs button.active { color: var(--orange-dark); font-weight: 700; border-bottom: 2px solid var(--orange); }

.page { padding: 14px; }
.card {
  background: var(--card); border-radius: 14px; padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05); margin-bottom: 14px;
}

.field { margin-bottom: 12px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

input, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; font-family: inherit; background: #fff;
}
input:focus, textarea:focus { outline: none; border-color: var(--orange); }

.seg { display: flex; gap: 8px; }
.seg.wrap { flex-wrap: wrap; }
.seg button {
  flex: 1; padding: 9px 0; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.seg button.on { border-color: var(--orange); color: var(--orange-dark); font-weight: 700; background: #fff7ec; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button, .chips .tag {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 13px; color: var(--muted); cursor: pointer;
}
.chips button.on { border-color: var(--orange); color: var(--orange-dark); background: #fff7ec; font-weight: 600; }
.chips.static .tag { color: var(--orange-dark); background: #fff7ec; border-color: #ffd9a8; cursor: default; }

button.primary {
  width: 100%; padding: 13px 0; margin-top: 4px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
button.primary:disabled { opacity: .6; }
button.primary.ghost { background: #fff; color: var(--orange-dark); border: 1px solid var(--orange); }

.error { color: #d93025; font-size: 13px; margin-top: 10px; }

.result h2 { font-size: 17px; margin-bottom: 4px; }
.result-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mock-badge { font-size: 12px; color: #b06000; background: #fff1d6; padding: 2px 8px; border-radius: 6px; }
.result h3 { font-size: 14px; color: var(--orange-dark); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }

.hooks { list-style: none; }
.hooks li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}

button.mini {
  border: 1px solid var(--orange); background: #fff; color: var(--orange-dark);
  font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer; flex-shrink: 0;
}

.script-text { white-space: pre-wrap; line-height: 1.7; font-size: 14.5px; }

table.board { width: 100%; border-collapse: collapse; font-size: 13px; }
.board th, .board td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.board th { color: var(--muted); font-weight: 600; white-space: nowrap; }

.tip { margin-top: 14px; font-size: 13px; color: var(--muted); background: #faf6ef; border-radius: 8px; padding: 10px; }
.actions { display: flex; gap: 10px; margin-top: 14px; }

.hint { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl { position: relative; padding: 14px; }
.tpl h3 { font-size: 15px; margin-bottom: 6px; }
.tpl p { font-size: 13px; color: var(--muted); }
.tpl .sub { margin-top: 6px; font-size: 12px; }
.tpl-tag {
  position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 6px;
}
.tpl-tag.P0 { background: #ffe3d0; color: #c2410c; }
.tpl-tag.P1 { background: #e0ecff; color: #1d4ed8; }

.footer { text-align: center; font-size: 12px; color: var(--muted); padding: 8px 0 24px; }

/* 使用指南 */
.guide-title { font-size: 16px; margin-bottom: 14px; }
.tutorial-link { display: block; color: var(--orange-dark); font-size: 14px; text-decoration: none; padding: 10px 0 4px; }
.steps { list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 18px 40px; font-size: 14px; line-height: 1.7; color: var(--text); }
.steps li:last-child { padding-bottom: 2px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); color: #fff;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 12px; top: 32px; bottom: 4px;
  width: 2px; background: #ffd9a8;
}
.steps b { display: block; margin-bottom: 2px; }

.faq { border-bottom: 1px dashed var(--line); padding: 10px 0; }
.faq:last-child { border-bottom: none; }
.faq summary { font-weight: 600; font-size: 14px; cursor: pointer; }
.faq p { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.7; }

/* ============ AI 图文海报 ============ */
.poster-wrap { display: flex; justify-content: center; padding: 6px 0 2px; }
.poster {
  width: 320px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.poster.moments { aspect-ratio: 3 / 4; }
.poster.main { aspect-ratio: 1 / 1; width: 340px; }

.p-top {
  font-size: 12px; letter-spacing: 1px; opacity: .85;
  border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 8px;
}
.p-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.p-emoji { font-size: 40px; text-align: center; margin-bottom: 6px; }
.p-title { font-size: 30px; font-weight: 800; text-align: center; line-height: 1.25; letter-spacing: 2px; }
.p-sub { font-size: 13.5px; text-align: center; opacity: .9; margin-top: 8px; line-height: 1.5; }
.p-points { list-style: none; margin-top: 14px; }
.p-points li { font-size: 13.5px; line-height: 2; }
.p-price {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  border-radius: 10px; padding: 10px 12px; margin: 12px 0 8px;
}
.p-num { font-size: 21px; font-weight: 800; }
.p-promo { font-size: 12.5px; padding: 2px 8px; border-radius: 999px; }
.p-foot { font-size: 11.5px; text-align: center; opacity: .75; letter-spacing: 1px; }

/* 丰收红橙：深橙渐变底、白字、金色价格条 */
.poster.t-harvest {
  background: linear-gradient(160deg, #f2820b 0%, #e05e02 55%, #b34700 100%);
  color: #fff;
}
.poster.t-harvest .p-price { background: rgba(255,255,255,.14); }
.poster.t-harvest .p-promo { background: #ffe3c2; color: #a34700; }

/* 清新果园：奶油底、深绿字、橙色价格条 */
.poster.t-fresh {
  background: linear-gradient(165deg, #fdf8ee 0%, #f2ead6 60%, #e8f3dd 100%);
  color: #24491f;
}
.poster.t-fresh .p-top { border-bottom-color: rgba(36,73,31,.2); }
.poster.t-fresh .p-price { background: #f2820b; color: #fff; }
.poster.t-fresh .p-num { color: #fff; }
.poster.t-fresh .p-promo { background: #fff; color: #c2410c; }

/* 实拍背景海报：照片打底 + 深色渐变保证文字可读 */
.bg-picker { display: flex; gap: 8px; align-items: center; }
.bg-picker button {
  width: 54px; height: 54px; border-radius: 10px; border: 2px solid var(--line);
  background-size: cover; background-position: center; cursor: pointer; padding: 0;
}
.bg-picker button.on { border-color: #fff; outline: 2px solid var(--orange); }
.bg-picker button.plain { width: auto; padding: 0 12px; background: #fff7ec; font-size: 12px; color: #c2410c; }
.bg-picker button.plain.on { outline: 2px solid var(--orange); border-color: #fff7ec; }
.bg-custom { position: relative; }
.bg-del {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px;
  background: #e5484d; color: #fff; border-radius: 50%; font-size: 15px;
  line-height: 22px; text-align: center; display: block;
}
.bg-add {
  width: 54px; height: 54px; border: 1.5px dashed var(--orange); border-radius: 10px;
  color: var(--orange-dark); font-size: 15px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; flex-shrink: 0;
}
.poster.t-photo-custom { color: #fff; }
.poster.t-photo-custom .p-price { background: rgba(255,255,255,.16); }
.poster.t-photo-custom .p-promo { background: #ffe3c2; color: #a34700; }
.poster.t-photo-custom .p-top { border-bottom-color: rgba(255,255,255,.35); }

.poster.t-photo-1 { background-image: linear-gradient(rgba(24,10,0,.42), rgba(24,10,0,.66)), url('img/orchard-tree.jpg'); color: #fff; }
.poster.t-photo-2 { background-image: linear-gradient(rgba(24,10,0,.42), rgba(24,10,0,.66)), url('img/orchard-baskets.jpg'); color: #fff; }
.poster.t-photo-3 { background-image: linear-gradient(rgba(24,10,0,.42), rgba(24,10,0,.66)), url('img/orchard-branch.jpg'); color: #fff; }
.poster.t-photo-4 { background-image: linear-gradient(rgba(24,10,0,.42), rgba(24,10,0,.66)), url('img/orchard-closeup.jpg'); color: #fff; }
.poster.t-photo-1, .poster.t-photo-2, .poster.t-photo-3, .poster.t-photo-4 { background-size: cover; background-position: center; }
.poster.t-photo-1 .p-price, .poster.t-photo-2 .p-price, .poster.t-photo-3 .p-price, .poster.t-photo-4 .p-price { background: rgba(255,255,255,.16); }
.poster.t-photo-1 .p-promo, .poster.t-photo-2 .p-promo, .poster.t-photo-3 .p-promo, .poster.t-photo-4 .p-promo { background: #ffe3c2; color: #a34700; }
.poster.t-photo-1 .p-top, .poster.t-photo-2 .p-top, .poster.t-photo-3 .p-top, .poster.t-photo-4 .p-top { border-bottom-color: rgba(255,255,255,.35); }

.tpl-img { height: 88px; border-radius: 10px; background-size: cover; background-position: center; margin-bottom: 10px; background-color: #f5ede1; }

/* ============ 科技片头 ============ */
.intro-preview { display: flex; justify-content: center; margin: 8px 0 14px; }
.intro-preview canvas {
  width: 250px; border-radius: 14px; background: #04101e;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
}
.qr-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text); font-size: 14px; }
.qr-toggle input { width: auto; margin: 0; }

.poster { position: relative; }
.p-qr {
  position: absolute; right: 10px; bottom: 10px; width: 74px; height: 74px;
  background: #fff; padding: 5px; border-radius: 8px;
}

/* ============ 我的（套餐） ============ */
.mine-card { text-align: center; padding: 22px 16px; }
.plan-badge {
  display: inline-block; font-size: 18px; font-weight: 800; padding: 8px 26px;
  border-radius: 999px; margin-bottom: 12px;
}
.plan-badge.free { background: #f0ece4; color: #8a8378; }
.plan-badge.basic { background: #fff1d6; color: #c05600; }
.plan-badge.pro { background: linear-gradient(135deg, #1f3a63, #2f5fa3); color: #fff; }
.quota-line { font-size: 15px; }
.quota-line b { font-size: 22px; color: var(--orange-dark); }
.muted { color: var(--muted); font-size: 13px; margin-top: 6px; }
.ok-msg { color: #0a7d32; font-size: 14px; margin-top: 10px; line-height: 1.6; }

.pay-box { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.pay-qr { width: 140px; height: 140px; border-radius: 12px; border: 1px solid var(--line); flex-shrink: 0; }
.pay-steps { font-size: 13.5px; line-height: 2; color: var(--text); }

.style-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
