
/* ---- 店家設定頁（A 版面：左邊分區填寫、右邊手機預覽）---- */
.sp-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.sp-form { display: grid; flex: 999 1 480px; gap: 16px; min-width: 0; }
.sp-section { padding: 20px; box-shadow: none; }
.sp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.sp-head h2 { margin: 0; font-size: 17px; }
.sp-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; color: var(--brand-dark); border-radius: 99px; background: var(--surface-soft); font-size: 12px; font-weight: 700; white-space: nowrap; }
.sp-badge .ic { width: 13px; height: 13px; }
.sp-badge.is-open { color: #3f5b38; background: #e7eee3; }
.sp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sp-label { margin: 16px 0 8px; color: var(--muted); font-size: 13px; font-weight: 750; }
.sp-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.sp-logo .sp-label { margin-top: 0; }
.sp-logo-box { display: grid; place-items: center; width: 76px; height: 76px; overflow: hidden; color: var(--brand-dark); border: 1px dashed var(--sand); border-radius: 18px; background: var(--surface-soft); font-size: 28px; font-weight: 900; }
.sp-logo-box img { width: 100%; height: 100%; object-fit: cover; }
.sp-row-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-upload { display: inline-flex; align-items: center; cursor: pointer; }
.sp-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sp-swatch { width: 44px; height: 44px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.sp-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.sp-swatch:disabled { cursor: not-allowed; opacity: .6; }
.sp-hex { display: flex; align-items: center; gap: 8px; margin-left: 4px; color: var(--muted); font-size: 13px; }
.sp-hex input { width: 112px; height: 44px; padding: 0 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: #fff; font-family: ui-monospace, Menlo, monospace; }
.sp-warn { color: #8f2f21; }
.sp-layouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sp-layout-option { display: grid; gap: 4px; padding: 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; }
.sp-layout-option[aria-pressed="true"] { border: 2px solid var(--brand); padding: 11px; }
.sp-layout-option:disabled { cursor: not-allowed; opacity: .6; }
.sp-layout-option strong { font-size: 14px; }
.sp-layout-option small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.sp-thumb { display: grid; gap: 4px; height: 58px; margin-bottom: 6px; padding: 8px; overflow: hidden; border-radius: 10px; background: var(--bg); }
.sp-thumb i { display: block; height: 12px; border-radius: 4px; background: #fff; }
.sp-thumb i:first-child { width: 55%; height: 8px; background: var(--brand); }
.sp-thumb-cover { padding: 0; background: #fff; border: 1px solid var(--surface-soft); }
.sp-thumb-cover i:first-child { width: 100%; height: 28px; border-radius: 0; background: var(--brand-dark); }
.sp-thumb-cover i { width: 60%; height: 6px; margin: 0 8px; background: var(--line); }
.sp-thumb-minimal { gap: 9px; padding: 10px 8px; background: #fff; border: 1px solid var(--surface-soft); }
.sp-thumb-minimal i, .sp-thumb-minimal i:first-child { width: 100%; height: 1px; border-radius: 0; background: var(--line); }
.sp-thumb-minimal i:first-child { height: 2px; background: var(--ink); }
.sp-savebar { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); }
@media (min-width: 900px) { .sp-savebar { bottom: 16px; } .sp-preview { position: sticky; top: 24px; } }
.sp-preview { display: grid; flex: 1 1 300px; justify-items: center; gap: 8px; max-width: 340px; margin: 0 auto; }
.sp-preview .sp-label { margin: 0; }
.sp-phone { width: 300px; height: 600px; padding: 11px; border-radius: 40px; background: #2f241c; box-sizing: border-box; }
.sp-screen { height: 100%; overflow: hidden; padding: 18px 16px; color: var(--ink); border-radius: 30px; background: var(--bg); box-sizing: border-box; font-size: 12px; }
.sp-p-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sp-p-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sp-p-logo { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; background: #fff; }
.sp-p-eyebrow { overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; text-overflow: ellipsis; }
.sp-p-badge { padding: 3px 7px; color: var(--p-dark); border-radius: 99px; background: var(--p-soft); font-size: 9px; font-weight: 800; white-space: nowrap; }
.sp-p-hero { display: grid; gap: 4px; padding: 26px 0 16px; }
.sp-p-hero small { color: var(--muted); font-size: 11px; }
.sp-p-hero b { font-size: 28px; letter-spacing: -.04em; }
.sp-p-card { display: grid; gap: 8px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.sp-p-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; }
.sp-p-title i { display: grid; place-items: center; width: 20px; height: 20px; color: #fff; border-radius: 50%; background: var(--p-brand); font-size: 10px; font-style: normal; }
.sp-p-input { height: 32px; padding: 0 10px; line-height: 32px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.sp-p-input.short { width: 50%; }
.sp-p-slots { display: flex; gap: 6px; }
.sp-p-slots span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: #fff; }
.sp-p-slots .on { color: #fff; border-color: var(--p-brand); background: var(--p-brand); }
.sp-p-submit { display: grid; place-items: center; height: 40px; margin-top: 4px; color: #fff; border-radius: 12px; background: var(--p-brand); font-weight: 800; }
.sp-p-social { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 16px; padding-top: 10px; color: var(--p-dark); border-top: 1px solid var(--line); font-weight: 700; }
.sp-p-social small { flex-basis: 100%; color: var(--muted); font-size: 10px; font-weight: 600; text-align: center; }
.sp-screen.layout-cover { padding-top: 0; }
.sp-screen.layout-cover .sp-p-top, .sp-screen.layout-cover .sp-p-hero { margin: 0 -16px; padding-right: 18px; padding-left: 18px; color: #fff; background: var(--p-dark); }
.sp-screen.layout-cover .sp-p-top { padding-top: 18px; }
.sp-screen.layout-cover .sp-p-eyebrow, .sp-screen.layout-cover .sp-p-hero small { color: rgba(255, 255, 255, .85); }
.sp-screen.layout-cover .sp-p-badge { color: #fff; background: rgba(255, 255, 255, .16); }
.sp-screen.layout-cover .sp-p-hero { margin-bottom: 14px; padding-bottom: 22px; border-radius: 0 0 22px 22px; }
.sp-screen.layout-cover .sp-p-hero b { font-family: "Noto Serif TC", "Songti TC", serif; font-weight: 900; letter-spacing: 0; }
.sp-screen.layout-minimal { background: #fff; }
.sp-screen.layout-minimal .sp-p-top { padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.sp-screen.layout-minimal .sp-p-hero b { font-size: 22px; }
.sp-screen.layout-minimal .sp-p-card { padding: 12px 0; border-width: 1px 0; border-radius: 0; background: transparent; }
.sp-screen.layout-minimal .sp-p-title i { border-radius: 5px; }
.sp-screen.layout-minimal .sp-p-submit { border-radius: 8px; background: var(--ink); }
@media (max-width: 640px) {
  .sp-grid, .sp-layouts { grid-template-columns: 1fr; }
  .sp-phone { width: min(300px, 100%); }
}
@media (hover: hover) {
  .sp-layout-option:not(:disabled):hover { border-color: var(--sand); background: #fdf6ee; }
  .sp-swatch:not(:disabled):hover { box-shadow: 0 0 0 2px var(--sand); }
}
