@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;500;700&display=swap");

/* 客人頁面：深色卡片＋膠囊按鈕（參考店家 Carrd 名片頁的風格） */
:root {
  --bg: #1c1c1c;
  --card: #2a2a2a;
  --card-grad: linear-gradient(160deg, #3b3b3b 0%, #2a2a2a 45%, #212121 100%);
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, .6);
  --line: rgba(255, 255, 255, .14);
  --field: rgba(255, 255, 255, .06);
  --ghost: rgba(255, 255, 255, .1);
  --brand: #ffc9c9;
  --brand-ink: #730000;
  --brand-soft: rgba(255, 201, 201, .14);
  --accent: #fff0ba;
  --accent-ink: #6e6300;
  --link: #ffc9c9;
  --ok: #9be0bb;
  --ok-soft: rgba(155, 224, 187, .14);
  --danger: #ff9e9e;
  --danger-soft: rgba(255, 158, 158, .14);
  --radius: 22px;
  --shadow: 0 20px 80px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* 店家後台：跟客人頁面同一套深色風格，卡片改成平面、圓角小一點，資料多時比較好閱讀 */
body.admin {
  --card-grad: var(--card);
  --radius: 18px;
  --shadow: none;
}
body.admin .card { border: 1px solid var(--line); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: .02em;
}
b, strong, h1, h2, h3, .name, .price, .when, .t { font-weight: 700; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); }

