:root {
  --ink: #172126;
  --muted: #64727a;
  --line: #dbe4e7;
  --brand: #16705b;
  --brand-dark: #10272b;
  --accent: #d97706;
  --danger: #b42318;
  --surface: #ffffff;
  --page: #eef3f1;
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(22, 112, 91, 0.12), transparent 42%),
    linear-gradient(180deg, #f7faf9 0%, var(--page) 100%);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.page,
.booking-page {
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 16px 16px 48px;
}

.hero {
  min-height: 58vh;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 24px;
  color: #fff;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(16, 39, 43, 0.82), rgba(22, 112, 91, 0.72)),
    var(--booking-hero-image, url("https://images.unsplash.com/photo-1540555700478-4be289fbecef?auto=format&fit=crop&w=1200&q=80")) center/cover;
}

.hero span { font-weight: 800; letter-spacing: 0.04em; }
.hero h1 { margin: 8px 0; font-size: clamp(28px, 6vw, 40px); line-height: 1.15; }
.hero p { margin: 0; opacity: 0.95; }

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.line-friend,
.checkin-link {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 10px;
  text-decoration: none;
}

.checkin-link {
  background: #e7efec;
  color: var(--brand-dark);
  font-weight: 800;
}

.line-friend {
  background: rgba(255, 255, 255, 0.94);
}

.card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.panel-title h2 { margin: 0 0 4px; }
.panel-title p { margin: 0; color: var(--muted); }

.form,
.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-label,
label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.full { grid-column: 1 / -1; }

input,
select,
textarea,
button {
  min-height: 48px;
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

textarea { min-height: 96px; resize: vertical; }

button,
.bm-btn-primary {
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  padding: 0 16px;
}

button.secondary,
button.ghost {
  background: #e7efec;
  color: var(--brand-dark);
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

.helper-text,
.mini,
.notice {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.auth-error {
  color: var(--danger);
  min-height: 1.2em;
  font-weight: 700;
}

.hidden { display: none !important; }

.success {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: #e8f7f1;
  border: 1px solid #b7e0d0;
  display: grid;
  gap: 6px;
}

.bm-summary-card {
  margin: 12px 0 16px;
  padding: 14px;
  border-radius: 12px;
  background: #f4f8f7;
  border: 1px solid var(--line);
}

.bm-summary-card .title {
  font-weight: 800;
  margin-bottom: 8px;
}

.bm-summary-card .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.mode-fieldset {
  grid-column: 1 / -1;
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.section-title { font-weight: 800; }

.mode-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.mode-card-title { display: block; font-weight: 800; }
.option-description { display: block; color: var(--muted); font-weight: 500; font-size: 14px; }

.engine-fields,
.time-block,
.specified-teacher-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.bm-teacher-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bm-teacher-card {
  background: #f7faf9;
  color: var(--ink);
  border: 1px solid var(--line);
  text-align: left;
}

.teacher-empty-state {
  padding: 12px;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #f5d0a9;
}

.teacher-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.timeline-summary {
  padding: 12px;
  border-radius: 12px;
  background: #f4f8f7;
}

.timeline-cta-btn { width: 100%; }

.timeline-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 39, 43, 0.55);
  display: grid;
  align-items: end;
}

.timeline-sheet {
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 16px;
}

.timeline-header,
.timeline-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.timeline-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.timeline-slot {
  display: grid;
  gap: 2px;
  background: #edf5f2;
  color: var(--ink);
}

.timeline-slot.is-closed { opacity: 0.4; }
.timeline-slot.is-selected {
  outline: 2px solid var(--brand);
  background: #d9eee6;
}

.timeline-loading,
.timeline-empty { padding: 18px 0; }

.timeline-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #d7e6e1;
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

.timeline-skeleton {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.timeline-skeleton span {
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(90deg, #eef2f1, #f8fafa, #eef2f1);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.lookup-result { margin-top: 12px; display: grid; gap: 10px; }
.lookup-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .bm-teacher-cards,
  .timeline-board { grid-template-columns: 1fr 1fr; }
  .hero-actions { grid-template-columns: 1fr; }
  .line-friend { grid-column: auto; }
}
.auth-notice {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 2px solid #c46b18;
  border-radius: 12px;
  background: #fff3df;
  color: #713807;
  line-height: 1.6;
}

.booking-header {
  padding: max(18px, env(safe-area-inset-top, 0px)) 4px 8px;
  text-align: center;
}
.booking-brand-logo { width: 116px; height: 116px; display: block; margin: 0 auto 10px; border-radius: 0; object-fit: contain; background: transparent; box-shadow: none; filter: drop-shadow(0 3px 8px rgba(255,255,255,.42)); }
.booking-header h1 { margin: 4px 0 12px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.72); }
.booking-header > span { display: block; color: #fff; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.72); }
.step-indicator { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.step-indicator span { padding: 8px; border-radius: 999px; background: #e4ece9; text-align: center; color: var(--muted); font-size: 14px; font-weight: 800; }
.step-indicator span.active { background: var(--brand); color: #fff; }
.booking-step { min-height: 320px; }
.line-login-primary { width: 100%; min-height: 58px; margin-top: 18px; font-size: 18px; }
.line-login-secondary { width: 100%; min-height: 54px; margin-top: 12px; border: 2px solid #b9d5cb; background: #f3f8f6; color: var(--brand-dark); font-size: 17px; }
.line-login-note { margin-bottom: 0; }
.member-status { padding: 12px; border-radius: 10px; background: #edf7f3; font-weight: 800; }
.member-login-card { display: grid; gap: 12px; padding: 18px; border: 2px solid #7bc5ae; border-radius: 16px; background: linear-gradient(145deg,#effaf6,#fff); box-shadow: 0 8px 22px rgba(20,112,91,.1); }
.member-login-card > div:first-child { display: flex; align-items: center; gap: 10px; }
.member-login-card h3 { margin: 0; font-size: 21px; }
.member-login-badge { padding: 5px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 900; }
.member-login-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0; }
.member-login-card dl div { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.86); }
.member-login-card dt { color: var(--muted); font-size: 13px; font-weight: 700; }
.member-login-card dd { margin: 3px 0 0; font-size: 17px; font-weight: 900; overflow-wrap: anywhere; }
.member-login-card p { margin: 0; color: var(--brand-dark); font-weight: 800; line-height: 1.55; }
.recipient-fieldset { margin-top: 4px; }
.recipient-fieldset .section-title { margin-bottom: 2px; font-size: 20px; }
.recipient-card { min-height: 72px; align-items: center; }
.recipient-card strong { font-size: 18px; }
.recipient-card:has(input:checked) { border: 2px solid var(--brand); background: #edf8f4; box-shadow: 0 5px 15px rgba(20,112,91,.1); }
.recipient-card input { width: 22px; height: 22px; margin: 0; accent-color: var(--brand); }
.recipient-summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: #f3f7f6; border: 1px solid var(--line); }
.recipient-summary span { color: var(--muted); font-weight: 700; text-align: right; }
.account-switch { width: 100%; margin-top: 12px; }
.help-card { display: grid; gap: 4px; margin-top: 22px; padding: 16px; border-radius: 12px; background: #f3f7f6; border: 1px solid var(--line); }
.help-card a { color: var(--brand); font-size: 18px; font-weight: 900; }
.family-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 16px; border: 2px solid #d5e5df; border-radius: 14px; background: #f7faf9; }
.family-data-notice { margin: 0 0 2px; padding: 12px 14px; border-radius: 10px; background: #fff3df; color: #713807; font-weight: 800; line-height: 1.55; }
.service-picker-block { display: grid; align-content: end; gap: 8px; }
.price-list-trigger { min-height: 48px; background: #e7efec; color: var(--brand-dark); border: 2px solid #b9d5cb; }
.price-list-overlay { position: fixed; inset: 0; z-index: 10500; display: grid; place-items: center; padding: max(16px,env(safe-area-inset-top,0px)) 16px max(16px,env(safe-area-inset-bottom,0px)); background: rgba(9,29,25,.66); }
.price-list-sheet { width: min(620px,100%); max-height: min(760px,calc(100dvh - 32px)); display: grid; grid-template-rows: auto minmax(0,1fr); overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.price-list-sheet header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.price-list-sheet header span { color: var(--brand); font-size: 13px; font-weight: 900; }
.price-list-sheet h2 { margin: 2px 0 0; font-size: 24px; }
.price-list-sheet header button { min-width: 76px; }
.service-list { min-height: 120px; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px 20px; }
.service-item { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 12px; align-items: center; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.service-item strong { font-size: 17px; }
.service-item span { color: var(--muted); font-weight: 700; white-space: nowrap; }
.service-item b { color: var(--brand-dark); white-space: nowrap; }
.price-list-empty { padding: 24px 0; color: var(--muted); text-align: center; font-weight: 700; }
body.price-list-open { overflow: hidden; }
.mode-card small { display: block; color: var(--muted); font-weight: 500; }
.order-status-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.order-status-grid div { padding: 12px; border-radius: 10px; background: #f4f8f7; min-width: 0; }
.order-status-grid dt { color: var(--muted); font-size: 13px; }
.order-status-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; font-weight: 800; }
.order-status { color: var(--brand); font-size: 20px; }
.order-actions { display: flex; gap: 10px; margin-top: 14px; }

/* Phase 1 AI booking assistant: manual booking remains authoritative. */
.booking-ai-entry { display:grid; grid-template-columns:auto 1fr; gap:3px 12px; align-items:center; width:100%; margin:0 0 18px; padding:16px 18px; border:2px solid #14705b; border-radius:18px; background:#edf9f5; color:#073c32; text-align:left; box-shadow:0 8px 20px rgba(20,112,91,.12); }
.booking-ai-entry > span { grid-row:1/3; font-size:30px; }.booking-ai-entry strong { font-size:20px; }.booking-ai-entry small { font-size:14px; line-height:1.45; color:#47645d; }
.booking-ai-overlay { position:fixed; inset:0; z-index:2200; display:grid; place-items:center; padding:max(12px,env(safe-area-inset-top,0px)) 12px max(12px,env(safe-area-inset-bottom,0px)); background:rgba(5,24,21,.72); }
.booking-ai-overlay.hidden { display:none; }
.booking-ai-sheet { display:grid; grid-template-rows:auto minmax(0,1fr) auto; width:min(720px,100%); height:min(860px,calc(var(--booking-ai-viewport-height,100dvh) - 24px)); max-height:calc(var(--booking-ai-viewport-height,100dvh) - 24px); min-height:0; overflow:hidden; border-radius:24px; background:#fff; box-shadow:0 24px 70px rgba(0,0,0,.3); }
.booking-ai-header { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid #dce7e3; background:#fff; }.booking-ai-header span { font-size:13px; color:#62756f; }.booking-ai-header h2 { margin:2px 0 0; font-size:24px; }
.booking-ai-scroll { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:0 0 12px; background:#f4f8f6; scrollbar-gutter:stable; }
.booking-ai-messages { min-height:0; padding:18px; }
.booking-ai-message { max-width:86%; margin:0 0 12px; padding:13px 15px; border-radius:16px; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.06); }.booking-ai-message p { margin:4px 0 0; line-height:1.55; }.booking-ai-message.is-user { margin-left:auto; background:#14705b; color:#fff; }.booking-ai-message.is-assistant { margin-right:auto; }
.booking-ai-line-browser { margin:0 16px 14px; padding:15px; border:2px solid #d0a750; border-radius:16px; background:#fffaf0; }.booking-ai-line-browser h3 { margin:0 0 6px; font-size:20px; }.booking-ai-line-browser p { margin:5px 0; line-height:1.5; }.booking-ai-line-browser-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }.booking-ai-line-browser-actions > * { min-height:48px; padding:9px 10px; }.booking-ai-line-browser-actions > :last-child { grid-column:1/-1; }
.booking-ai-controls { min-width:0; border-top:1px solid #dce7e3; background:#fff; padding-bottom:env(safe-area-inset-bottom,0px); }
.booking-ai-quick-actions { display:flex; gap:8px; min-width:0; overflow-x:auto; overscroll-behavior-x:contain; padding:10px 16px 6px; background:#fff; scrollbar-width:thin; }.booking-ai-quick-actions button { flex:0 0 auto; min-height:42px; max-width:220px; padding:8px 13px; border:1px solid #a9c9c0; border-radius:999px; background:#fff; color:#124e40; font-weight:700; white-space:normal; line-height:1.25; }
.booking-ai-status { min-height:24px; margin:0; padding:4px 18px; font-weight:700; color:#52645f; }.booking-ai-status[data-kind="warning"] { color:#9a4f00; }.booking-ai-status[data-kind="recording"] { color:#a42626; }.booking-ai-status[data-kind="success"] { color:#0a7455; }
.booking-ai-mic { display:flex; align-items:center; justify-content:center; width:52px; min-width:52px; height:52px; min-height:52px; padding:0; border:0; border-radius:14px; background:#153d36; color:#fff; }.booking-ai-mic span { font-size:23px; }
.booking-ai-recording { display:flex; align-items:center; gap:10px; margin:4px 16px 0; padding:8px 10px; border:1px solid #d85c5c; border-radius:12px; background:#fff5f5; }.booking-ai-recording > strong { white-space:nowrap; }.booking-ai-recording > span { min-width:0; flex:1; color:#6c4a4a; font-size:13px; }.booking-ai-recording .is-warning { color:#a42626; font-weight:800; }.booking-ai-recording .danger { min-height:40px; padding:0 12px; border:0; border-radius:10px; background:#b62c2c; color:#fff; font-weight:800; }
.booking-ai-composer { padding:6px 16px 10px; background:#fff; }.booking-ai-composer > label { display:block; margin-bottom:5px; font-weight:800; }.booking-ai-composer > div { display:grid; grid-template-columns:minmax(0,1fr) 52px auto; align-items:end; gap:8px; }.booking-ai-composer textarea { min-height:52px; max-height:104px; padding:11px 12px; border:1px solid #adc3bd; border-radius:14px; font:inherit; resize:none; }.booking-ai-composer button[type="submit"] { min-width:72px; min-height:52px; border:0; border-radius:14px; background:#14705b; color:#fff; font-weight:800; }
.booking-ai-help { margin:0 16px 14px; padding:13px; border:2px solid #d0a750; border-radius:16px; background:#fffaf0; }.booking-ai-help h3 { margin:0 0 4px; font-size:18px; }.booking-ai-help p { margin:3px 0; line-height:1.4; }.booking-ai-help-actions { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; margin-top:9px; }.booking-ai-help-actions > * { display:flex; align-items:center; justify-content:center; min-height:44px; padding:8px; border-radius:12px; text-align:center; text-decoration:none; font-weight:800; }.booking-ai-help-actions .is-disabled { pointer-events:none; opacity:.5; background:#e8ecea; color:#62706c; }
.web-call-action[data-counter-state="online"] { border-color:#2f9b74; }.web-call-action[data-counter-state="busy"] { border-color:#d18b21; }.web-call-action[data-counter-state="offline"],.web-call-action[data-counter-state="disabled"] { border-color:#9ca9a5; color:#68736f; }
.booking-ai-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; padding:12px 16px; }.booking-ai-choices button { min-height:50px; text-align:left; font-weight:800; }
.booking-ai-choices [data-modify-booking] { min-height:76px; padding:14px 16px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }
.booking-ai-draft,.booking-call-panel { margin:0 16px 14px; padding:16px; border:2px solid #14705b; border-radius:18px; background:#f7fffc; }.booking-ai-draft h3,.booking-call-panel h3 { margin:0 0 10px; font-size:20px; }.booking-ai-draft>div:last-child,.booking-call-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:14px; }.booking-ai-draft-actions .bm-btn-primary{grid-column:1/-1}#bookingCallTimer { display:block; margin-top:12px; text-align:center; font-size:28px; font-variant-numeric:tabular-nums; }

@media (max-width:640px) {
  .booking-ai-overlay { padding:0; }.booking-ai-sheet { width:100%; height:var(--booking-ai-viewport-height,100dvh); max-height:var(--booking-ai-viewport-height,100dvh); border-radius:0; padding-top:env(safe-area-inset-top,0px); }.booking-ai-header { padding:12px 14px; }.booking-ai-header h2 { font-size:22px; }.booking-ai-messages { padding:14px; }.booking-ai-message { max-width:92%; }.booking-ai-entry { padding:15px; }
  .booking-ai-scroll { scrollbar-gutter:auto; }.booking-ai-quick-actions { padding-inline:12px; }.booking-ai-composer { padding:5px 12px 8px; }.booking-ai-composer > label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }.booking-ai-composer > div { grid-template-columns:minmax(0,1fr) 50px 70px; }.booking-ai-mic { width:50px; min-width:50px; height:50px; min-height:50px; }.booking-ai-composer button[type="submit"] { min-width:70px; }.booking-ai-help-actions { grid-template-columns:1fr 1fr; }.booking-ai-help-actions > :last-child { grid-column:1/-1; }.booking-ai-line-browser-actions { grid-template-columns:1fr; }.booking-ai-line-browser-actions > :last-child { grid-column:auto; }.booking-ai-recording { margin-inline:12px; }.booking-ai-recording > span { display:none; }
  .member-login-card { padding: 15px; }
  .member-login-card dl { grid-template-columns: 1fr; }
  .recipient-summary { display: grid; }
  .recipient-summary span { text-align: left; }
  .family-fields,.order-status-grid { grid-template-columns:1fr; }
  .price-list-overlay { padding: max(8px,env(safe-area-inset-top,0px)) 8px max(8px,env(safe-area-inset-bottom,0px)); place-items: end center; }
  .price-list-sheet { width: 100%; max-height: calc(100dvh - max(16px,env(safe-area-inset-top,0px))); border-radius: 18px 18px 10px 10px; }
  .service-item { grid-template-columns: minmax(0,1fr) auto; }
  .service-item b { grid-column: 2; }
  .order-actions { display:grid; grid-template-columns:1fr; }
  .booking-ai-choices,.booking-ai-draft>div:last-child,.booking-call-actions { grid-template-columns:1fr; }
}

/* WebCall: full-screen call guard and reliable mobile audio playback. */
body.web-call-active {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}

.web-call-audio {
  display: block !important;
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  left: -9999px !important;
  opacity: 0.001 !important;
  pointer-events: none !important;
}

.booking-call-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: minmax(0, 520px);
  align-content: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: max(24px, env(safe-area-inset-top, 0px)) 18px max(24px, env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #effbf7 0%, #dff3ec 100%);
  box-shadow: none;
  text-align: center;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.booking-call-panel::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: -1;
  border: 2px solid #14705b;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.booking-call-panel h3 {
  margin: 0;
  font-size: clamp(26px, 7vw, 38px);
}

.booking-call-panel #bookingCallState {
  margin: 4px 0;
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 900;
  color: #124e40;
}

.booking-call-safe-note {
  margin: 0;
  color: #52645f;
  line-height: 1.45;
}

.booking-call-panel #bookingCallTimer {
  display: block;
  margin: 12px 0 0;
  font-size: clamp(42px, 12vw, 68px);
  font-variant-numeric: tabular-nums;
}

.booking-call-panel .booking-call-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.booking-call-panel .booking-call-actions button {
  min-height: 64px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 900;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#bookingCallPlayAudioBtn,
#bookingCallCancelBtn {
  grid-column: 1 / -1;
}

#bookingCallCancelBtn {
  min-height: 72px;
}

.booking-call-panel.is-failed::before {
  border-color: #a52b2b;
  background: #fffaf8;
}

.booking-call-error-code {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #d98989;
  border-radius: 12px;
  background: #fff0f0;
  color: #8b1f1f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

#bookingCallRetryBtn {
  grid-column: 1 / -1;
  min-height: 72px;
}

.booking-call-panel.is-failed #bookingCallMuteBtn,
.booking-call-panel.is-failed #bookingCallSpeakerBtn,
.booking-call-panel.is-failed #bookingCallTimer {
  display: none;
}

.booking-call-mic-check {
  width: min(100%, 420px);
  display: grid;
  gap: 8px;
  justify-self: center;
  margin-top: 4px;
}

#bookingCallMicLevel {
  --mic-level: 2%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce9e5;
}

#bookingCallMicLevel::before {
  content: "";
  display: block;
  width: var(--mic-level);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14705b, #45bd91);
  transition: width .12s linear;
}

#bookingCallMicState {
  color: #315f55;
  font-weight: 800;
}

.booking-call-touch-guard {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top, 0px)) 22px max(30px, env(safe-area-inset-bottom, 0px));
  background: #07110f;
  color: #fff;
  touch-action: none;
}

.booking-call-touch-guard-content {
  width: min(100%, 420px);
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.booking-call-touch-guard-content > span {
  font-size: 54px;
}

.booking-call-touch-guard-content strong {
  font-size: clamp(24px, 7vw, 34px);
}

.booking-call-touch-guard-content small {
  color: #b9ccc6;
  font-size: 16px;
}

#bookingCallTouchUnlock {
  width: min(100%, 300px);
  min-height: 68px;
  border: 2px solid #8fc8b7;
  border-radius: 999px;
  background: #173c34;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  accent-color: #2da57f;
  touch-action: pan-x;
}


/* Customer Web Push guide: one clear entry button in booking steps 2 and 3. */
.customer-notification-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  margin: 16px 0;
  padding: 16px;
  border: 2px solid #8fc8b7;
  border-radius: 16px;
  background: linear-gradient(145deg, #f3fff9, #e9f8f2);
  box-shadow: 0 8px 20px rgba(20, 112, 91, 0.1);
}
.customer-notification-guide h3 {
  margin: 5px 0 4px;
  color: #103f35;
  font-size: clamp(20px, 4.6vw, 25px);
  line-height: 1.3;
}
.customer-notification-guide p {
  margin: 0;
  color: #4e655e;
  font-weight: 700;
}
.notification-guide-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff1c7;
  color: #835600;
  font-size: 13px;
  font-weight: 900;
}
.customer-notification-guide-button {
  min-width: 170px;
  min-height: 56px;
  padding: 10px 18px;
  border-radius: 14px;
  background: #14705b;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(20, 112, 91, 0.2);
}
.customer-notification-guide-status {
  grid-column: 1 / -1;
  min-height: 24px;
  padding-top: 8px;
  border-top: 1px solid #c7e2d9;
  font-size: 14px;
}
.customer-notification-guide-status[data-kind="enabled"] { color: #087354; }
.customer-notification-guide-status[data-kind="warning"] { color: #875600; }
.customer-notification-guide-status[data-kind="error"] { color: #a52d2d; }
.customer-notification-guide.is-compact { margin-top: 18px; }

body.notification-guide-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}
.pwa-notification-guide {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  align-items: start;
  overflow: auto;
  padding: max(10px, env(safe-area-inset-top, 0px)) 10px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(5, 35, 29, 0.9);
  overscroll-behavior: contain;
}
.pwa-notification-guide.hidden { display: none; }
.pwa-notification-guide-sheet {
  width: min(720px, 100%);
  min-height: min(680px, calc(100dvh - 20px));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 22px;
  background: #f7fbfa;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}
.pwa-notification-guide-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #096b58;
  color: #fff;
}
.pwa-notification-guide-head span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.9;
}
.pwa-notification-guide-head h2 {
  margin: 2px 0 0;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.2;
}
.pwa-notification-guide-head button {
  flex: 0 0 auto;
  min-width: 92px;
  min-height: 48px;
  border-radius: 13px;
  background: #fff;
  color: #075345;
}
.pwa-notification-guide-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}
.pwa-notification-guide-lead {
  margin: 0;
  padding: 13px 14px;
  border-radius: 13px;
  background: #e7f4ef;
  color: #17483e;
  font-weight: 800;
}
.pwa-notification-platform {
  order: 2;
  padding: 16px;
  border: 2px solid #cedfda;
  border-radius: 16px;
  background: #fff;
}
.pwa-notification-platform.is-recommended {
  order: 1;
  border-color: #23a37e;
  box-shadow: 0 8px 22px rgba(20, 112, 91, 0.12);
}
.pwa-notification-platform.is-recommended::before {
  content: "目前手機請看這裡";
  display: inline-flex;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #14705b;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}
.pwa-platform-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pwa-platform-title > span { font-size: 28px; }
.pwa-platform-title h3 {
  margin: 0;
  color: #123f36;
  font-size: 23px;
}
.pwa-notification-platform ol {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 28px;
}
.pwa-notification-platform li {
  padding-left: 3px;
  color: #233d37;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.pwa-notification-guide-status {
  order: 3;
  margin: 0;
  padding: 14px;
  border: 1px solid #bdd7cf;
  border-radius: 13px;
  background: #eef7f4;
  color: #244a40;
  font-weight: 900;
  text-align: center;
}
.pwa-notification-guide-status[data-kind="enabled"] { border-color: #80cdb6; background: #e7faf3; color: #087354; }
.pwa-notification-guide-status[data-kind="warning"] { border-color: #e4bd6f; background: #fff8e8; color: #875600; }
.pwa-notification-guide-status[data-kind="error"] { border-color: #e0a0a0; background: #fff0f0; color: #a52d2d; }
.pwa-notification-guide-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #cdded8;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
}
.pwa-notification-guide-actions button {
  min-height: 58px;
  border-radius: 15px;
  font-size: 18px;
  font-weight: 900;
}
.pwa-notification-guide-actions button.secondary {
  background: #e5efec;
  color: #123f36;
}

@media (max-width: 640px) {
  .customer-notification-guide { grid-template-columns: 1fr; }
  .customer-notification-guide-button { width: 100%; min-width: 0; }
  .customer-notification-guide-status { grid-column: auto; }
  .pwa-notification-guide { padding: 0; }
  .pwa-notification-guide-sheet {
    width: 100%;
    min-height: 100dvh;
    border-radius: 0;
  }
  .pwa-notification-guide-head { padding-top: calc(13px + env(safe-area-inset-top, 0px)); }
  .pwa-notification-guide-body { padding: 13px; }
  .pwa-notification-platform { padding: 14px; }
  .pwa-notification-platform li { font-size: 16px; }
  .pwa-notification-guide-actions { grid-template-columns: 1fr; }
}

/* v1.2.3 customer booking entry and cross-device booking history */
.customer-booking-entry-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.customer-booking-entry { display:grid; gap:5px; min-height:84px; padding:16px 18px; border:2px solid #9bcbbd; border-radius:16px; background:#fff; color:var(--brand-dark); text-align:left; box-shadow:0 6px 16px rgba(20,112,91,.08); }
.customer-booking-entry.is-primary { border-color:var(--brand); background:#edf9f5; }
.customer-booking-entry strong { font-size:20px; }
.customer-booking-entry small { color:var(--muted); font-size:14px; line-height:1.45; }
.booking-form-anchor { scroll-margin-top:18px; }
.my-bookings-overlay { position:fixed; inset:0; z-index:10600; display:grid; place-items:center; padding:max(12px,env(safe-area-inset-top,0px)) 12px max(12px,env(safe-area-inset-bottom,0px)); background:rgba(5,24,21,.72); }
.my-bookings-overlay.hidden { display:none; }
.my-bookings-sheet { width:min(720px,100%); max-height:calc(100dvh - 24px); display:grid; grid-template-rows:auto auto auto auto minmax(0,1fr); overflow:hidden; border-radius:22px; background:#fff; box-shadow:0 24px 70px rgba(0,0,0,.32); }
.my-bookings-sheet > #myBookingsLegend { padding:0 14px; }
.my-bookings-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:18px 20px; border-bottom:1px solid var(--line); }
.my-bookings-header span { color:var(--brand); font-size:13px; font-weight:900; }
.my-bookings-header h2 { margin:2px 0 4px; font-size:25px; }
.my-bookings-header p { margin:0; color:var(--muted); font-weight:700; }
.my-bookings-toolbar { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:12px 20px 0; }
.my-bookings-toolbar button { min-height:48px; }
.my-bookings-sheet > .auth-error { min-height:24px; margin:8px 20px 0; }
.my-bookings-list { min-height:140px; overflow-y:auto; overscroll-behavior:contain; display:grid; align-content:start; gap:12px; padding:10px 20px 22px; }
.my-bookings-empty { padding:28px 18px; border:2px dashed #cbdad5; border-radius:16px; text-align:center; background:#f8fbfa; }
.my-bookings-empty strong { display:block; margin-bottom:6px; font-size:20px; }
.my-booking-item { display:grid; gap:12px; padding:16px; border:1px solid #cbdad5; border-radius:16px; background:#fff; box-shadow:0 4px 14px rgba(20,112,91,.07); }
.my-booking-item.is-active { border:2px solid #7bc5ae; background:#f5fcf9; }
.my-booking-item-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.my-booking-item-head h3 { margin:0; font-size:19px; line-height:1.4; }
.my-booking-status { flex:0 0 auto; padding:5px 9px; border-radius:999px; background:#e7efec; color:var(--brand-dark); font-size:13px; font-weight:900; }
.my-booking-item.is-active .my-booking-status { background:#d8f5e8; color:#087354; }
.my-booking-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
.my-booking-summary div { min-width:0; padding:9px 10px; border-radius:10px; background:rgba(241,247,245,.86); }
.my-booking-summary dt { color:var(--muted); font-size:12px; font-weight:700; }
.my-booking-summary dd { margin:3px 0 0; overflow-wrap:anywhere; font-weight:850; }
.my-booking-details { margin:0; padding:11px 12px; border-radius:10px; background:#f4f8f7; color:#536861; line-height:1.55; }
.my-booking-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.my-booking-actions button { min-height:46px; }
.my-booking-actions .danger { border:0; background:#ad2d2d; color:#fff; }
body.my-bookings-open { overflow:hidden; }
.order-actions button { flex:1 1 0; min-height:48px; }

@media (max-width:640px) {
  .customer-booking-entry-actions { grid-template-columns:1fr; }
  .my-bookings-overlay { padding:0; }
  .my-bookings-sheet { width:100%; height:100dvh; max-height:100dvh; border-radius:0; padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px); }
  .my-bookings-header { padding:14px; }
  .my-bookings-toolbar { padding:10px 14px 0; }
  .my-bookings-sheet > .auth-error { margin-inline:14px; }
  .my-bookings-list { padding:8px 14px 18px; }
  .my-booking-summary { grid-template-columns:1fr; }
  .order-actions { display:grid; grid-template-columns:1fr; }
}

/* v1.3.0: booking center uses a dedicated new-booking workspace. */
.new-booking-workspace{margin-top:18px;border-top:1px solid rgba(16,88,74,.16);padding-top:18px}
.new-booking-workspace.hidden{display:none!important}
.new-booking-workspace-header{display:flex;gap:14px;align-items:flex-start;margin-bottom:16px}
.new-booking-workspace-header>div{flex:1}
.new-booking-workspace-header span{display:block;font-size:.8rem;font-weight:800;color:#1f7a65;letter-spacing:.08em}
.new-booking-workspace-header h2{margin:2px 0 4px}
.new-booking-workspace-header p{margin:0;color:#5b6d68}
@media(max-width:640px){.new-booking-workspace-header{flex-direction:column}.new-booking-workspace-header button{width:100%}}

/* Larger booking text uses the existing control heights and spacing. */
body { font-size: 18px; letter-spacing: 0; }
.booking-header h1 { font-size: 28px; }
.booking-page .form-label,
.booking-page .section-title { font-size: 19px; line-height: 24px; }
.form-label { align-content: start; }
input:not([type="radio"]):not([type="checkbox"]),
select { height: 48px; min-height: 48px; font-size: 20px; font-weight: 700; line-height: 24px; }
textarea { font-size: 20px; line-height: 24px; }
button { font-size: 20px; line-height: 24px; }
.price-list-trigger { display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; line-height: 22px; text-align: center; text-decoration: none; }
.form-label:has(> select) { position: relative; }
.form-label > select { appearance: none; -webkit-appearance: none; padding-right: 44px; }
.form-label:has(> select)::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 20px;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--brand);
  border-bottom: 3px solid var(--brand);
  transform: rotate(45deg);
  pointer-events: none;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { width: 28px; height: 28px; padding: 0; margin: 0; opacity: 1; cursor: pointer; }
.mode-card { align-items: center; }
.mode-card > span { min-width: 0; }
.mode-card.is-unavailable { opacity: .55; cursor: not-allowed; }
.mode-card strong,
.mode-card-title,
.recipient-card strong { font-size: 20px; line-height: 26px; }
.mode-card small,
.option-description { font-size: 15px; line-height: 20px; }
.helper-text,.mini,.notice { font-size: 16px; }
.member-login-card dt { font-size: 15px; line-height: 20px; }
.member-login-card dd { font-size: 20px; line-height: 26px; }
.member-login-card dl > .member-identity-field {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-rows: 20px minmax(26px,auto);
  column-gap: 10px;
  align-items: center;
}
.member-identity-field > dt { grid-column: 1; grid-row: 1; }
.member-identity-field > #bookingMemberName { grid-column: 1; grid-row: 2; margin: 0; }
.member-login-card .member-benefit-summary {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  margin: 0;
  color: var(--brand);
  font-size: 15px;
  line-height: 16px;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.member-benefit-summary span { white-space: nowrap; }
.step-indicator span,.order-status-grid dt,.my-booking-summary dt { font-size: 16px; }
.customer-booking-entry strong { font-size: 20px; }
.customer-booking-entry small { font-size: 15px; }
.service-item strong { font-size: 20px; }
.timeline-slot { font-size: 20px; }
.booking-ai-quick-actions button { font-size: 18px; }
.booking-ai-composer textarea { font-size: 18px; }
.booking-ai-composer button[type="submit"] { font-size: 18px; }
@media (min-width:641px) {
  .member-login-card dl { grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); }
}
/* Keep the date chooser inside the visible mobile viewport, above system controls. */
.booking-date-display { width:100%; text-align:left; position:relative; padding-right:52px; }
.booking-date-display::after { content:''; position:absolute; right:18px; top:14px; width:22px; height:22px; border:2px solid currentColor; border-top-width:7px; border-radius:3px; }
.booking-calendar { box-sizing:border-box; width:min(520px,100%); max-width:100%; max-height:100dvh; padding:20px; border:0; color:#18352f; background:#fff; }
.booking-calendar[open] { display:flex; flex-direction:column; gap:16px; }
.booking-calendar::backdrop { background:#0008; }
.booking-calendar header,.calendar-month { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.booking-calendar h2 { font-size:24px; margin:0; }
.booking-calendar header button,.calendar-month button { width:48px; height:48px; padding:0; flex:none; font-size:26px; }
.calendar-month strong { font-size:22px; }
.calendar-weekdays,.calendar-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; text-align:center; }
.calendar-weekdays { font-size:18px; }
.calendar-days { flex:1; overflow-y:auto; align-content:start; min-height:0; }
.calendar-days button { padding:0; min-height:48px; height:54px; font-size:25px; background:#edf6f3; color:#18352f; border:0; }
.calendar-days button[aria-pressed=true] { background:#007b65; color:white; }
.calendar-days button:disabled { opacity:.3; }
.booking-calendar footer { flex:none; padding-bottom:max(20px,env(safe-area-inset-bottom)); }
.booking-calendar footer p { font-size:20px; margin:0 0 12px; }
.booking-calendar footer button { width:100%; }
@media(max-width:600px) { .booking-calendar { width:100%; height:100dvh; max-height:100dvh; margin:0; padding:20px 16px max(32px,env(safe-area-inset-bottom)); } }
#lineFriendEntry .customer-booking-entry { text-decoration: none; font-weight: 700; }

.customer-apple-login { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 12px 18px; margin: 12px 0; border: 1px solid #000; border-radius: 10px; background: #000; color: #fff; font: 600 18px/1.4 -apple-system, BlinkMacSystemFont, sans-serif; cursor: pointer; }
.customer-apple-login span { font-size: 26px; }
.customer-password-form { margin: 16px 0; padding: 20px; border: 1px solid #c6dcd4; border-radius: 12px; }
.customer-password-form input { width: 100%; min-height: 44px; }
.customer-review-notice { padding: 16px; border: 1px solid #b79b55; border-radius: 10px; background: #fff8dd; color: #4a3a16; }
.customer-account-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
