/* ==========================================================================
   平台樣式 · Platform styles（首頁、預覽頁、編輯器、共用元件）
   版面以 Tailwind utility 為主，這裡放品牌元件與 Tailwind 不易表達的細節
   ========================================================================== */
:root {
  --p-bg: #faf7f2;
  --p-surface: #f2ece3;
  --p-ink: #2a2521;
  --p-muted: #7d7368;
  --p-gold: #a8844f;
  --p-gold-soft: #e7d8bf;
  --p-line: #e6ded2;
  --p-wa: #25d366;          /* WhatsApp 官方綠（光暈／裝飾） */
  --p-wa-btn: #1da14f;      /* 有白色文字的按鈕使用較深的綠，確保可讀性 */
  --p-wa-dark: #128c7e;
  --p-display: 'Cormorant Garamond', 'Noto Serif TC', serif;
  --p-sans: 'Jost', 'Noto Sans TC', system-ui, sans-serif;
  --header-h: 64px;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--p-bg); color: var(--p-ink); font-family: var(--p-sans); }
::selection { background: var(--p-gold-soft); }
:focus-visible { outline: 2px solid var(--p-gold); outline-offset: 3px; }
.font-display { font-family: var(--p-display); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--p-ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.eyebrow { font: 500 11px/1.4 var(--p-sans); letter-spacing: .32em; text-transform: uppercase; color: var(--p-gold); }
.hairline { height: 1px; background: var(--p-line); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 70; background: color-mix(in srgb, var(--p-bg) 86%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.site-header.is-scrolled { border-bottom-color: var(--p-line); }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--p-ink); white-space: nowrap; }
.brand b { font: 500 26px/1 var(--p-display); letter-spacing: .02em; }
.brand span { font: 400 10px/1 var(--p-sans); letter-spacing: .28em; text-transform: uppercase; color: var(--p-muted); }
.nav-link { position: relative; color: var(--p-ink); text-decoration: none; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; padding: 6px 0; }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--p-gold); transform: scaleX(0); transition: transform .3s; transform-origin: left; }
.nav-link:hover::after { transform: scaleX(1); }

