/* GoziShop 網站引擎（WL06／WL11 共用）：平台頁（銷售、開始）與表單編輯器。前半段（按鈕、平台頁首頁尾、銷售頁、開始頁、表單）沿用 WL07 styles.css，
   GoziShop 品牌色：果紅 #D73F3A、梗綠 #3F8F5B、深色 #1D1F23。沒有行內 style、沒有外部字型。商家公開網站的樣式在 site.css。 */
:root {
  --red: #D73F3A; --red-dark: #B8322E; --green: #3F8F5B; --ink: #1D1F23; --ink-2: #3A3D44;
  --bg: #F7F5F1; --surface: #FFFFFF; --line: #E7E2DA; --line-2: #F0ECE6; --muted: #6B6F76;
  --accent: #D73F3A; --accent-soft: #FBEDEC;
  --warn: #A86A12; --warn-soft: #FAF1E2; --ok: #2F7D4D; --ok-soft: #E8F3EC; --danger: #B8322E; --danger-soft: #FBEDEC;
  --radius: 16px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(29,31,35,.04), 0 8px 24px rgba(29,31,35,.06);
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: .01em; }
p { margin: 0 0 .8em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 20px; }
.narrow { width: min(760px, 100%); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .02em; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .14em; color: var(--accent); margin: 0 0 .4em; text-transform: uppercase; }
.link { color: var(--accent); text-decoration: none; font-weight: 600; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* ── 按鈕 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 42px; padding: .5em 1.1em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .95rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { border-color: #CFC8BE; background: #FCFBF9; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.92); background: var(--accent); }
.btn-light { background: rgba(255,255,255,.95); border-color: transparent; color: var(--ink); }
.btn-danger { color: var(--danger); border-color: #EBC9C7; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:empty { display: none; }
.btn-sm { min-height: 34px; padding: .3em .8em; font-size: .85rem; }
.btn-lg { min-height: 50px; padding: .7em 1.5em; font-size: 1.02rem; }
.btn-xl { min-height: 60px; padding: .8em 2.2em; font-size: 1.15rem; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ── 平台頁首／頁尾 ── */
.site-header { background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header-inner { display: flex; align-items: center; gap: 14px; min-height: 68px; }
.site-home .brand-logo { height: 40px; width: auto; }
.site-product { font-weight: 700; color: var(--ink-2); padding-left: 14px; border-left: 1px solid var(--line); }
.site-nav { margin-left: auto; display: flex; gap: 6px; min-width: 0; }
.site-nav a { white-space: nowrap; flex: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: .92rem; padding: .45em .8em; border-radius: 999px; color: var(--ink-2); }
.site-nav a:hover { background: var(--line-2); }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0; margin-top: 64px; color: var(--muted); font-size: .9rem; }
.footer-logo { height: 32px; width: auto; margin-bottom: 10px; }
.site-footer a { color: var(--ink-2); }

/* ── 銷售頁 ── */
.hero { padding: 64px 0 56px; background: radial-gradient(1100px 420px at 85% -10%, #FBE3E1 0, transparent 60%), radial-gradient(800px 380px at -10% 110%, #E3F1E8 0, transparent 60%); }
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: .01em; }
.hero .hl { color: var(--red); }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 34em; }
.hero .actions { margin: 26px 0 14px; }
.hero-note { color: var(--muted); font-size: .9rem; }
.hero-note a { color: var(--ink-2); }
.hero-mock { position: relative; padding: 0 40px 40px 0; }
.mock-browser { background: var(--surface); border-radius: 18px; box-shadow: 0 30px 60px rgba(29,31,35,.14), 0 2px 6px rgba(29,31,35,.06); overflow: hidden; border: 1px solid var(--line); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F3F0EB; font-size: .72rem; color: var(--muted); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #D9D3CA; }
.mock-bar span { margin-left: 8px; background: #fff; border-radius: 999px; padding: 2px 10px; }
.mock-store { padding: 16px; }
.mock-head { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.mock-logo { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.mock-cart { margin-left: auto; font-size: .8rem; background: var(--line-2); border-radius: 999px; padding: 2px 10px; }
.mock-banner { margin: 12px 0; border-radius: 12px; background: linear-gradient(120deg, #2F7D4D, #3F8F5B); color: #fff; padding: 14px 16px; display: flex; flex-direction: column; }
.mock-banner b { font-size: 1.05rem; }
.mock-banner span { font-size: .78rem; opacity: .9; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-tile { font-size: .72rem; display: flex; flex-direction: column; gap: 2px; }
.mock-tile span { color: var(--red); font-weight: 700; }
.mock-img { aspect-ratio: 1; border-radius: 10px; margin-bottom: 4px; }
.tone-a { background: linear-gradient(135deg, #F6C9A8, #E58A5C); }
.tone-b { background: linear-gradient(135deg, #FBE29A, #F2B33D); }
.tone-c { background: linear-gradient(135deg, #D8E8C9, #8DBA73); }
.mock-phone { position: absolute; right: 0; bottom: 0; width: 170px; border-radius: 26px; background: var(--ink); padding: 10px; box-shadow: 0 24px 48px rgba(29,31,35,.25); }
.mock-phone-screen { background: #fff; border-radius: 18px; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; font-size: .74rem; }
.mock-phone-screen b { font-size: .85rem; }
.mock-amount { font-size: 1rem; font-weight: 800; color: var(--ink); }
.mock-status { color: var(--green); font-weight: 700; }
.features { padding: 64px 0 24px; }
.features h2, .plans h2, .faq h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.feature-grid { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature-icon { font-size: 1.6rem; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--line-2); margin-bottom: 12px; }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.plans { padding: 64px 0 24px; }
.period-toggle { display: flex; justify-content: center; gap: 4px; margin: 22px auto 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; width: max-content; }
.period-toggle button { border: 0; background: transparent; font: 600 .95rem/1.2 var(--font); padding: .6em 1.3em; border-radius: 999px; cursor: pointer; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; }
.period-toggle button small { font-size: .7rem; font-weight: 600; color: var(--green); }
.period-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.period-toggle button[aria-pressed="true"] small { color: #9FD7B1; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); justify-content: center; gap: 22px; }
.plan-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px 28px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan-card.is-featured { border: 2px solid var(--red); }
.plan-ribbon { position: absolute; top: -13px; left: 28px; background: var(--red); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.plan-card h3 { font-size: 1.4rem; margin: 0; }
.plan-tagline { color: var(--muted); }
.plan-price { margin: 8px 0 0; display: flex; align-items: baseline; gap: 4px; }
.plan-price small { font-weight: 700; color: var(--ink-2); }
.plan-price strong { font-size: 2.8rem; font-weight: 800; line-height: 1; }
.plan-price span { color: var(--muted); }
.plan-sub { color: var(--green); font-weight: 600; font-size: .9rem; min-height: 1.5em; }
.checks { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 10px; flex: 1; }
.checks li { padding-left: 28px; position: relative; color: var(--ink-2); }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-size: .75rem; font-weight: 800; display: grid; place-items: center; margin-top: 3px; }
.redeem { margin: 36px auto 0; max-width: 820px; background: var(--surface); border: 1px dashed #D3CBC0; border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.redeem h3 { font-size: 1.15rem; margin: 0 0 .3em; }
.redeem p { color: var(--muted); font-size: .92rem; margin: 0; }
.redeem-form { display: flex; gap: 8px; }
.redeem-form input { flex: 1; }
.redeem .form-message { grid-column: 1 / -1; }
.already { margin-top: 22px; color: var(--muted); }
.already a { color: var(--ink-2); font-weight: 600; }
.faq { padding: 64px 0 0; }
.faq-list { margin-top: 24px; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq-answer { color: var(--ink-2); padding-bottom: 14px; }

/* ── 開始頁 ── */
.start { padding: 48px 0; }
.start-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 40px 32px; text-align: center; box-shadow: var(--shadow); }
.start-card h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.start-card .lead { color: var(--ink-2); }
.start-go { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 22px; }
.paid-banner { background: var(--ok-soft); color: var(--ok); font-weight: 700; border-radius: 999px; padding: .5em 1.2em; margin: 0; }
.start-orders { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.start-orders h2 { font-size: 1.05rem; }
.start-orders ul { list-style: none; margin: 0; padding: 0; }
.start-orders li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.start-orders li small { display: block; color: var(--muted); font-size: .78rem; }
.start-orders li a { flex-basis: 100%; color: var(--red); font-weight: 600; }

/* ── 表單 ── */
input, select, textarea { font: inherit; color: inherit; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .field-label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.field small, .logo-field small { color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea, .inline-form input, .redeem-form input, .list-toolbar input, .list-toolbar select, .opt-row input, .cat-list input, .fee input, .last5 input {
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .62em .8em; background: #fff; min-height: 44px; width: 100%; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[readonly] { background: var(--line-2); color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.group { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px 4px; margin: 0 0 16px; }
.group legend { font-weight: 700; padding: 0 6px; font-size: .95rem; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #D6D0C7; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:disabled { opacity: .5; cursor: not-allowed; }
.form-message { padding: .6em .9em; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: .92rem; margin: 10px 0; }
.form-message.is-error { background: var(--danger-soft); color: var(--danger); }
.form-message a { color: inherit; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 180px; }
.theme-picker { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.theme-picker legend { font-weight: 600; font-size: .9rem; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: .4em .9em .4em .45em; cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff; }
.swatch i { width: 22px; height: 22px; border-radius: 50%; display: block; }
.swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.swatch input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.swatch-red i { background: #D73F3A; } .swatch-green i { background: #3F8F5B; } .swatch-ocean i { background: #2E6A9E; }
.swatch-amber i { background: #A86A12; } .swatch-plum i { background: #7B4B94; } .swatch-ink i { background: #1D1F23; }
.logo-field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.logo-row { display: flex; align-items: center; gap: 12px; }
.logo-preview { width: 64px; height: 64px; border-radius: 16px; background: var(--line-2); overflow: hidden; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; color: var(--muted); border: 1px solid var(--line); }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }

.badge { background: var(--red); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; }
.notice { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.notice h2 { font-size: 1.1rem; margin-bottom: .2em; }
.notice p { margin: 0 0 .3em; color: var(--ink-2); }
.notice-warn { background: var(--warn-soft); border-color: #EBD7B5; }
.notice-danger { background: var(--danger-soft); border-color: #EBC9C7; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7em 1.2em; border-radius: 999px; font-weight: 600; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast a { color: #FFD9D6; margin-left: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7em 1.2em; border-radius: 999px; font-weight: 600; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.toast a { color: #FFD9D6; margin-left: 8px; }

/* ══ WL06 新增 ══════════════════════════════════════════════════════════════ */
/* 銷售頁：單一方案卡、頁面類型、示範畫面 */
.plans .plan-card { max-width: 460px; margin: 0 auto 8px; }
.types { padding: 56px 0 8px; }
.type-list { list-style: none; padding: 0; margin: 24px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 980px; }
.type-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; grid-template-columns: 40px 1fr; gap: 2px 12px; align-items: start; }
.type-list li > span { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; background: #E8F1EB; color: var(--green); display: grid; place-items: center; font-size: 1.2rem; }
.type-list small { color: var(--muted); }
.mock-site { padding: 14px; }
.mock-site .mock-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; border-bottom: 1px solid var(--line-2); padding-bottom: 10px; }
.mock-site .mock-logo { width: 26px; height: 26px; border-radius: 50%; background: #365B48; color: #fff; display: grid; place-items: center; font-size: .8rem; }
.mock-nav { margin-left: auto; display: flex; gap: 8px; color: var(--muted); font-size: .7rem; }
.mock-nav em { font-style: normal; }
.mock-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; padding: 14px 0; }
.mock-hero small { display: block; color: #365B48; font-size: .62rem; letter-spacing: .1em; }
.mock-hero b { display: block; font-size: 1.05rem; line-height: 1.35; margin: 4px 0 10px; color: #253A35; }
.mock-hero img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; }
.mock-btn { display: inline-block; background: #365B48; color: #fff; border-radius: 6px; font-size: .68rem; padding: 5px 10px; }
.mock-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mock-cards span { background: #EDF0E7; border-radius: 8px; padding: 10px 6px; font-size: .64rem; color: #253A35; text-align: center; }
.hero-mock .mock-phone { position: absolute; right: 0; bottom: 0; width: 160px; background: var(--ink); border-radius: 22px; padding: 10px; box-shadow: 0 20px 40px rgba(29,31,35,.25); }
.mock-phone-screen { background: #fff; border-radius: 14px; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; font-size: .74rem; }
.mock-phone-screen .mock-status { color: var(--red); font-weight: 700; }

/* 編輯器外殼（照 WL07 後台：左側選單、上方標題，手機變成上方橫向選單） */
.is-editor { background: #F3F1EC; }
.ed { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--surface) 249px, var(--line) 249px, var(--line) 250px, transparent 250px); }
.ed-side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.ed-brand .brand-logo { height: 38px; width: auto; margin: 0 6px 10px; }
.ed-site { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--line-2); margin: 0 0 8px; }
.ed-site strong { font-size: 1rem; }
.ed-site .chip { align-self: flex-start; }
.ed-nav { display: flex; flex-direction: column; gap: 2px; }
.ed-nav a { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: .55em .8em; border-radius: 10px; font-weight: 600; color: var(--ink-2); }
.ed-nav a:hover { background: var(--line-2); }
.ed-nav a[aria-current="page"] { background: #E8F1EB; color: var(--green); }
.ed-nav a small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: .72rem; }
.ed-nav .badge { margin-left: auto; }
.side-page span { width: 22px; text-align: center; color: var(--muted); }
.side-title { margin: 12px 10px 4px; font-size: .75rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.ed-view { margin-top: 10px; text-decoration: none; font-weight: 700; color: var(--green); padding: .55em .8em; }
.ed-side-link { margin-top: auto; color: var(--muted); font-size: .88rem; padding: .4em .8em; }
.ed-main { min-width: 0; }
.ed-top { display: flex; align-items: center; gap: 12px; padding: 22px 28px 14px; }
.ed-top h1 { font-size: 1.4rem; margin: 0; }
.ed-top-brand { display: none; }
.ed-top-brand .brand-mark { width: 32px; height: 32px; }
.ed-top-status { margin-left: auto; }
.ed > .ed-main > .notice { margin: 0 28px 16px; }
.ed-content { padding: 0 28px 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 18px; box-shadow: 0 1px 2px rgba(29,31,35,.03); }
.card h2 { font-size: 1.15rem; }
.card.group { padding: 18px 22px 8px; }
.card.group legend { font-size: 1.02rem; background: var(--surface); border-radius: 8px; padding: 2px 8px; }
.chip { display: inline-flex; align-items: center; border-radius: 999px; padding: .15em .7em; font-size: .75rem; font-weight: 700; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.page-list { list-style: none; padding: 0; margin: 10px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.page-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #FDFCFA; }
.page-icon { width: 40px; height: 40px; border-radius: 10px; background: #E8F1EB; color: var(--green); display: grid; place-items: center; font-size: 1.1rem; }
.page-info a { text-decoration: none; }
.page-info small { display: block; color: var(--muted); font-size: .8rem; }
.page-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: 700 .9rem/1 var(--font); color: var(--ink-2); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.danger { color: var(--danger); }
.add-page p { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.add-page small { color: var(--muted); }
.type-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.type-btn { text-align: left; border: 1px dashed #CFC8BE; border-radius: 12px; background: #fff; padding: 10px 12px; cursor: pointer; font: inherit; display: grid; grid-template-columns: 22px 1fr; gap: 0 8px; }
.type-btn:hover:not(:disabled) { border-color: var(--green); background: #F4F9F5; }
.type-btn:disabled { opacity: .45; cursor: not-allowed; }
.type-btn span { grid-row: span 2; color: var(--green); }
.type-btn small { color: var(--muted); font-size: .74rem; line-height: 1.4; }
.publish-card .path-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.publish-card .path-input span { padding: 0 4px 0 12px; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.publish-card .path-input input { border: 0; min-height: 44px; padding: .6em .6em .6em 0; flex: 1; min-width: 0; }
.publish-card .path-input input:focus { box-shadow: none; }
.publish-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.publish-card a { color: var(--green); font-weight: 600; word-break: break-all; }
.publish-card .qr-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4em .8em; margin: .2em 0 .8em; }
.publish-card .qr-row small { flex: 1 1 12em; }
.warn-text { color: var(--warn); font-weight: 600; }
.help { color: var(--muted); font-size: .8rem; }
.field-label { display: flex; align-items: baseline; gap: 8px; }
.field-label .count { margin-left: auto; font-weight: 500; }
.req { font-size: .7rem; color: var(--red); background: #FBEDEC; border-radius: 6px; padding: 0 6px; }
.field-check label, label.field-check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.field-check input { width: 18px; height: 18px; min-height: 0; }
.guide { background: #F4F9F5; border-radius: 10px; padding: 10px 12px; color: var(--ink-2); font-size: .9rem; }
.guide span { margin-right: 6px; }
.choice-group { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.choice-group legend { margin-bottom: 8px; padding: 0; }
.choice { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; cursor: pointer; background: #fff; }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft); }
.choice small { grid-column: 2; color: var(--muted); font-size: .76rem; max-width: 220px; }
.choice-style { flex: 1 1 200px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; display: block; grid-row: span 2; }
:is(.choice-style, .preset-btn) .swatch { border-radius: 6px; background: linear-gradient(135deg, #FAF8F3 50%, #365B48 50%); }
[data-swatch="forest"] { background: #365B48; } [data-swatch="cherry"] { background: #C8423D; } [data-swatch="ocean"] { background: #2E6A9E; }
[data-swatch="amber"] { background: #A86A12; } [data-swatch="plum"] { background: #7B4B94; } [data-swatch="ink"] { background: #1D1F23; } [data-swatch="rose"] { background: #C2457A; }
:is(.choice-style, .preset-btn) [data-swatch="soft"] { background: linear-gradient(135deg, #FFF4EC 50%, #E9B9A0 50%); border-radius: 11px; }
:is(.choice-style, .preset-btn) [data-swatch="bold"] { background: linear-gradient(135deg, #1D1F23 50%, #C8423D 50%); }
[data-swatch="mint"] { background: #23786E; } [data-swatch="terracotta"] { background: #B0532E; }
:is(.choice-style, .preset-btn) [data-swatch="editorial"] { background: linear-gradient(#FAF8F3 0 40%, #1D1F23 40% 46%, #FAF8F3 46% 70%, #A86A12 70%); border-radius: 0; }
:is(.choice-style, .preset-btn) [data-swatch="minimal"] { background: #FBFAF7; border: 1px solid #1D1F23; border-radius: 0; }
:is(.choice-style, .preset-btn) [data-swatch="pop"] { background: radial-gradient(circle at 30% 30%, #FFE58F 0 30%, transparent 31%), #FFD2E1; border: 2px solid #1D1F23; box-shadow: 2px 2px 0 #1D1F23; }
/* 設計面板（settings.design）、段落順序、自訂 CSS */
.design-panel { display: flex; flex-direction: column; gap: 18px; }
.design-group { border-top: 1px dashed var(--line); padding-top: 12px; }
.design-group > .field-label { flex-wrap: wrap; margin-bottom: 8px; }
.design-group > .field-label small { font-weight: 500; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; }
.design-grid .field { margin: 0; }
.field-select select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; font: inherit; color: var(--ink); }
.color-row { display: flex; align-items: center; gap: 6px; }
.color-row input[type=color] { width: 42px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; flex-shrink: 0; cursor: pointer; }
.color-row input[type=color][data-empty] { opacity: .45; }
.color-row input[data-k] { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: lowercase; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preset-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px 6px 8px; background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.preset-btn:hover { border-color: var(--ink); }
.preset-btn .swatch { grid-row: auto; }
.layout-list { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.layout-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 6px 12px; background: #FDFCFA; }
.layout-list label { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; cursor: pointer; }
.layout-list label { flex: 1 1 auto; }
.layout-list input[type=checkbox] { width: 20px; height: 20px; flex: none; margin: 0; }
.layout-list li span { display: flex; gap: 4px; flex-shrink: 0; }
.css-field summary { cursor: pointer; font-weight: 700; }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; width: 100%; margin-top: 8px; }
.img-field .img-box { width: 100%; max-width: 320px; aspect-ratio: 16/10; border-radius: 12px; border: 1px dashed #CFC8BE; background: var(--line-2); display: grid; place-items: center; overflow: hidden; }
.img-field.is-square .img-box { max-width: 120px; aspect-ratio: 1; }
.img-box img { width: 100%; height: 100%; object-fit: cover; }
.img-empty { color: var(--muted); font-size: .85rem; }
.img-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.img-actions label.btn { cursor: pointer; }
.img-status { color: var(--muted); }
.list-field { border-top: 1px dashed var(--line); padding-top: 12px; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; }
.list-items { display: flex; flex-direction: column; gap: 10px; }
.list-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 2px; background: #FDFCFA; }
.item-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.item-bar span { display: flex; gap: 4px; }
.btn-add { align-self: flex-start; border-style: dashed; }
details.seo { border-top: 1px dashed var(--line); padding: 10px 0 4px; }
details.seo summary { cursor: pointer; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 10px; background: rgba(243,241,236,.94); backdrop-filter: blur(6px); padding: 12px 0; border-top: 1px solid var(--line); }
.save-bar .form-message { margin: 0 auto 0 0; }
.ed[data-wide="1"] .ed-content { padding-right: 20px; }
.edit-layout { display: grid; grid-template-columns: minmax(360px, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.preview { position: sticky; top: 12px; }
.preview-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: .35em .9em; font: 600 .85rem var(--font); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.preview-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; height: calc(100vh - 140px); min-height: 520px; box-shadow: var(--shadow); }
.preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-frame[data-size="mobile"] { width: 390px; max-width: 100%; margin: 0 auto; border-radius: 28px; border: 10px solid var(--ink); }
.msg-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.msg.is-unread { border-color: #F1C3BF; background: #FFF9F2; }
.msg-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.msg-head span, .msg-head time { color: var(--muted); font-size: .85rem; }
.msg p { margin: 8px 0; white-space: normal; }
.msg-actions { display: flex; align-items: center; gap: 8px; }
.msg-actions small { margin-right: auto; }
.empty-note { color: var(--muted); text-align: center; padding: 28px 0; }

@media (max-width: 1100px) {
  .edit-layout { grid-template-columns: 1fr; }
  .preview { position: static; }
  .preview-frame { height: 70vh; }
  .ed-grid { grid-template-columns: 1fr; }
  .type-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .site-product { display: none; }
  .site-home .brand-logo { height: 32px; }
  .site-nav a { padding: .4em .55em; font-size: .85rem; }
  .site-nav { overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  body { overflow-x: clip; }
  .hero { padding: 36px 0 32px; }
  .hero-inner { grid-template-columns: minmax(0,1fr); gap: 28px; }
  .hero-mock { padding: 0 24px 24px 0; }
  .hero-mock .mock-phone { width: 130px; }
  .mock-nav { display: none; }
  .feature-grid, .type-list { grid-template-columns: 1fr; }
  .redeem { grid-template-columns: 1fr; }
  .redeem-form { flex-direction: column; }
  .ed { grid-template-columns: 1fr; grid-template-rows: auto 1fr; background: none; }
  .ed-side { position: sticky; top: 0; z-index: 15; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 8px 12px; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ed-brand, .ed-site, .ed-side-link, .side-title { display: none; }
  .ed-nav { flex-direction: row; gap: 4px; }
  .ed-nav a { white-space: nowrap; padding: .45em .75em; font-size: .88rem; }
  .ed-view { margin: 0; white-space: nowrap; font-size: .85rem; }
  .ed-top { padding: 14px 16px 8px; }
  .ed-top-brand { display: block; }
  .ed-top h1 { font-size: 1.1rem; }
  .ed > .ed-main > .notice { margin: 0 12px 14px; }
  .ed-content, .ed[data-wide="1"] .ed-content { padding: 0 12px 96px; }
  .card { padding: 18px 16px; }
  .card.group { padding: 14px 14px 6px; }
  .edit-layout { grid-template-columns: minmax(0, 1fr); }
  .page-row { grid-template-columns: 36px minmax(0, 1fr); }
  .page-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .type-buttons { grid-template-columns: 1fr 1fr; }
  .publish-card .path-input { flex-direction: column; align-items: stretch; }
  .publish-card .path-input span { padding: 8px 12px 0; }
  .publish-card .path-input input { padding: .4em 12px .6em; }
}

/* 設計面板：背景圖片（整站／段落） */
.bg-field .img-box { aspect-ratio: 16 / 9; max-width: 320px; }
.media-picks { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.media-picks small { flex-basis: 100%; }
.media-pick { width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #eee; cursor: pointer; }
.media-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-pick.is-on, .media-pick:focus-visible { border-color: var(--brand, #c8423d); outline: none; }
.media-id { display: block; margin-top: 6px; word-break: break-all; }
.section-bg { margin-top: 14px; }
.section-bg summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* 設計範例（銷售頁）與「用這個風格開始」 */
.examples { padding: 64px 0; }
.example-grid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.example-card { background: #fff; border: 1px solid #e7e1d8; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.example-thumb { position: relative; display: block; aspect-ratio: 3 / 4; background: #f1ede6; overflow: hidden; }
.example-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.example-flag { position: absolute; left: 8px; top: 8px; background: rgba(29,31,35,.86); color: #ffe27a; font-size: .72rem; padding: 3px 8px; border-radius: 999px; }
.example-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.example-body h3 { margin: 0; font-size: 1.05rem; }
.example-type { margin: 0; font-size: .8rem; color: #6b645a; }
.example-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.example-tags span { font-size: .75rem; background: #f4efe7; color: #5b4f40; padding: 2px 8px; border-radius: 999px; }
.example-actions { margin: auto 0 0; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.example-offer { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; border: 2px solid var(--brand, #c8423d); }
.example-offer > div:first-child { flex: 1 1 320px; min-width: 0; }
.example-offer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice-ok { background: #eaf6ee; border: 1px solid #b9dfc5; color: #1f5132; border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; }

/* 編輯器第一次導覽（tour.js） */
.tour-ring { position: fixed; z-index: 9998; border-radius: 12px; box-shadow: 0 0 0 3px #c8423d, 0 0 0 9999px rgba(20, 18, 16, .45); pointer-events: none; transition: all .18s ease; }
.tour-tip { position: fixed; z-index: 9999; background: #fff; color: #23201c; border-radius: 14px; padding: 16px 16px 12px; box-shadow: 0 12px 40px rgba(0,0,0,.25); max-width: calc(100vw - 24px); }
.tour-tip h2 { font-size: 1.05rem; margin: 2px 0 6px; }
.tour-tip p { margin: 0 0 10px; line-height: 1.6; }
.tour-count { font-size: .78rem; color: #8a8178; }
.tour-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.tour-actions span { display: flex; gap: 6px; margin-left: auto; }
.tour-help { margin: 10px 0 0 !important; font-size: .85rem; }
.tour-help a { color: #c8423d; }
.tour-q { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; font: 700 1rem/1 system-ui, sans-serif; cursor: pointer; color: inherit; }
.ed-help { white-space: nowrap; font-size: .9rem; }
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } }

/* 使用教學頁（help-html.js）：手機 320px、字放大 130% 都不會破版 */
.help { padding: 32px 0 64px; }
.help-wrap { max-width: 980px; }
.help-head h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 4px 0 10px; }
.help-toc { margin: 20px 0 8px; background: #fff; border: 1px solid #e7e1d8; border-radius: 14px; padding: 14px 18px; }
.help-toc p { margin: 0 0 6px; font-weight: 700; }
.help-toc ol { margin: 0; padding-left: 1.4em; columns: 2 220px; column-gap: 24px; }
.help-toc li { margin: 4px 0; break-inside: avoid; }
.help-section { margin-top: 44px; }
.help-section > h2 { font-size: clamp(1.3rem, 4vw, 1.7rem); border-bottom: 2px solid #ece6dd; padding-bottom: 8px; }
.help-intro { color: #5b5249; }
.help-steps { list-style: none; margin: 0; padding: 0; }
.help-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 20px 32px; align-items: start; padding: 24px 0; border-bottom: 1px dashed #e4ddd2; }
.help-step h3 { display: flex; gap: 10px; align-items: baseline; font-size: 1.15rem; margin: 0 0 8px; }
.help-no { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; border-radius: 50%; background: #c8423d; color: #fff; font-size: .85em; }
.help-step-text { min-width: 0; overflow-wrap: anywhere; }
.help-step-text p, .help-step-text li { line-height: 1.75; }
.help-step-text ul { padding-left: 1.2em; }
.help-step-text code { background: #f3efe8; padding: 1px 5px; border-radius: 4px; font-size: .9em; overflow-wrap: anywhere; }
.help-tip { background: #fff8e1; border-left: 4px solid #e0a100; border-radius: 8px; padding: 10px 12px; }
.help-tip b { display: block; font-size: .85rem; color: #8a5a00; }
.help-shot { margin: 0; }
.help-shot img { display: block; width: 100%; height: auto; max-width: 300px; border-radius: 22px; border: 6px solid #23201c; background: #23201c; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.help-shot figcaption { font-size: .8rem; color: #8a8178; margin-top: 6px; max-width: 300px; }
.help-faq .faq-list { margin-top: 12px; }
.help-cta { margin-top: 40px; text-align: center; background: #fff; border: 1px solid #e7e1d8; border-radius: 16px; padding: 24px 16px; }
.help-cta .btn { margin: 6px; }
.help-points { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: .95rem; }
.help-points th, .help-points td { border-bottom: 1px solid #ece6dd; padding: 8px 6px; text-align: left; vertical-align: top; }
.help-points td:last-child { white-space: nowrap; text-align: right; }
.help-say { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.help-say li { background: #f4efe7; border-radius: 12px 12px 12px 2px; padding: 8px 12px; }
@media (max-width: 720px) {
  .help-step { grid-template-columns: minmax(0, 1fr); }
  .help-shot img { max-width: min(300px, 100%); }
}
