/* hereby — self-serve editor (create.html). Form on the left, live phone on the right;
   on phone-width screens the preview is a full-screen sheet opened from a floating button. */
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 48px; align-items: start; padding-top: 24px; padding-bottom: 96px; }
.ed-form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
/* 2026-11-26 (Bo: "step by step, very layman"): the heading IS the current step; one line of numbered dots
   above it shows where you are. No intro lines: the layout says it. */
.ed-head { display: grid; gap: 2px; }
.ed-count { display: flex; align-items: baseline; gap: 12px; margin: 0; font-family: var(--serif); font-size: 15px; letter-spacing: .08em; color: var(--taupe); }
.ed-saved { margin-left: auto; font-size: 14px; letter-spacing: 0; color: var(--olive, #5E6B4A); }
.ed-title { font-size: clamp(34px, 5vw, 50px); margin: 0; }
.ed-hint { font-size: 17px; margin: -8px 0 0; min-height: 1.5em; }

.ed-steps { position: relative; display: flex; justify-content: space-between; gap: 4px; padding: 4px 0 0; }
.ed-track { position: absolute; left: 22px; right: 22px; top: 26px; height: 2px; background: var(--champagne); pointer-events: none; }
.ed-track i { display: block; height: 100%; width: 0; background: var(--chocolate); transition: width .35s ease; }
.ed-steps button { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 44px; padding: 0; border: 0; background: transparent; color: var(--taupe); font-family: var(--serif); font-size: 15px; cursor: pointer; }
.ed-steps button b { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--champagne); background: var(--ivory, #F8F3E9); font-size: 16px; font-weight: 500; transition: background .2s, color .2s, border-color .2s; }
.ed-steps button.done b { border-color: var(--chocolate); color: var(--chocolate); }
.ed-steps button[aria-pressed="true"] { color: var(--chocolate); }
.ed-steps button[aria-pressed="true"] b { background: var(--chocolate); color: var(--ivory); border-color: var(--chocolate); box-shadow: 0 0 0 4px rgba(75, 58, 46, .12); }
@media (max-width: 640px) {
  .ed-steps button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ed-steps button b { width: 36px; height: 36px; font-size: 15px; }
  .ed-track { top: 22px; left: 18px; right: 18px; }
  /* the site header shrinks while making, so the step is near the top */
  body[data-page="create"] .site-head .wrap { padding-block: 6px; }
  body[data-page="create"] .site-head .logo { font-size: 38px; }
}

.ed-panel { display: flex; flex-direction: column; gap: 20px; }
.ed-panel[hidden] { display: none; }
.ed-panel > p { margin: 0; }
.ed-panel fieldset { border: none; margin: 0; padding: 0; }

/* six designs: always full rows (3 + 3, or 2 + 2 + 2 on a phone), never one left alone */
.ed-designs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .ed-designs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ed-design { box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--champagne); border-radius: 18px; background: rgba(255, 255, 255, 0.5); color: var(--chocolate); font-family: var(--serif); font-size: 19px; text-align: left; cursor: pointer; }
.ed-design[aria-checked="true"] { border-color: var(--chocolate); box-shadow: inset 0 0 0 1px var(--chocolate); }
.ed-mini { display: block; width: 134px; height: 277px; overflow: hidden; align-self: center; pointer-events: none; }
.ed-mini .phone { display: block; width: 320px; max-width: none; height: 660px; transform: scale(0.42); transform-origin: 0 0; border-width: 7px; border-color: #2B2420; outline: none; border-radius: 40px; box-shadow: none; }

/* details: one card per person (Chinese + English name inside), one for the venue */
.ed-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ed-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ed-two .field { margin: 0; min-width: 0; }
.ed-two input { min-width: 0; width: 100%; box-sizing: border-box; }
.ed-panel fieldset.ed-who-card { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--champagne); border-radius: 18px 22px 16px 24px / 22px 16px 24px 18px; background: rgba(255, 255, 255, .5); min-width: 0; }
.ed-who-card legend { padding: 0 6px; font-family: var(--serif); font-size: 18px; color: var(--chocolate); }
.ed-who-card input, .ed-who-card select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--chocolate); font-family: var(--serif); font-size: 18px; }
.ed-sample { align-self: flex-start; margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(243, 227, 223, .8); color: var(--rose-deep); font-size: 15px; }
.ed-sample[hidden] { display: none; }
.ed-add { align-self: flex-start; min-height: 48px; padding: 0 18px; border: 1px dashed var(--taupe); border-radius: 999px; background: transparent; color: var(--chocolate); font-family: var(--serif); font-size: 18px; cursor: pointer; }
.ed-dress + textarea { margin-top: 10px; }
.ed-more-opts { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--champagne); }
.ed-more-opts summary { cursor: pointer; font-family: var(--serif); font-size: 17px; color: var(--taupe); }
.ed-more-opts[open] { display: grid; gap: 12px; justify-items: start; }
.ed-nav .btn.ed-back { min-width: 56px; padding: 0 0 3px; font-family: system-ui, sans-serif; font-size: 24px; line-height: 1; letter-spacing: 0; }
.ed-steps button b, .ed-count { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.ed-panel > .err:empty, .ed-panel .ed-hint:empty { display: none; }

.ed-dress { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ed-dot { position: relative; display: inline-flex; }
.ed-dot input[type="color"] { width: 48px; height: 48px; padding: 0; border: 1px solid var(--champagne); border-radius: 50%; background: none; cursor: pointer; }
.ed-dot input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.ed-dot input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
.ed-dot button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; background: var(--chocolate); color: var(--ivory); font-size: 14px; line-height: 1; cursor: pointer; }

.ed-ways, .ed-accents { display: flex; flex-wrap: wrap; gap: 10px; }
.ed-way { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px 0 10px; border: 1px solid var(--champagne); border-radius: 999px; background: rgba(255, 255, 255, 0.55); color: var(--chocolate); font-family: var(--serif); font-size: 18px; cursor: pointer; }
.ed-way[aria-checked="true"] { border-color: var(--chocolate); box-shadow: inset 0 0 0 1px var(--chocolate); }
.ed-way-dots { display: inline-flex; }
.ed-way-dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; }
.ed-way-dots i:first-child { margin-left: 0; }
.ed-acc { display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--champagne); border-radius: 50%; background: #fff; cursor: pointer; }
.ed-acc i { width: 34px; height: 34px; border-radius: 50%; }
.ed-acc.none { width: auto; padding: 0 16px; border-radius: 999px; font-family: var(--serif); font-size: 17px; color: var(--chocolate); }
.ed-acc[aria-checked="true"] { border-color: var(--chocolate); box-shadow: 0 0 0 2px var(--chocolate); }
.ed-panel fieldset[hidden] { display: none; }
.ed-secs { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-secs .chip { min-height: 42px; font-size: 17px; font-style: normal; }
.ed-stk-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.ed-stk { aspect-ratio: 1; padding: 6px; border: 1px solid var(--champagne); border-radius: 14px; background: rgba(255, 255, 255, 0.6); cursor: pointer; }
.ed-stk img { width: 100%; height: 100%; object-fit: contain; }
.ed-stk:hover { border-color: var(--chocolate); }
.ed-stk-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 410px; }
.ed-stk-tools[hidden] { display: none; }
.ed-stk-tools .chip { min-height: 40px; padding: 0 14px; font-size: 16px; font-style: normal; }
.ed-lang-tabs { display: flex; gap: 8px; }
.ed-lang-tabs .chip { min-height: 40px; font-size: 17px; font-style: normal; }
.ed-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ed-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) 40px; grid-template-areas: "t a x" ". b ."; gap: 6px 8px; align-items: center; }
.ed-item input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--chocolate); font-family: var(--serif); font-size: 18px; min-width: 0; }
.ed-item input[data-f="0"] { grid-area: t; text-align: center; }
.ed-item input[data-f="1"] { grid-area: a; }
.ed-item input[data-f="2"] { grid-area: b; font-size: 16px; }
.ed-x { grid-area: x; width: 40px; height: 40px; border: 1px solid var(--champagne); border-radius: 50%; background: transparent; color: var(--taupe); font-size: 20px; cursor: pointer; }
.ed-copy { display: flex; gap: 8px; }
.ed-copy input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: var(--serif); font-size: 16px; color: var(--chocolate); }
.ed-links, .ed-mine { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.ed-links[hidden], .ed-mine[hidden] { display: none; }
.ed-wa-self { align-self: flex-start; font-size: 19px; }
.ed-pub .err { color: var(--rose-deep); min-height: 1.2em; margin: 8px 0 0; }
.ed-check { margin: 12px 0 20px; padding-left: 1.2em; }
.ed-check:empty { display: none; }
.ed-check .ed-missing { color: var(--rose-deep); font-weight: 600; }
.ed-fix { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.ed-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; }
.ed-nav [hidden] { display: none; }
.ed-nav #next { margin-left: auto; }

.ed-preview { position: sticky; top: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ed-preview-bar { display: flex; width: 100%; justify-content: center; align-items: center; gap: 12px; }
.ed-close, .ed-fab { display: none; }

@media (max-width: 980px) {
  .ed { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .ed-preview { display: none; }
  /* QA 2026-11-25: the floating Preview button covered Next. Back · Preview · Next now share one bar pinned to the bottom. */
  .ed-nav { position: sticky; bottom: 0; z-index: 20; align-items: center; margin: 0 -16px; padding: 10px 16px max(10px, env(safe-area-inset-bottom, 0px)); background: rgba(248, 243, 233, 0.96); border-top: 1px solid var(--champagne); backdrop-filter: blur(6px); }
  .ed-fab { display: inline-flex; margin-left: auto; }
  .ed-nav #next { margin-left: 0; }
  body.ed-previewing { overflow: hidden; }
  body.ed-previewing .ed-fab { display: none; }
  body.ed-previewing .ed-preview { display: flex; position: fixed; inset: 0; z-index: 30; padding: 12px 12px max(12px, env(safe-area-inset-bottom, 0px)); background: var(--ivory); }
  body.ed-previewing .ed-close { display: inline-flex; }
  body.ed-previewing .ed-preview .phone { width: 100%; max-width: 420px; height: auto; flex: 1; min-height: 0; border-width: 4px; border-radius: 28px; }
}

/* a greyed-out Publish must look greyed out, or a click that does nothing reads as "broken" */
.ed-pub .btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* banquet region + Blink offers opt-in (details step), booth card (publish step) */
.ed-offers { display: grid; gap: 10px; }
.ed-tick { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; line-height: 1.5; cursor: pointer; }
.ed-tick input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--rose-deep); }
.ed-blink { margin-top: 16px; }

/* QA 2026-11-25 */
.ed-more { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.ed-more .ed-hint { display: inline-block; padding-top: 4px; }
.ed-check .ed-warn { color: var(--rose-deep); }
.ed-unpub { display: grid; gap: 8px; justify-items: start; }
.ed-unpub[hidden] { display: none; }
.ed .own-nav { margin: 4px 0 8px; }
.ed-lost { font-size: 16px; }

/* ---------- Add-ons step: one line per add-on (tick, name, price, Example), then the total + pay card ---------- */
.ed-paid { margin: 0 0 4px; color: var(--taupe); font-size: 16px; line-height: 1.5; }
.ed-addons { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ed-addon { padding: 10px 14px; border: 1px solid var(--champagne); border-radius: 14px; background: rgba(255, 255, 255, 0.55); transition: border-color 0.15s ease, background 0.15s ease; }
.ed-addon.picked { border-color: var(--rose, #C9A2A0); background: #fff; }
.ed-addon.showing { border-color: var(--chocolate); }
.ed-addon.have { background: transparent; }
.ed-addon-line { display: flex; align-items: center; gap: 10px; }
.ed-addon-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.ed-addon-row input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--olive); }
.ed-addon-name { flex: 1; min-width: 0; font-family: var(--serif); font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--chocolate); overflow-wrap: anywhere; }
.ed-addon-price { flex: none; font-family: var(--serif); font-size: 18px; white-space: nowrap; color: var(--chocolate); }
.ed-addon-why { margin: 8px 0 0 34px; font-size: 16px; line-height: 1.5; color: var(--taupe); }
.ed-addon-demo { flex: none; padding: 4px 0; border: none; border-bottom: 1px solid var(--rose, #C9A2A0); background: none; font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--rose-deep, #8E4F5A); cursor: pointer; }
.ed-addon-box { margin: 10px 0 0 34px; padding: 12px 14px; border-radius: 10px; background: var(--champagne-tint, #F3ECE0); font-size: 15px; line-height: 1.5; }
.ed-addon-box p { margin: 0 0 6px; }
.ed-addon-box audio { width: 100%; max-width: 320px; }
.ed-csv { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.ed-csv th, .ed-csv td { padding: 5px 8px; border: 1px solid var(--champagne); text-align: left; }
.ed-csv th { background: #EDF0E6; font-weight: 600; }
.ed-url { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.ed-url span { flex: none; width: 4.5em; color: var(--taupe); }
.ed-url code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--champagne); font-family: inherit; }
.ed-url.mine code { border-color: var(--olive); color: var(--olive-deep, #3F4A30); font-weight: 600; }
.ed-event { margin: 0; padding-left: 1.2em; }
.ed-addons-bundle { margin: 0 0 12px; padding: 12px 14px; border-radius: 10px; background: #EDF0E6; font-size: 16px; line-height: 1.5; }
.ed-addons-bundle .btn { margin-left: 6px; }
@media (max-width: 520px) { .ed-addon-why, .ed-addon-box { margin-left: 0; } .ed-addon-name, .ed-addon-price { font-size: 17px; } }

/* the total and the one button that matters */
.ed-paybar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 14px 0 6px; padding: 14px 16px;
  border-radius: 16px 20px 14px 22px / 20px 14px 22px 16px; background: linear-gradient(160deg, #fff 0%, var(--blush-tint, #F6E9E4) 100%); border: 1px solid var(--blush, #E8CFC8); }
.ed-paybar[hidden] { display: none; }
.ed-paybar.only-msg .ed-paybar-total, .ed-paybar.only-msg .ed-paybar-act { display: none; }
.ed-paybar-total { display: grid; }
.ed-paybar-total .label { font-size: 12px; color: var(--taupe); }
.ed-paybar-total b { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.05; color: var(--chocolate); white-space: nowrap; }
.ed-paybar-act { display: grid; justify-items: center; gap: 4px; flex: 1 1 180px; max-width: 280px; }
.ed-paybar-act .btn { width: 100%; }
.ed-paybar-act [hidden] { display: none; }
.ed-paybar-msg { flex-basis: 100%; margin: 0; font-size: 15px; color: var(--chocolate); text-align: center; }
.ed-paybar-msg[hidden] { display: none; }

/* own music and the extra event page (Add-ons step, 0008) */
.ed-file { position: relative; display: inline-flex; align-items: center; margin: 8px 0 4px; cursor: pointer; overflow: hidden; }
.ed-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.ed-file[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.ed-file:focus-within { outline: 2px solid var(--chocolate); outline-offset: 2px; }
.ed-msg { color: var(--rose-deep, #8C3B3B); font-size: 16px; }
.ed-evbox { display: flex; flex-direction: column; gap: 14px; }
.ed-evbox .two { gap: 12px; }
.ed-evbox .field { margin: 0; }
.ed-evbox .ed-hint { margin: 0; }
.ed-evp { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-evp .chip { min-height: 42px; font-size: 17px; font-style: normal; }

/* Publish: Google sign-in box (api/auth.mjs). Shown only after pressing Publish, never while designing. */
.ed-signin { margin-top: 18px; padding: 22px 22px 18px; border: 1px solid var(--champagne); border-radius: 20px 26px 18px 28px / 26px 18px 28px 20px;
  background: linear-gradient(160deg, rgba(243, 227, 223, 0.65), rgba(255, 255, 255, 0.85)); display: grid; gap: 8px; justify-items: start; }
.ed-signin[hidden] { display: none; }
.ed-signin h3 { font-size: 28px; margin: 0; }
.ed-signin .label { color: var(--rose-deep); font-size: 13px; }
.ed-signin .ed-hint { margin: 0 0 6px; }
.ed-gbtn { min-height: 44px; }
.ed-signin.busy .ed-gbtn { opacity: .4; pointer-events: none; }
.ed-signin .err { margin: 0; }
.ed-who { margin: 6px 0 0; }
.ed-small-link { font: inherit; font-style: italic; color: var(--rose-deep); font-size: 17px; padding: 0 2px; background: none; border: 0; border-bottom: 1px solid var(--rose); cursor: pointer; }
/* Turnstile shows nothing unless Cloudflare wants the visitor to tick a box */
.ts-box { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; }

/* live: one next step (send it), then three rows */
.ed-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); border: 0; padding: 0; opacity: 0; }
.ed-pub { position: relative; }
.ed-pub.is-live { background: url("ill-garland.webp") center bottom 14px / 200px auto no-repeat, linear-gradient(170deg, #FFFDF8, #F8F3E9 50%, #F6E7E3); padding-bottom: 76px; }
.ed-live-ill { display: block; width: 132px; height: auto; margin: -6px auto 0; }
.ed-live-ill[hidden] { display: none; }
.ed-pub.is-live #pub-title { text-align: center; margin: 0; }
.ed-live { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 0 6px; }
.ed-live[hidden] { display: none; }
.ed-live-url { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; min-height: 44px; padding: 6px 8px 6px 18px; border: 1px dashed var(--rose); border-radius: 999px; background: rgba(255, 255, 255, 0.7); color: var(--chocolate); font-family: var(--serif); font-size: 18px; cursor: pointer; }
.ed-live-url span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-live-url i { flex: none; font-style: normal; font-size: 14px; letter-spacing: 0.1em; padding: 5px 12px; border-radius: 999px; background: var(--chocolate); color: var(--ivory); }
.ed-live .btn { width: 100%; max-width: 360px; justify-content: center; }
.ed-next { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--champagne); }
.ed-next[hidden] { display: none; }
.ed-next a { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 2px; border-bottom: 1px solid var(--champagne); color: var(--chocolate); text-decoration: none; }
.ed-next img { width: 46px; height: 46px; object-fit: contain; flex: none; }
.ed-next b { flex: 1; min-width: 0; font-size: 20px; font-weight: 500; }
html[lang="zh-Hant"] .ed-next b { font-size: 18px; letter-spacing: 0.06em; }
.ed-next a::after { content: "→"; color: var(--rose-deep); font-size: 20px; }
.ed-next .ed-tag { flex: none; }
.ed-pub.is-live .ed-blink { margin-top: 22px; }
.ed-more-opts .ed-mine { width: 100%; padding-top: 4px; }
.ed-live .btn, .ed-pub .blink-card .btn[data-blink-wa] { letter-spacing: 0.1em; white-space: nowrap; padding-left: 18px; padding-right: 18px; }
.ed-pub .blink-card .btn[data-blink-wa] { width: 100%; justify-content: center; }
@media (max-width: 520px) { .ed-pub.is-live { padding-left: 18px; padding-right: 18px; } .ed-pub.is-live .blink-card { padding: 18px 16px 16px; } }