/* Language switcher */
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--p-line); border-radius: 999px; background: color-mix(in srgb, #fff 55%, transparent); }
.lang-switch__btn { border: 0; background: transparent; cursor: pointer; min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px; font: 500 12px/1 var(--p-sans); letter-spacing: .06em; color: var(--p-muted); transition: background .2s, color .2s; }
.lang-switch__btn:hover { color: var(--p-ink); }
.lang-switch__btn[aria-pressed='true'] { background: var(--p-ink); color: #fff; }
.lang-switch.is-compact .lang-switch__btn { min-width: 34px; height: 30px; padding: 0 8px; font-size: 11px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 6px 24px; border-radius: 999px; font: 500 13px/1.25 var(--p-sans); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; text-align: center; cursor: pointer; border: 1px solid transparent; transition: transform .25s, background .25s, color .25s, border-color .25s, box-shadow .25s; white-space: nowrap; max-width: 100%; }
/* 按鈕列：放得下就並排，放不下自動換行（適應三種語言的不同字數） */
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row > .btn { flex: 1 1 auto; }
/* 最後保護：單一按鈕寬度仍不足時，文字在按鈕內換行而不是溢出 */
.btn-row > .btn, .btn-block { white-space: normal; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: var(--p-ink); color: #fff; }
.btn-dark:hover { background: #000; box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .6); }
.btn-outline { border-color: color-mix(in srgb, var(--p-ink) 30%, transparent); color: var(--p-ink); background: transparent; }
.btn-outline:hover { border-color: var(--p-ink); }
.btn-gold { background: var(--p-gold); color: #fff; }
.btn-wa { background: var(--p-wa-btn); color: #fff; font-weight: 600; }
.btn-wa:hover { background: #178a43; box-shadow: 0 12px 26px -14px rgba(18, 140, 126, .8); }
.btn-wa-outline { border-color: color-mix(in srgb, var(--p-wa-dark) 45%, transparent); color: var(--p-wa-dark); background: transparent; }
.btn-wa-outline:hover { background: color-mix(in srgb, var(--p-wa) 10%, transparent); border-color: var(--p-wa-dark); }
.btn-sm { min-height: 40px; padding: 5px 14px; font-size: 11.5px; letter-spacing: .08em; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--p-ink); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--p-line); padding: 6px 0; transition: border-color .2s, gap .2s; }
.link-arrow:hover { border-color: var(--p-ink); gap: 12px; }

/* ---------- WhatsApp floating button ---------- */
.wa-fab {
  position: fixed; z-index: 90; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + var(--fab-lift, 0px) + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 16px; border-radius: 999px;
  background: var(--p-wa-btn); color: #fff; text-decoration: none; font: 600 14px/1 var(--p-sans); letter-spacing: .04em;
  box-shadow: 0 14px 30px -12px rgba(18, 140, 126, .65), 0 0 0 1px rgba(255, 255, 255, .25) inset;
  transition: transform .25s, box-shadow .25s, background .25s, bottom .4s cubic-bezier(.2, .7, .2, 1);
}
.wa-fab::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); animation: waPulse 2.8s ease-out infinite; pointer-events: none; }
.wa-fab:hover { transform: translateY(-2px); background: #178a43; box-shadow: 0 18px 36px -12px rgba(18, 140, 126, .75); }
.wa-fab:active { transform: scale(.96); }
.wa-fab__icon svg { width: 26px; height: 26px; display: block; }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); } 70%, 100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); } }
@media (max-width: 767px) {
  .wa-fab { width: 56px; padding: 0; justify-content: center; }
  .wa-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* 避免遮住邀請函底部導覽列與編輯器底部分頁 */
body.inv-opened .wa-fab { bottom: calc(86px + var(--fab-lift, 0px) + env(safe-area-inset-bottom)); }
/* 主機商（例如 Netlify）在右下角插入徽章時，把 WhatsApp 按鈕往上移，避免被遮住 */
html.has-host-badge { --fab-lift: 44px; }
body.has-tabbar .wa-fab { bottom: calc(80px + var(--fab-lift, 0px) + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { body.has-tabbar .wa-fab { bottom: calc(22px + var(--fab-lift, 0px) + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .wa-fab::before { animation: none; } }
.wa-ico svg { width: 18px; height: 18px; display: block; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; z-index: 2000; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: rgba(32, 28, 25, .94); color: #fff; padding: 12px 18px; border-radius: 14px; font: 14px/1.5 var(--p-sans); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(-10px); transition: opacity .3s, transform .3s; text-align: center; }
.toast.is-in { opacity: 1; transform: none; }
.toast--warn { background: #7a4a12; }
.toast--success { background: #1f5f4a; }

/* ---------- Phone mockup ---------- */
.phone { position: relative; width: 100%; aspect-ratio: 9 / 18.5; border-radius: 34px; padding: 7px; background: linear-gradient(145deg, #fff, #ebe4d9); box-shadow: 0 40px 70px -40px rgba(60, 45, 30, .55), 0 0 0 1px rgba(60, 45, 30, .08); }
.phone__screen { position: relative; width: 100%; height: 100%; border-radius: 28px; overflow: hidden; background: #eee; isolation: isolate; }
.phone__screen::after { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 30%; height: 14px; border-radius: 999px; background: rgba(0, 0, 0, .82); z-index: 5; }
.phone--sm { border-radius: 24px; padding: 5px; }
.phone--sm .phone__screen { border-radius: 20px; }
.phone--sm .phone__screen::after { height: 9px; top: 6px; }

/* ---------- Hero ---------- */
.hero-title { font-family: var(--p-display); font-weight: 400; line-height: 1.04; letter-spacing: -.01em; }
.hero-title em { font-style: italic; color: var(--p-gold); }
.hero-phones { position: relative; height: 100%; min-height: 460px; }
.hero-phones .phone { position: absolute; width: 46%; }
.hero-phones .phone:nth-child(1) { left: 6%; top: 6%; transform: rotate(-6deg); animation: floatA 9s ease-in-out infinite; }
.hero-phones .phone:nth-child(2) { right: 4%; top: 0; z-index: 2; transform: rotate(5deg); animation: floatB 10s ease-in-out infinite; }
@keyframes floatA { 50% { transform: rotate(-4deg) translateY(-12px); } }
@keyframes floatB { 50% { transform: rotate(3deg) translateY(10px); } }
.hero-glow { position: absolute; inset: 10% 0 0; background: radial-gradient(closest-side, rgba(176, 141, 87, .22), transparent); filter: blur(10px); z-index: -1; }
@media (max-width: 1023px) { .hero-phones { min-height: 0; height: 420px; } }
@media (max-width: 520px) { .hero-phones { height: 360px; } .hero-phones .phone { width: 52%; } }
@media (prefers-reduced-motion: reduce) { .hero-phones .phone { animation: none !important; } }

/* Marquee of features */
.feature-item { border-top: 1px solid var(--p-line); padding-top: 22px; }
.feature-item h3 { font: 500 24px/1.2 var(--p-display); margin-bottom: 8px; }
.feature-num { font: italic 400 15px/1 var(--p-display); color: var(--p-gold); }

/* ---------- Filter tabs ---------- */
.filter-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid var(--p-line); }
.filter-tab { border: 0; background: transparent; cursor: pointer; padding: 10px 20px; min-height: 42px; border-radius: 999px; font: 500 13px/1 var(--p-sans); letter-spacing: .1em; color: var(--p-muted); transition: background .25s, color .25s; display: inline-flex; align-items: center; gap: 8px; }
.filter-tab small { font-size: 11px; opacity: .7; }
.filter-tab[aria-selected='true'] { background: var(--p-ink); color: #fff; }

/* ---------- Template cards ---------- */
.tpl-card { display: flex; flex-direction: column; gap: 18px; animation: cardIn .7s cubic-bezier(.2, .7, .2, 1) both; }
.tpl-card[hidden] { display: none; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.tpl-card__visual { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 28px 19% 0; aspect-ratio: 4 / 5.2; overflow: hidden; border: 0; cursor: pointer; border-radius: 4px; background: var(--card-tint, var(--p-surface)); width: 100%; }
.tpl-card__visual .phone { transition: transform .8s cubic-bezier(.2, .7, .2, 1); transform: translateY(6%); box-shadow: 0 30px 50px -30px rgba(40, 30, 20, .55); }
.tpl-card__visual:hover .phone, .tpl-card__visual:focus-visible .phone { transform: translateY(0); }
.tpl-card__hover { max-width: 90%; position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 10px); opacity: 0; transition: all .35s; background: rgba(255, 255, 255, .92); color: var(--p-ink); padding: 10px 18px; border-radius: 999px; font: 500 12px/1 var(--p-sans); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .4); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.tpl-card__visual:hover .tpl-card__hover, .tpl-card__visual:focus-visible .tpl-card__hover { max-width: 90%; opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .tpl-card__hover { max-width: 90%; opacity: 1; transform: translate(-50%, 0); } }
.tpl-card__meta { font: 500 11px/1 var(--p-sans); letter-spacing: .24em; text-transform: uppercase; color: var(--p-muted); }
.tpl-card__name { font: 500 28px/1.15 var(--p-display); }
.tpl-card__en { font: italic 400 16px/1.2 var(--p-display); color: var(--p-muted); }
.tpl-card__tagline { color: var(--p-muted); font-size: 14.5px; line-height: 1.6; }
.swatches { display: inline-flex; gap: 6px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }

/* ---------- How / FAQ / CTA ---------- */
.step-num { font: italic 300 64px/1 var(--p-display); color: var(--p-gold); }
.faq details { border-bottom: 1px solid var(--p-line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 24px; align-items: center; font: 500 21px/1.35 var(--p-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--p-line); display: grid; place-items: center; transition: transform .3s, background .3s; }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--p-ink); color: #fff; border-color: var(--p-ink); }
.faq details p { padding: 0 48px 24px 0; color: var(--p-muted); line-height: 1.8; }
.cta-band { background: #211d1a; color: #f4efe7; position: relative; overflow: hidden; }
.cta-band::before { content: ''; position: absolute; width: 700px; height: 700px; right: -200px; top: -300px; border-radius: 50%; border: 1px solid rgba(201, 164, 92, .25); }
.cta-band::after { content: ''; position: absolute; width: 520px; height: 520px; right: -110px; top: -210px; border-radius: 50%; border: 1px solid rgba(201, 164, 92, .18); }

/* ---------- Preview modal ---------- */
.pv { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 24px; }
.pv[hidden] { display: none; }
.pv__backdrop { position: absolute; inset: 0; background: rgba(30, 26, 22, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .3s both; }
.pv__panel { position: relative; width: min(1120px, 100%); height: min(860px, calc(100vh - 48px)); height: min(860px, calc(100svh - 48px)); background: var(--p-bg); border-radius: 22px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; overflow: hidden; box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .6); animation: panelIn .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.pv__stage { position: relative; background: var(--pv-tint, var(--p-surface)); display: grid; place-items: center; padding: 28px; min-height: 0; }
.pv__device { height: 100%; max-height: 780px; aspect-ratio: 390 / 800; border-radius: 40px; padding: 8px; background: linear-gradient(145deg, #fff, #e9e2d6); box-shadow: 0 40px 70px -40px rgba(40, 30, 20, .6); }
.pv__device iframe { width: 100%; height: 100%; border: 0; border-radius: 32px; background: #fff; display: block; }
.pv__info { padding: 36px 32px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--p-line); }
.pv__close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--p-line); background: rgba(255, 255, 255, .9); display: grid; place-items: center; cursor: pointer; }
.pv__close svg { width: 18px; height: 18px; }
.pv__nav { position: absolute; left: 20px; bottom: 20px; display: flex; gap: 8px; z-index: 2; }
.pv__nav button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .1); background: rgba(255, 255, 255, .85); cursor: pointer; display: grid; place-items: center; }
.pv__nav svg { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--p-line); font-size: 12.5px; color: var(--p-ink); }
.chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--p-gold); }
@media (max-width: 900px) {
  .pv { padding: 0; place-items: stretch; }
  .pv__panel { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; height: 100%; width: 100%; border-radius: 0; }
  .pv__stage { padding: 0; }
  .pv__device { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; padding: 0; box-shadow: none; }
  .pv__device iframe { border-radius: 0; }
  .pv__info { max-height: 42vh; max-height: 42svh; border-left: 0; border-top: 1px solid var(--p-line); padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); gap: 12px; }
  .pv__info .pv-desc, .pv__info .pv-includes, .pv__info .pv-traits { display: none; }
  .pv__nav { left: 12px; bottom: 12px; }
  .pv__close { top: calc(10px + env(safe-area-inset-top)); left: 10px; right: auto; }
  body.pv-open .wa-fab { display: none; }
}
body.pv-open { overflow: hidden; }

/* ---------- Invite preview page topbar ---------- */
.page-invite { --topbar-h: 56px; }
.page-invite.is-embed { --topbar-h: 0px; }
.inv-topbar { position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; background: color-mix(in srgb, #fff 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(0, 0, 0, .06); font-family: var(--p-sans); color: var(--p-ink); }
.inv-topbar :where(a) { color: inherit; text-decoration: none; }
.inv-topbar .tb-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; letter-spacing: .06em; padding: 8px 6px; white-space: nowrap; }
.inv-topbar .tb-back svg { width: 18px; height: 18px; }
.inv-topbar .tb-title { flex: 1; min-width: 0; text-align: center; font: 500 18px/1.2 var(--p-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1023px) { .inv-topbar .tb-title small { display: none; } }
.inv-topbar .tb-title small { font: 400 11px/1 var(--p-sans); letter-spacing: .2em; color: var(--p-muted); margin-left: 8px; }
.inv-topbar .btn { min-height: 38px; padding: 0 14px; font-size: 11px; letter-spacing: .1em; }
@media (max-width: 640px) { .inv-topbar .tb-label { display: none; } .inv-topbar .btn { padding: 0 11px; } }

/* ---------- Editor ---------- */
.ed-shell { display: grid; grid-template-columns: 420px minmax(0, 1fr); height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
.ed-side { overflow-y: auto; border-right: 1px solid var(--p-line); background: #fffdf9; display: flex; flex-direction: column; overscroll-behavior: contain; }
.ed-stage { position: relative; display: flex; flex-direction: column; min-width: 0; background: radial-gradient(circle at 50% 30%, #f6f1e9, #ece4d7); }
.ed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--p-line); background: rgba(255, 255, 255, .55); flex-wrap: wrap; }
.ed-viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.ed-device { position: absolute; left: 50%; top: 24px; transform-origin: top center; background: #fff; overflow: hidden; transition: width .4s, height .4s; }
.ed-device iframe { width: 100%; height: 100%; border: 0; display: block; }
.ed-device.is-mobile { border-radius: 44px; padding: 10px; background: linear-gradient(145deg, #fff, #e6dfd2); box-shadow: 0 40px 80px -40px rgba(40, 30, 20, .6); }
.ed-device.is-mobile iframe { border-radius: 34px; background: #fff; }
.ed-device.is-desktop { border-radius: 10px; box-shadow: 0 30px 70px -40px rgba(40, 30, 20, .6); border-top: 30px solid #ebe5da; }
.ed-device.is-desktop::before { content: ''; position: absolute; top: -19px; left: 14px; width: 54px; height: 9px; background: radial-gradient(circle, #e0a49a 3.5px, transparent 4px) 0 0/18px 9px repeat-x; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: #fff; border: 1px solid var(--p-line); }
.seg button { border: 0; background: transparent; min-height: 34px; padding: 0 14px; border-radius: 999px; font: 500 12px/1 var(--p-sans); letter-spacing: .08em; color: var(--p-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button svg { width: 16px; height: 16px; }
.seg button[aria-pressed='true'] { background: var(--p-ink); color: #fff; }
.ed-group { border-bottom: 1px solid var(--p-line); }
.ed-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; font: 500 12px/1 var(--p-sans); letter-spacing: .2em; text-transform: uppercase; }
.ed-group > summary::-webkit-details-marker { display: none; }
.ed-group > summary .n { font: italic 400 15px/1 var(--p-display); color: var(--p-gold); margin-right: 10px; letter-spacing: 0; }
.ed-group > summary svg { width: 16px; height: 16px; transition: transform .3s; color: var(--p-muted); }
.ed-group[open] > summary svg { transform: rotate(180deg); }
.ed-body { padding: 0 22px 22px; display: grid; gap: 14px; }
.ed-field label, .ed-label { display: block; font: 500 11.5px/1.3 var(--p-sans); letter-spacing: .08em; color: var(--p-muted); margin-bottom: 6px; }
.ed-input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--p-line); border-radius: 10px; background: #fff; font: 15px/1.5 var(--p-sans); color: var(--p-ink); transition: border-color .2s, box-shadow .2s; }
.ed-input:focus { outline: none; border-color: var(--p-gold); box-shadow: 0 0 0 3px rgba(176, 141, 87, .18); }
textarea.ed-input { min-height: 110px; resize: vertical; }
.ed-hint { font-size: 12px; line-height: 1.6; color: var(--p-muted); }
.ed-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ed-tpls { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ed-tpl { border: 0; padding: 0; background: none; cursor: pointer; text-align: center; }
.ed-tpl .phone { border-radius: 12px; padding: 3px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .3); transition: transform .25s, box-shadow .25s; }
.ed-tpl .phone__screen { border-radius: 9px; }
.ed-tpl .phone__screen::after { display: none; }
.ed-tpl > span { display: block; font-size: 10.5px; line-height: 1.3; color: var(--p-muted); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-tpl[aria-pressed='true'] .phone { box-shadow: 0 0 0 2px var(--p-ink), 0 8px 18px -8px rgba(0, 0, 0, .4); transform: translateY(-2px); }
.ed-tpl[aria-pressed='true'] > span { color: var(--p-ink); font-weight: 500; }
.ed-cat { font: 500 10px/1 var(--p-sans); letter-spacing: .24em; text-transform: uppercase; color: var(--p-muted); margin: 6px 0 2px; }
.pal-list { display: grid; gap: 8px; }
.pal { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--p-line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font: 14px/1 var(--p-sans); color: var(--p-ink); text-transform: capitalize; }
.pal[aria-pressed='true'] { border-color: var(--p-ink); box-shadow: 0 0 0 1px var(--p-ink); }
.pal .swatches i { width: 18px; height: 18px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 14px; padding: 4px 0; }
.toggle input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: #d9d1c4; position: relative; cursor: pointer; transition: background .25s; flex: none; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s; }
.toggle input:checked { background: var(--p-ink); }
.toggle input:checked::after { transform: translateX(18px); }
.toggle input:focus-visible { outline: 2px solid var(--p-gold); outline-offset: 2px; }
.cover-prev { width: 72px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--p-surface); flex: none; }
.ed-file { position: relative; overflow: hidden; }
.ed-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ed-actions { position: sticky; bottom: 0; background: color-mix(in srgb, #fffdf9 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--p-line); padding: 14px 22px; display: grid; gap: 10px; margin-top: auto; }
.ed-status { font-size: 12px; color: var(--p-muted); display: flex; align-items: center; gap: 8px; }
.ed-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #b9b0a3; }
.ed-status.is-dirty::before { background: #d08a2c; }
.ed-status.is-saved::before { background: #3c9a6e; }
.ed-quote { margin: 18px 22px 22px; padding: 18px; border-radius: 16px; background: linear-gradient(140deg, #f3fbf6, #fff); border: 1px solid #d5ecdf; display: grid; gap: 10px; }
.ed-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ed-table th, .ed-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--p-line); vertical-align: top; }
.ed-table th { font-weight: 500; color: var(--p-muted); white-space: nowrap; }
.ed-tablewrap { max-height: 220px; overflow: auto; border: 1px solid var(--p-line); border-radius: 10px; background: #fff; }
.ed-tabbar { display: none; }
@media (max-width: 1023px) {
  .ed-shell { grid-template-columns: 1fr; height: auto; min-height: calc(100dvh - var(--header-h)); }
  .ed-side { border-right: 0; padding-bottom: 76px; overflow: visible; }
  .ed-actions { bottom: 64px; }
  .ed-stage { position: fixed; inset: var(--header-h) 0 64px 0; z-index: 20; }
  body:not(.ed-show-preview) .ed-stage { visibility: hidden; pointer-events: none; }
  body.ed-show-preview .ed-side { display: none; }
  .ed-toolbar .seg-device { display: none; }
  .ed-device, .ed-device.is-mobile { position: absolute; inset: 0; left: 0; top: 0; width: 100% !important; height: 100% !important; transform: none !important; border-radius: 0; padding: 0; box-shadow: none; border: 0; }
  .ed-device.is-mobile iframe { border-radius: 0; }
  .ed-tabbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(64px + env(safe-area-inset-bottom)); padding: 8px 12px env(safe-area-inset-bottom); background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--p-line); gap: 8px; }
  .ed-tabbar button { border: 0; border-radius: 12px; background: transparent; font: 500 13px/1 var(--p-sans); letter-spacing: .1em; color: var(--p-muted); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
  .ed-tabbar button svg { width: 18px; height: 18px; }
  .ed-tabbar button[aria-pressed='true'] { background: var(--p-ink); color: #fff; }
}
/* 手機版：頁尾預留浮動 WhatsApp 按鈕的空間，避免遮住最後的內容 */
@media (max-width: 767px) { .page-home > footer { padding-bottom: 88px; } }

/* 賓客模式（活動專屬連結）：左上角精簡語言切換 */
.guest-lang { position: fixed; z-index: 67; top: calc(14px + env(safe-area-inset-top)); left: 14px; }
.guest-lang .lang-switch { background: color-mix(in srgb, #fff 70%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* 電子入場券 */
.inv-ticket { margin: 6px auto 22px; max-width: 300px; padding: 22px 20px 20px; border-radius: 18px; background: #fff; color: #1d1a17; text-align: center; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .45); border: 1px dashed color-mix(in srgb, var(--accent, #a8844f) 55%, transparent); position: relative; }
.inv-ticket::before, .inv-ticket::after { content: ''; position: absolute; top: 64%; width: 18px; height: 18px; border-radius: 50%; background: var(--surface, #f2ece3); }
.inv-ticket::before { left: -10px; }
.inv-ticket::after { right: -10px; }
.inv-ticket__label { font: 600 11px/1 'Jost', 'Noto Sans TC', sans-serif; letter-spacing: .3em; text-transform: uppercase; color: var(--accent, #a8844f); margin-bottom: 12px; }
.inv-ticket__qr { width: 190px; margin: 0 auto; }
.inv-ticket__qr svg { display: block; width: 100%; height: auto; }
.inv-ticket__name { font: 600 20px/1.3 var(--font-display, serif); margin-top: 10px; }
.inv-ticket__meta { font-size: 13px; color: #6b625a; margin-top: 2px; }
.inv-ticket__hint { font-size: 12px; color: #6b625a; margin: 10px 0 14px; }
.inv-ticket .inv-btn { color: #1d1a17; border-color: #d9d1c4; }

/* reCAPTCHA（App Check）徽章會蓋住右下角按鈕：隱藏後依 Google 規定在隱私權政策標示 */
.grecaptcha-badge { visibility: hidden !important; }
