/*
 * 官網風格示範：給客戶用的風格選擇列與底部面板（不屬於店家網站本身，用好好運營的中性樣式）。
 * 客戶多半是在 LINE 點連結用手機看，所以以手機為主：底部一條可以左右滑的風格小卡。
 */
.pk, .pk-open, .sheet { --pk-ink: #1F2322; --pk-muted: #5B6361; --pk-line: #E3E1DA; --pk-bg: #FFFFFF; --pk-brand: #3F6B6E; --pk-brand-soft: #EAF1F0;
  font-family: 'Noto Sans TC', system-ui, sans-serif; letter-spacing: .02em; color: var(--pk-ink); }
body.has-picker { padding-bottom: 150px; }
body.has-picker .site a.fab { bottom: 160px; }

.pk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; background: var(--pk-bg); border-top: 1px solid var(--pk-line);
  box-shadow: 0 -12px 32px -20px rgba(0,0,0,.35); border-radius: 18px 18px 0 0; padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); }
.pk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px 8px; max-width: 1120px; margin: 0 auto; }
.pk-title { display: flex; align-items: baseline; gap: 10px; font-size: 14px; }
.pk-title b { font-weight: 700; }
.pk-sub { color: var(--pk-muted); font-size: 13px; }
.pk-link { background: none; border: 0; color: var(--pk-brand); font: 500 14px/1 inherit; padding: 8px 4px; cursor: pointer; min-height: 36px; }
.pk-row { display: flex; align-items: center; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.pk-chips { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 4px; flex: 1; min-width: 0; scrollbar-width: none; }
.pk-chips::-webkit-scrollbar { display: none; }

.chip { flex: 0 0 auto; scroll-snap-align: start; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 14px 8px 10px;
  border: 1.5px solid var(--pk-line); border-radius: 14px; background: #fff; color: var(--pk-ink); cursor: pointer; text-align: left; font: inherit; }
.chip[aria-pressed='true'] { border-color: var(--pk-brand); background: var(--pk-brand-soft); box-shadow: inset 0 0 0 1px var(--pk-brand); }
.chip b { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; }
.chip small { display: block; font-size: 12px; color: var(--pk-muted); line-height: 1.3; }
.chip .reco { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 6px; background: #FFF3C4; color: #6B4E00; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.chip.more { border-style: dashed; color: var(--pk-brand); font-weight: 600; }
.sw { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.sw i:first-child { grid-row: span 2; }

/* 我要這個風格：打開好好運營的 LINE 官方帳號，訊息先填好風格與示範連結 */
.pk-want { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 18px; border-radius: 14px; background: var(--pk-ink); color: #fff; font: 600 15px/1.2 inherit; text-decoration: none; }
.pk a.pk-want { color: #fff; text-decoration: none; } /* body 也有 .site，要蓋過店家網站的連結顏色 */
.pk-want:hover { background: #000; }
.pk-dot { width: 9px; height: 9px; border-radius: 50%; background: #06C755; box-shadow: 0 0 0 3px rgba(6,199,85,.25); }
.pk a:focus-visible { outline: 3px solid #FFC21A; outline-offset: 2px; }
.pk-mine { flex: 0 0 auto; min-height: 56px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--pk-brand); color: #fff; font: 600 15px/1.2 inherit; cursor: pointer; }
/* 收起後的「換風格」：深色膠囊＋旋轉的彩虹外框＋同色柔光，整顆慢慢呼吸，暗示「可以換很多種樣子」。
   用 scale（不是 transform）做呼吸，才不會蓋掉置中用的 translateX。
   按鈕本身是疊層的根：::after 是柔光（最底），::before 是彩虹框＋深色底，文字在最上面。 */
@property --pk-spin { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
.pk-open { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0;
  background: transparent; color: #fff; font: 600 15px/1 inherit; cursor: pointer;
  --pk-rainbow: conic-gradient(from var(--pk-spin), #FF5E7E, #FF9F45, #FFD84D, #5BD67A, #3CC8E8, #6C7CFF, #C062F0, #FF5E7E); }
.pk-open::before, .pk-open::after { content: ''; position: absolute; border-radius: inherit; pointer-events: none; }
.pk-open::before { inset: 0; z-index: -1; border: 2.5px solid transparent;
  background: linear-gradient(var(--pk-ink), var(--pk-ink)) padding-box, var(--pk-rainbow) border-box; }
.pk-open::after { inset: -3px; z-index: -2; background: var(--pk-rainbow); filter: blur(10px); opacity: .55; }
.pk-open:hover::after { opacity: .8; }
@keyframes pk-spin { to { --pk-spin: 360deg; } }
@keyframes pk-breathe { 0%, 100% { scale: 1; } 50% { scale: 1.06; } }
@media (prefers-reduced-motion: no-preference) {
  .pk-open { animation: pk-spin 4.5s linear infinite, pk-breathe 3.6s ease-in-out infinite; }
  .pk-open:hover, .pk-open:focus-visible { animation-play-state: running, paused; }
}
.pk button:focus-visible, .pk-open:focus-visible, .sheet :focus-visible { outline: 3px solid #FFC21A; outline-offset: 2px; }
@media (max-width: 640px) {
  .pk-sub { display: none; }
  .pk-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .pk-mine { min-height: 44px; }
  .pk-title { display: none; } /* 手機上把位置讓給按鈕 */
  .pk-top { justify-content: flex-end; }
  body.has-picker { padding-bottom: 190px; }
  body.has-picker .site a.fab { bottom: 200px; }
}

/* ---------- 底部面板 ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 95; background: rgba(20,22,22,.45); }
.sheet { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 96; width: min(640px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column;
  background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -20px 50px -20px rgba(0,0,0,.45); padding-bottom: env(safe-area-inset-bottom); }
.sheet[hidden], .sheet-back[hidden], .pk-open[hidden], .pk[hidden] { display: none; }
/* 開關動畫（11/6）：打開從下方中央放大淡入，關閉縮小淡出；JS 等動畫跑完才把面板藏起來 */
.sheet-back { opacity: 0; transition: opacity .22s ease; }
.sheet:not(.is-open), .sheet-back:not(.is-open) { pointer-events: none; } /* 縮小中不擋點擊 */
.sheet { opacity: 0; scale: .94; translate: 0 24px; transform-origin: 50% 100%;
  transition: opacity .2s ease, scale .24s cubic-bezier(.4, 0, .6, 1), translate .24s cubic-bezier(.4, 0, .6, 1); }
.sheet-back.is-open { opacity: 1; transition-duration: .3s; }
.sheet.is-open { opacity: 1; scale: 1; translate: 0 0;
  transition: opacity .26s ease, scale .4s cubic-bezier(.2, .9, .25, 1), translate .4s cubic-bezier(.2, .9, .25, 1); }
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet.is-open { scale: 1; translate: 0 0; transition: opacity .15s ease; }
}
/* 所有風格：電腦與 iPad 橫放排三欄（面板加寬），iPad 直放排兩欄，手機一欄 */
@media (min-width: 700px) {
  .sheet[data-kind='more'] { width: min(760px, calc(100% - 32px)); }
  .sheet[data-kind='more'] .style-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) and (orientation: landscape) {
  .sheet[data-kind='more'] { width: min(1040px, calc(100% - 64px)); }
  .sheet[data-kind='more'] .style-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; border-bottom: 1px solid var(--pk-line); }
.sheet-head h2 { margin: 0; font: 700 18px/1.3 'Noto Sans TC', system-ui, sans-serif; letter-spacing: .02em; }
.sheet-body { overflow-y: auto; padding: 16px 20px 24px; }
.sheet-body h3 { margin: 18px 0 10px; font: 700 14px/1.4 'Noto Sans TC', system-ui, sans-serif; color: var(--pk-muted); letter-spacing: .06em; }
.sheet-body h3:first-child { margin-top: 0; }
.fld { display: grid; gap: 6px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.fld input[type=text], .fld select { min-height: 46px; border: 1.5px solid var(--pk-line); border-radius: 10px; padding: 0 12px; font: 400 16px/1.2 'Noto Sans TC', system-ui, sans-serif; color: var(--pk-ink); background: #fff; }
.fld input[type=text]:focus, .fld select:focus { border-color: var(--pk-brand); outline: none; box-shadow: 0 0 0 3px var(--pk-brand-soft); }
.sheet .hint { font-size: 13px; font-weight: 400; color: var(--pk-muted); margin: 0; }
.logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; border: 1px solid var(--pk-line); }
.file-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--pk-line); font: 600 15px/1 inherit; cursor: pointer; background: #fff; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatches button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--pk-line); cursor: pointer; padding: 0; }
.swatches button[aria-pressed='true'] { box-shadow: 0 0 0 2.5px var(--pk-ink); }
.swatches label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.swatches input[type=color] { width: 44px; height: 40px; border: 1.5px solid var(--pk-line); border-radius: 10px; padding: 2px; background: #fff; }
.note-ok { color: #1F6B3A; } .note-adj { color: #8A5A00; }
.acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.acts button { min-height: 48px; padding: 0 20px; border-radius: 12px; font: 600 16px/1 'Noto Sans TC', system-ui, sans-serif; cursor: pointer; border: 1.5px solid var(--pk-line); background: #fff; color: var(--pk-ink); }
.acts .go { background: var(--pk-brand); border-color: var(--pk-brand); color: #fff; }
.share { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--pk-line); }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; min-height: 44px; border: 1.5px solid var(--pk-line); border-radius: 10px; padding: 0 10px; font: 400 13px/1 ui-monospace, Menlo, monospace; color: var(--pk-muted); background: #F7F7F4; }
.share-row button { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--pk-ink); color: #fff; font: 600 15px/1 'Noto Sans TC', system-ui, sans-serif; cursor: pointer; white-space: nowrap; }

/* 更多風格：卡片清單 */
.style-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.style-list .chip { width: 100%; }
.style-list .chip[disabled] { opacity: .55; cursor: default; border-style: dashed; }
.soon { font-size: 12px; color: var(--pk-muted); }

/* 11/4：「換成我的店」移到上排、「收起」左邊；「更多風格」固定在列尾，不會被擠到要左右滑才看得到 */
.pk-actions { display: flex; align-items: center; gap: 6px; }
.pk-top .pk-mine, .pk-top .pk-want { min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; }
.pk-row .chip.more { flex: 0 0 auto; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0; min-width: 104px; font-size: 15px; }
.pk-row .chip.more small { color: var(--pk-muted); font-weight: 400; }
@media (max-width: 640px) {
  .pk-row { flex-direction: row; align-items: stretch; gap: 8px; }
  .pk-row .chip.more { min-width: 84px; padding: 8px 10px; }
  body.has-picker { padding-bottom: 150px; }
  body.has-picker .site a.fab { bottom: 160px; }
}
@media (max-width: 380px) {
  .pk-actions { gap: 6px; }
  .pk-top .pk-mine, .pk-top .pk-want { padding: 0 11px; font-size: 13px; }
}

/* 我要這個風格（電腦版，11/6）：電腦瀏覽器打不開 LINE 的帶訊息連結，改用 QR Code 給手機掃 */
.want { display: grid; gap: 20px; }
@media (min-width: 560px) { .want { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.want-qr { width: 220px; aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; padding: 8px; border: 1px solid var(--pk-line); border-radius: 14px; background: #fff; text-align: center; }
.want-qr svg { display: block; width: 100%; height: 100%; }
.want-lead { margin: 0 0 10px; font-size: 15px; line-height: 1.7; }
.want-steps { margin: 0 0 16px; padding-left: 1.3em; font-size: 14px; line-height: 1.8; color: var(--pk-muted); }
.fld textarea { min-height: 96px; border: 1.5px solid var(--pk-line); border-radius: 10px; padding: 10px 12px; font: 400 14px/1.6 'Noto Sans TC', system-ui, sans-serif; color: var(--pk-muted); background: #F7F7F4; resize: none; }
.acts a.acts-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid var(--pk-line); background: #fff; color: var(--pk-ink); font: 600 16px/1 'Noto Sans TC', system-ui, sans-serif; text-decoration: none; }