/* ---------- 預約頁：App 風格標頭 ---------- */
.app-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px 12px; padding-top: calc(14px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; background: #000; border: 1.5px solid rgba(255, 255, 255, .5); object-fit: cover; flex: none; }
.brand-name { display: block; font-size: 19px; font-weight: 700; letter-spacing: .04em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { display: block; font-size: 10px; letter-spacing: .2em; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand > span { min-width: 0; }
.head-actions { display: flex; gap: 6px; flex: none; }
.head-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 44px; padding: 6px 12px;
  background: var(--ghost); color: var(--muted); font-size: 13px; text-decoration: none; cursor: pointer; flex: none;
}
.head-btn svg { width: 15px; height: 15px; }
.head-btn.primary { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
@media (max-width: 420px) {
  .head-btn .lbl { display: none; } /* 手機上登出只顯示圖示 */
  .head-btn { padding: 6px 10px; }
}
.list-card .btn svg { width: 15px; height: 15px; }

/* 首頁：會員中心在 Logo 同一排的最右邊 */
.logo-row { position: relative; }
.member-link {
  position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 44px;
  background: rgba(17, 17, 17, .8); border: 1px solid rgba(255, 255, 255, .2);
  color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-decoration: none;
}
.member-link:hover { border-color: var(--brand); color: var(--brand); }
.member-link svg { width: 14px; height: 14px; }
.logo-row:has(.logo[hidden]) { min-height: 34px; margin-bottom: 10px; }
.notice {
  margin: 0 0 18px; padding: 12px 16px; border-radius: 16px;
  background: var(--accent); color: var(--accent-ink); font-size: 14px; white-space: pre-line;
}

/* 區塊標題：英文＋中文的小字標籤 */
.sec-label { margin: 26px 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: .24em; color: var(--muted); }
.sec-label span { letter-spacing: .14em; }
#panel-book > #booking-form > .sec-label:first-child, #service-list > .sec-label:first-child { margin-top: 8px; }

/* 一般區塊（白卡片在深色主題裡的對應） */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel.empty { padding: 22px 16px; }

/* 服務分類分頁（底線樣式） */
.cat-tabs {
  display: flex; gap: 26px; overflow-x: auto; margin: 0 -16px 4px; padding: 0 20px;
  border-bottom: 1px solid var(--line); scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button {
  flex: none; border: 0; background: none; padding: 12px 0 10px; cursor: pointer; white-space: nowrap;
  font-size: 16px; font-weight: 700; color: var(--muted); opacity: .7; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.cat-tabs button[aria-pressed="true"] { color: var(--ink); opacity: 1; border-bottom-color: var(--brand); }

/* 右上角導覽：首頁／我要預約／好物購買／會員中心 */
.top-nav { display: flex; gap: 2px; flex: none; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 50px;
  padding: 5px 4px 4px; border-radius: 12px; font-size: 10.5px; font-weight: 500; letter-spacing: .04em;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.nav-item[hidden] { display: none; }
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: var(--ink); }
.nav-item[aria-current="page"] { color: var(--brand); font-weight: 700; background: var(--brand-soft); }
/* 手機上空間不夠時，店名文字收起來只留 Logo */
@media (max-width: 400px) {
  .app-head { padding-left: 14px; padding-right: 10px; gap: 6px; }
  .app-head .brand > span { display: none; }
  .brand-logo { width: 38px; height: 38px; }
  .nav-item { min-width: 0; padding: 5px 7px 4px; }
}

/* ---------- 分頁 ---------- */
.tabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 4px; margin: 16px -16px 16px; padding: 8px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
}
.tab {
  flex: 1; padding: 10px 6px; border: 0; border-radius: 44px; background: transparent;
  color: var(--muted); font-weight: 500; cursor: pointer; white-space: nowrap; letter-spacing: .06em;
}
.tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 700; }

/* ---------- 卡片 ---------- */
.card { background: var(--card-grad); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 17px; letter-spacing: .06em; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

/* ---------- 服務項目（卡片） ---------- */
#panel-book #service-list { display: grid; gap: 12px; }
.service {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px; text-align: left; width: 100%;
  padding: 18px 20px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--card); cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.service:hover { border-color: rgba(255, 201, 201, .45); }
.service:active { transform: scale(.99); }
.service[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--card)); }
.service .name { font-size: 17px; letter-spacing: .04em; }
.service .price { font-size: 17px; text-align: right; white-space: nowrap; }
.service .meta { grid-column: 1; display: flex; flex-direction: column; color: var(--muted); font-size: 13px; line-height: 1.5; }
.service .meta .desc { opacity: .85; white-space: pre-line; }
.service .tag { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; }
.tag {
  display: inline-block; padding: 3px 12px; border-radius: 44px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.tag.soft { background: var(--ghost); color: var(--ink); font-weight: 500; margin-left: 10px; }

/* ---------- 日期 / 時段 ---------- */
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.date-btn {
  flex: none; width: 62px; padding: 8px 0; border: 1.5px solid var(--line); border-radius: 18px;
  background: var(--field); cursor: pointer; scroll-snap-align: start; text-align: center;
}
.date-btn .w { font-size: 12px; color: var(--muted); }
.date-btn .d { font-size: 19px; font-weight: 700; line-height: 1.2; }
.date-btn .m { font-size: 11px; color: var(--muted); }
.date-btn:disabled { opacity: .3; cursor: not-allowed; background: transparent; }
.date-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.date-btn[aria-pressed="true"] .w, .date-btn[aria-pressed="true"] .m { color: var(--brand-ink); opacity: .8; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin-top: 8px; }
.slot {
  padding: 10px 0; border: 1.5px solid var(--line); border-radius: 44px; background: var(--field);
  cursor: pointer; font-weight: 500; font-variant-numeric: tabular-nums;
}
.slot[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); font-weight: 700; }

/* ---------- 表單 ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field > span .req { color: var(--danger); margin-left: 2px; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type="text"], input[type="tel"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], input[type="url"], input[type="search"], select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--field);
  font-size: 16px; /* 避免 iOS 自動放大 */
  min-width: 0; max-width: 100%;
}
/* iPhone 的日期／時間欄位有固定最小寬度，會超出格子；改成跟一般欄位一樣可縮放 */
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; min-height: 2.6em; text-align: left; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
input[type="file"] { max-width: 100%; min-width: 0; }
/* iPhone：欄位字小於 16px 時一點進去整頁會被放大、版面跑掉，所以 iPhone 上一律 16px */
@supports (-webkit-touch-callout: none) {
  input, select, textarea { font-size: 16px !important; }
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 80px; }
select option { color: #212121; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 44px; border: 1.5px solid var(--line); background: var(--ghost);
  font-weight: 500; cursor: pointer; text-decoration: none; color: var(--ink); letter-spacing: .06em;
}
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 700; }
.btn.danger { color: var(--danger); border-color: var(--danger-soft); }
.btn.block { width: 100%; padding: 14px; font-size: 17px; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 會員登入 / 註冊 ---------- */
.auth-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 44px; background: var(--ghost); margin-bottom: 16px; }
.auth-tabs button { flex: 1; border: 0; border-radius: 44px; padding: 9px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 500; }
.auth-tabs button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.auth-title { margin: 0 0 12px; font-size: 17px; letter-spacing: .06em; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); margin: 4px 0 14px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--brand); }
.consent a { color: var(--link); text-underline-offset: 3px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.link { all: unset; cursor: pointer; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
input[name="code"] { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
input[name="code"]::placeholder { letter-spacing: .04em; }
.booker { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--ghost); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.booker > span:first-child { color: var(--muted); }
.booker .link { margin-left: auto; }

/* ---------- 會員專區 ---------- */
.member-card {
  position: relative; overflow: hidden; margin-top: 4px; padding: 18px 20px 16px; border-radius: 22px;
  background: linear-gradient(150deg, #3d3d3d 0%, #2a2a2a 50%, #1f1f1f 100%);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.member-card::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -90px; border-radius: 50%;
  border: 1.5px solid rgba(255, 201, 201, .28); pointer-events: none;
}
.mc-shop { font-size: 10.5px; font-weight: 700; letter-spacing: .32em; color: var(--muted); }
.mc-main { display: flex; align-items: center; gap: 14px; margin: 14px 0 14px; }
.mc-logo { width: 52px; height: 52px; border-radius: 50%; background: #000; border: 2px solid rgba(255, 255, 255, .7); object-fit: cover; flex: none; }
.mc-label { font-size: 9.5px; font-weight: 700; letter-spacing: .24em; color: var(--muted); text-transform: uppercase; }
.mc-name { font-size: 21px; font-weight: 700; letter-spacing: .08em; line-height: 1.3; }
.mc-grid { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.mc-val { font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.mc-val b { font-size: 18px; color: var(--brand); margin-right: 2px; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.quick-grid.single { grid-template-columns: 1fr; margin-top: 4px; }
.quick {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .04em; cursor: pointer; white-space: nowrap;
}
.quick .qi {
  width: 22px; height: 22px; border-radius: 50%; background: var(--ghost); color: var(--brand);
  display: grid; place-items: center; font-size: 13px; flex: none;
}
.quick .qi svg { width: 14px; height: 14px; }

.list-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 20px; margin-bottom: 10px; border-radius: 20px; background: var(--card); border: 1px solid var(--line);
}
.list-card .name { font-size: 16px; letter-spacing: .04em; }
.list-card .sub { display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; margin-top: 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.list-card .right { text-align: right; white-space: nowrap; }
.member-note { text-align: center; color: var(--muted); font-size: 11.5px; line-height: 1.9; margin: 28px 0 6px; white-space: pre-line; }
.member-note:empty { display: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-line; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { padding: 5px 12px; border-radius: 44px; background: var(--brand-soft); font-size: 13px; }
.chip b { color: var(--brand); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.stat-row > div { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 6px; }
.stat-row .v { font-size: 17px; font-weight: 700; white-space: nowrap; }
.stat-row .k { font-size: 12px; color: var(--muted); }
.stat-row > div:first-child { grid-column: 1 / -1; }
.stat-row > div:first-child .v { font-size: 26px; color: var(--brand); }

.summary { background: var(--brand-soft); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; font-size: 15px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; }

.alert { padding: 10px 14px; border-radius: 14px; margin: 0 0 12px; font-size: 14px; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- 成功畫面 ---------- */
.success { text-align: center; padding: 28px 20px; }
.success .icon { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 12px; font-size: 32px; }
.success h2 { margin: 0 0 6px; letter-spacing: .08em; }
.success .done-logo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: #000; border: 3px solid #fff; display: block; margin: 0 auto 14px; }
.success .cheers { margin: 0; font-size: 16px; color: var(--brand); letter-spacing: .02em; }
.success .actions .btn svg { width: 16px; height: 16px; }
.success .summary { text-align: left; margin-top: 16px; }
.success .actions { display: grid; gap: 8px; margin-top: 16px; }

/* ---------- 我的預約 ---------- */
.booking-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.booking-item:first-child, .step-title + .booking-item, .chips + .booking-item { border-top: 0; }

/* ---------- 產品 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.product { background: var(--card-grad); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.product .img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--ghost); }
.product .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product .price { color: var(--brand); }
.product .desc { font-size: 13px; color: var(--muted); white-space: pre-line; flex: 1; }
.product .btn { margin-top: 8px; }
.product .pic { position: relative; }
.product.sold-out .img { filter: grayscale(1); opacity: .45; }
.product.sold-out .name, .product.sold-out .price { opacity: .6; }
.sold-tag { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.75); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .1em; padding: 3px 10px; border-radius: 999px; }
.sold-tag.inline { position: static; align-self: flex-start; margin-bottom: 2px; }
.product.no-pic .body { padding-top: 14px; }
.sold-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.sold-note a { color: var(--brand); }

.footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 32px; }
#panel-products .sec-label { margin-top: 8px; }

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}

/* ---------- 首頁（名片卡風格） ---------- */
.home-shell { max-width: 420px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 16px 28px; }
.profile-card { background: var(--card-grad); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(255, 255, 255, .07); }
.profile-cover { aspect-ratio: 16 / 9; background: #111 center / cover no-repeat; }
.profile-body { padding: 28px 22px 22px; text-align: center; }
.profile-cover:not([hidden]) + .profile-body { padding-top: 0; }
.logo {
  width: 88px; height: 88px; border-radius: 50%; border: 3px solid #fff; object-fit: cover;
  display: block; margin: 0 auto 14px; background: #111;
}
.profile-cover:not([hidden]) + .profile-body .logo { margin-top: -44px; position: relative; }
.profile-body h1 { margin: 0; font-size: 21px; letter-spacing: .18em; font-weight: 800; }
.tagline { margin: 6px 0 0; font-size: 10.5px; letter-spacing: .42em; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.intro { margin: 16px 0 0; font-size: 12px; line-height: 1.8; letter-spacing: .08em; white-space: pre-line; color: rgba(255, 255, 255, .82); }
.pill-stack { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 26px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 62%; max-width: 100%;
  padding: 11px 22px; border-radius: 44px; font-size: 14px; letter-spacing: .1em; text-decoration: none;
  background: var(--ghost); color: #fff; transition: transform .15s;
}
.pill:hover { transform: translateY(-1px); }
.pill.pink { background: #ffc9c9; color: #730000; font-weight: 800; font-size: 14px; letter-spacing: .24em; padding: 12px 26px; }
.pill.yellow { background: #fff0ba; color: #6e6300; }
.pill svg { width: 17px; height: 17px; flex: none; }

.profile-section { padding: 18px 22px; border-top: 1px solid var(--line); }
.section-title { margin: 0 0 12px; font-size: 10.5px; letter-spacing: .4em; text-align: center; color: var(--muted); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery button { all: unset; cursor: pointer; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--ghost); }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gallery button:hover img { transform: scale(1.04); }
.hours-list { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 6px 24px; margin: 0; font-size: 14.5px; letter-spacing: .04em; }
.hours-list dt { color: var(--muted); }
.hours-list dd { margin: 0; font-variant-numeric: tabular-nums; }
.hours-list .closed { color: var(--muted); }
.hours-list .today { font-weight: 700; color: #ffc9c9; }
.address { margin: 0 0 12px; text-align: center; font-size: 12.5px; letter-spacing: .04em; }
.map { border-radius: 16px; overflow: hidden; background: var(--ghost); }
.map iframe { display: block; width: 100%; height: 170px; border: 0; filter: grayscale(1) invert(.92) contrast(.9); }

.icon-bar { background: #111; border-top: 1px solid var(--line); display: flex; justify-content: center; gap: 12px; padding: 14px 16px; }
.icon-bar a {
  width: 40px; height: 40px; border-radius: 50%; background: transparent; border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  display: grid; place-items: center; transition: background .15s;
}
.icon-bar a:hover { background: rgba(255, 201, 201, .14); border-color: #ffc9c9; color: #ffc9c9; }
.icon-bar svg { width: 19px; height: 19px; }

.home-actions { display: flex; gap: 10px; margin-top: 20px; }
.home-actions .pill { flex: 1; min-width: 0; padding: 10px 12px; font-size: 13px; letter-spacing: .14em; }
.pill.outline { background: transparent; border: 1.5px solid #ffc9c9; color: #ffc9c9; font-weight: 800; }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  transform: translateY(110%); transition: transform .2s;
}
.sticky-cta.show { transform: none; }
.sticky-cta .pill { display: flex; max-width: 448px; margin: 0 auto; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 720px); text-align: center; color: #fff; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 12px; display: block; margin: 0 auto; }
.lightbox p { margin: 10px 0; }
.lightbox form { margin: 0; }
#staff-pick { margin-bottom: 12px; }

/* ---------- 選擇設計師 ---------- */
.stylist-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 150px)); grid-auto-rows: 1fr; justify-content: center; gap: 8px; margin-bottom: 18px; }
/* 一排最多三張、每張一樣大、整組置中（欄數由 app.js 依人數設定） */
.stylist-grid:not(.picked) .stylist { justify-content: flex-start; }
@media (max-width: 560px) {
  .stylist-grid:not(.picked) .stylist { padding: 12px 6px 10px; gap: 6px; border-radius: 14px; }
  .stylist-grid:not(.picked) .stylist img, .stylist-grid:not(.picked) .stylist .ph { width: 52px; height: 52px; font-size: 20px; }
  .stylist-grid:not(.picked) .stylist .nm { font-size: 13.5px; letter-spacing: .06em; }
  .stylist-grid:not(.picked) .stylist .ti { font-size: 9.5px; letter-spacing: .14em; }
  .stylist-grid:not(.picked) .stylist .bio { font-size: 10.5px; line-height: 1.45; margin-top: 2px; }
}
.stylist {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 16px 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: border-color .15s, transform .15s;
}
.stylist:hover { border-color: rgba(255, 201, 201, .5); transform: translateY(-1px); }
.stylist:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.stylist[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.stylist img, .stylist .ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.stylist .ph { display: grid; place-items: center; background: #111; border: 1.5px solid rgba(255, 255, 255, .25); font-size: 26px; font-weight: 800; color: var(--brand); }
.stylist.any .ph { border-style: dashed; color: var(--muted); font-size: 22px; }
.stylist .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stylist .nm { font-weight: 800; letter-spacing: .1em; }
.stylist .ti { font-size: 10.5px; letter-spacing: .24em; color: var(--brand); font-weight: 700; }
.stylist .bio { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 4px; white-space: pre-line; }
/* 選好之後收成一行 */
.stylist-grid.picked { display: flex; align-items: center; gap: 10px; }
.stylist-grid.picked .stylist { flex: 1; flex-direction: row; text-align: left; padding: 10px 14px; cursor: default; transform: none; }
.stylist-grid.picked .stylist img, .stylist-grid.picked .stylist .ph { width: 40px; height: 40px; font-size: 16px; }
.stylist-grid.picked .bio { display: none; }
.stylist-grid.picked .change { flex: none; }

/* ---------- 產品預訂與加購 ---------- */
.product .buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.product .buy .btn { margin-top: 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--ghost); }
.stepper button { all: unset; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; font-size: 16px; color: var(--brand); }
.stepper button:focus-visible { outline: 2px solid var(--brand); }
.stepper b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.cart-bar {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6; margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #111; border: 1.5px solid var(--brand); border-radius: 18px; padding: 10px 12px 10px 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.cart-bar small { display: block; font-size: 11px; color: var(--muted); }
.cart-bar b { color: var(--brand); }
#order-done { margin-top: 16px; }
#addon-list { max-height: 360px; overflow-y: auto; }
.addon-item { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); }
.addon-item:first-child { border-top: 0; }
.addon-item img, .addon-item .ph { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--ghost); flex: none; }
.addon-item .nm { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; }
.addon-item .nm small { display: block; color: var(--muted); }
.addon-item .btn { padding: 5px 10px; font-size: 12px; }

.logout-row { display: flex; justify-content: center; margin-top: 24px; }
.logout-row .btn svg { width: 15px; height: 15px; }

/* 服務多選＋同頁加購 */
.service .pick { grid-column: 2; justify-self: end; align-self: end; font-size: 12px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.service[aria-pressed="true"] .pick { color: var(--brand-ink); background: var(--brand); border-radius: 999px; padding: 2px 9px; }
.addon-panel { padding: 0; overflow: hidden; }
#addon-section .cat-tabs button { font-size: 14px; }
.pick-bar {
  position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6; margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #111; border: 1.5px solid var(--brand); border-radius: 18px; padding: 10px 12px 10px 16px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  font-size: 13px;
}
.pick-bar b { color: var(--brand); }
.pick-bar small { display: block; font-size: 11.5px; color: var(--muted); }
.pick-bar .btn { flex: none; }
.pick-bar .btn:disabled { opacity: .4; }

/* 確認預約前的預約須知 */
.notice-title { margin: 4px 0 8px; font-size: 13px; letter-spacing: .2em; color: var(--muted); }
#notice-box .notice { margin-bottom: 10px; font-size: 13px; line-height: 1.7; font-weight: 700; }
.notice-agree { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.notice-agree input { width: 18px; height: 18px; accent-color: var(--brand); }
#book-confirm textarea[name="note"]::placeholder { font-size: 12px; }

/* ---------- 預約流程：每一步同樣的框（標題＋一個 panel）---------- */
#panel-book .sec-label { margin-top: 26px; }
#panel-book #step-staff .sec-label { margin-top: 8px; }
.list-panel { padding: 0; overflow: hidden; }
.list-panel .cat-tabs { margin: 0; padding: 0 18px; gap: 22px; }
.list-panel .cat-tabs button { font-size: 14px; padding: 12px 0 10px; }
/* 服務項目在框裡改成一列一列，跟加購產品一致 */
#panel-book #service-list { display: block; }
#service-list .service {
  border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 14px 18px;
}
#service-list .service:first-child { border-top: 0; }
#service-list .service:active { transform: none; }
#service-list .service:hover { background: rgba(255, 255, 255, .03); }
#service-list .service[aria-pressed="true"] { background: color-mix(in srgb, var(--brand) 9%, transparent); }
#service-list .service .name, #service-list .service .price { font-size: 15.5px; }
#addon-list { max-height: none; }
.addon-item { padding: 10px 18px; }
/* 設計師在框裡 */
#stylist-grid { margin-bottom: 0; }
.stylist-grid.picked .stylist { border: 0; background: transparent; padding: 0; box-shadow: none; }
.stylist-grid.picked .change { margin-left: auto; }
.pick-bar { margin-top: 18px; }

/* 服務項目：大標題（英文）＋中標題（中文）＋小介紹；右下角「我要預約」小按鈕，選了變成人數 */
#service-list .service { cursor: default; }
#service-list .service[aria-selected="true"] { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.service .meta .sub { font-size: 14px; color: var(--ink); font-weight: 700; letter-spacing: .06em; margin: 2px 0; }
.service .meta .desc { font-size: 12.5px; line-height: 1.6; }
.service .meta .dur { font-size: 12px; margin-top: 2px; }
.service .pick { padding: 0; background: none !important; }
.book-btn {
  all: unset; cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 5px 12px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink);
}
.book-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.service .stepper button { width: 28px; height: 28px; }
.stylist-grid.can-change .stylist { cursor: pointer; }

/* 確認預約區的字體大小（店家指定） */
#book-confirm .summary { font-size: 13px; }
#book-confirm .field > span { font-size: 11px; }
#book-confirm textarea[name="note"] { min-height: 48px; font-size: 11px !important; padding: 8px 12px; }
#book-confirm textarea[name="note"]::placeholder { font-size: 10px; }
#book-confirm .notice-title { font-size: 12px; }
#notice-box .notice { font-size: 11px; }
#book-confirm .notice-agree { font-size: 11px; }
#book-confirm .notice-agree input { width: 15px; height: 15px; }
#submit-btn { font-size: 14px; padding: 12px; }

/* ==========================================================================
   客人頁面（預約、會員中心、好物）統一字級：手機與電腦同一套大小
   標題 14px／內文 13px／標籤 12px／說明 11px／提示 10px；按鈕跟著字縮小
   ========================================================================== */
body:not(.admin) .sec-label { font-size: 12px; }
body:not(.admin) .cat-tabs button { font-size: 13px; }
/* 設計師卡片 */
body:not(.admin) .stylist .nm { font-size: 13px; }
body:not(.admin) .stylist .ti { font-size: 10px; }
body:not(.admin) .stylist .bio { font-size: 11px; }
/* 服務項目 */
body:not(.admin) #service-list .service .name, body:not(.admin) #service-list .service .price { font-size: 14px; }
body:not(.admin) .service .meta .sub { font-size: 13px; }
body:not(.admin) .service .meta .desc, body:not(.admin) .service .meta .dur { font-size: 11px; }
body:not(.admin) .book-btn { font-size: 11px; padding: 4px 11px; }
body:not(.admin) .tag { font-size: 11px; padding: 2px 10px; }
/* 加購與選取列 */
body:not(.admin) .addon-item .nm { font-size: 12px; }
body:not(.admin) .addon-item .nm small { font-size: 11px; }
body:not(.admin) .addon-item .btn, body:not(.admin) .stepper b { font-size: 11px; }
body:not(.admin) .pick-bar { font-size: 12px; }
body:not(.admin) .pick-bar small { font-size: 11px; }
body:not(.admin) .pick-bar .btn { font-size: 12px; padding: 7px 14px; }
/* 日期時段 */
body:not(.admin) .date-btn .w { font-size: 11px; }
body:not(.admin) .date-btn .d { font-size: 17px; }
body:not(.admin) .date-btn .m { font-size: 10px; }
body:not(.admin) #slot-area > p { font-size: 11px !important; }
body:not(.admin) .slot { font-size: 13px; padding-top: 9px; padding-bottom: 9px; }
/* 確認預約 */
#notice-box .notice { font-size: 12px; }
#submit-btn { font-size: 13px; padding: 10px; }
/* 登入／註冊表單 */
body:not(.admin) .auth-tabs button { font-size: 13px; padding: 7px; }
body:not(.admin) .field > span { font-size: 11px; }
body:not(.admin) .field small, body:not(.admin) .auth-links { font-size: 11px; }
body:not(.admin) input::placeholder, body:not(.admin) textarea::placeholder { font-size: 10px; }
body:not(.admin) .btn { font-size: 12px; }
body:not(.admin) .btn.block { font-size: 13px; padding: 10px; }
body:not(.admin) .btn.sm { font-size: 11px; }
body:not(.admin) .alert { font-size: 12px; }
/* 預約成功 */
body:not(.admin) .success h2 { font-size: 17px; }
body:not(.admin) .success .cheers { font-size: 13px; }
body:not(.admin) .success .summary { font-size: 13px; }
body:not(.admin) .success .small { font-size: 11px; }
/* 會員中心 */
body:not(.admin) .list-card .name { font-size: 14px; }
body:not(.admin) .list-card .sub { font-size: 11px; }
body:not(.admin) .list-card .right { font-size: 13px; }
body:not(.admin) .chip, body:not(.admin) .kv { font-size: 13px; }
body:not(.admin) .stat-row .v { font-size: 14px; }
body:not(.admin) .stat-row .k { font-size: 11px; }
body:not(.admin) .stat-row > div:first-child .v { font-size: 20px; }
body:not(.admin) .panel.empty, body:not(.admin) .empty { font-size: 12px; }
/* 好物 */
body:not(.admin) .product .name, body:not(.admin) .product .price { font-size: 14px; }
body:not(.admin) .product .desc, body:not(.admin) .sold-note { font-size: 11px; }
/* 頁尾 */
body:not(.admin) .member-note, body:not(.admin) .footer { font-size: 11px; }
/* 加價購：原價劃掉＋優惠價 */
.addon-item .nm s { font-size: 10px; }
.addon-item .nm .deal { color: var(--brand); }
