/* ==========================================================================
   goCheckin — /book.html 對話式預訂頁
   全部新樣式以 .booking- 前綴；沿用 styles.css 的 design tokens 與
   .btn / .badge / .msg / .chat-chip / .faq / .table 等既有視覺語彙。
   ========================================================================== */

/* ---------- 原型提示 / 無 JS 狀態 ---------- */

.booking-nojs {
  display: block;
  margin-bottom: 24px;
  padding: 20px 22px;
  border: 1px solid rgba(246, 167, 59, 0.5);
  border-radius: var(--radius-md);
  background: var(--amber-soft);
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.booking-nojs p {
  margin: 0 0 8px;
}

.booking-nojs p:last-child {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

html.js .booking-nojs {
  display: none;
}

html:not(.js) .booking-layout {
  display: none;
}

/* JS 會用 hidden 屬性切換區塊，需覆蓋各區塊的 display */
.booking-layout [hidden] {
  display: none !important;
}

/* ---------- Hero（精簡版：讓對話框在首屏就能操作） ---------- */

.booking-hero {
  padding: clamp(14px, 2vw, 26px) 0 clamp(10px, 1.6vw, 18px);
}

.booking-hero .eyebrow {
  margin-bottom: 8px;
}

.booking-hero h1 {
  max-width: 20em;
  margin-bottom: 10px;
  font-size: clamp(1.85rem, 3.3vw, 2.55rem);
  line-height: 1.12;
}

.booking-hero__lede {
  max-width: none;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
  line-height: 1.75;
}

.booking-hero__lede strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.booking-hero__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 14px;
}

.booking-hero__prices {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.booking-price-link {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.booking-price-link:hover {
  transform: translateY(-2px);
  border-color: var(--amber);
  background: var(--paper-2);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--ink);
}

.booking-price-link__route {
  display: none;
}

.booking-price-link__amount {
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.booking-price-link__amount small {
  margin-right: 2px;
  font-size: 0.56em;
  font-weight: 800;
  letter-spacing: 0;
}

.booking-price-link__from {
  margin-left: 2px;
  color: var(--muted);
  font-size: 0.62em;
  font-weight: 800;
  letter-spacing: 0;
}

.booking-price-link__name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 800;
}

.booking-price-link__name .arw {
  color: var(--amber-deep);
  transition: transform 0.2s var(--ease);
}

.booking-price-link:hover .arw {
  transform: translateX(3px);
}

.booking-price-link--pickup .booking-price-link__amount {
  color: var(--amber-deep);
}

.booking-hero__mock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ---------- 預訂 App：桌機雙欄 ---------- */

.booking-section {
  padding-block: clamp(20px, 2.6vw, 32px) clamp(36px, 4.5vw, 56px);
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(316px, 384px);
  gap: clamp(16px, 2.4vw, 26px);
  align-items: start;
}

/* 聊天面板 */

.booking-chat {
  display: flex;
  flex-direction: column;
  height: clamp(470px, calc(100dvh - 420px), 760px);
  overflow: clip;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  scroll-margin-top: 92px;
}

.booking-chat.is-done {
  height: auto;
  min-height: 0;
}

.booking-chat.is-done .booking-success {
  flex: 0 0 auto;
  overflow: visible;
}

.booking-chat__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--white), #fbf8f1);
}

.booking-chat__avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
}

.booking-chat__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.booking-chat__title {
  margin: 0;
  font-size: 0.94rem;
  letter-spacing: 0;
}

.booking-chat__status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 1px 0 0;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
}

.booking-chat__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: booking-pulse 2.4s ease-in-out infinite;
}

.booking-chat__progress {
  flex-shrink: 0;
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 31, 42, 0.06);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.booking-chat__reset {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.booking-chat__reset:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.booking-log {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgba(246, 167, 59, 0.09), transparent 46%),
    #fbf9f4;
}

.booking-log__loading {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.booking-log .msg {
  max-width: 92%;
}

.booking-log .msg__bubble {
  font-size: 0.92rem;
}

.booking-msg {
  animation: booking-fade-up 0.3s var(--ease);
}

.booking-msg__note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.booking-typing {
  align-items: center;
}

.booking-typing__dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 16px 16px 16px 5px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.booking-typing__dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-light);
  animation: booking-typing 1.2s infinite ease-in-out;
}

.booking-typing__dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.booking-typing__dots i:nth-child(3) {
  animation-delay: 0.3s;
}

/* 摘要小卡（對話內） */

.booking-recap {
  display: grid;
  gap: 5px;
  margin: 10px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--paper);
  font-size: 0.82rem;
}

.booking-recap__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.booking-recap__row span {
  flex-shrink: 0;
  color: var(--muted);
}

.booking-recap__row strong {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.booking-recap__total {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.booking-recap__total strong {
  color: var(--amber-deep);
}

/* 警告 / 狀態 */

.booking-alert {
  margin: 0 16px 10px;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  line-height: 1.55;
}

.booking-alert[data-tone='error'] {
  border: 1px solid rgba(164, 38, 44, 0.24);
  background: #fbeceb;
  color: #a4262c;
}

.booking-alert[data-tone='info'] {
  border: 1px solid rgba(11, 31, 42, 0.08);
  background: var(--sky);
  color: var(--ink-2);
}

/* Composer（輸入區） */

.booking-composer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 16px 14px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--white), #fbf8f1);
}

.booking-composer__chips {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 8px;
}

.booking-chip {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease),
    background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.booking-chip:hover {
  border-color: var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-1px);
}

.booking-chip:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.booking-chip--landmark {
  padding: 6px 11px;
  font-size: 0.76rem;
}

.booking-composer__fields {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.booking-field {
  display: flex;
  flex: 1 1 140px;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.booking-field--full {
  flex-basis: 100%;
}

.booking-field__label {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.booking-field__control {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.4;
}

.booking-field__control:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(246, 167, 59, 0.22);
}

.booking-field__control[aria-invalid='true'] {
  border-color: #a4262c;
  box-shadow: 0 0 0 4px rgba(164, 38, 44, 0.14);
}

.booking-field__control:disabled {
  opacity: 0.6;
}

.booking-field__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.booking-landmarks {
  flex: 1 1 100%;
  min-width: 0;
}

.booking-landmarks__label {
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.booking-landmarks__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.booking-composer__hint {
  flex: 1 1 200px;
  order: 10;
  align-self: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.5;
}

.booking-send {
  display: inline-flex;
  flex: 0 0 auto;
  order: 20;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 116px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 800;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease);
}

.booking-send:hover {
  background: var(--ink-2);
  transform: translateY(-1px);
}

.booking-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.booking-send__arw {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.booking-composer.is-busy {
  opacity: 0.85;
}

.booking-chat__note {
  margin: 0;
  padding: 9px 18px;
  border-top: 1px solid var(--line-soft);
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* 完成畫面 */

.booking-success {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 3vw, 30px);
  background:
    radial-gradient(circle at 85% 0%, rgba(246, 167, 59, 0.12), transparent 48%),
    var(--white);
}

.booking-success:focus {
  outline: none;
}

.booking-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 800;
}

.booking-success[data-mode='fallback'] .booking-success__icon {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.booking-success__head .eyebrow {
  margin-bottom: 8px;
}

.booking-success__title {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

.booking-success__id {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.booking-success__id strong {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.booking-success__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.booking-success__price strong {
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.booking-success__price small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}

.booking-success__mode {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.booking-success[data-mode='fallback'] .booking-success__mode {
  color: var(--amber-deep);
  font-weight: 600;
}

.booking-success__list {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  padding: 15px 17px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
}

.booking-success__list > div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.booking-success__list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.booking-success__list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.booking-success__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.booking-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.booking-success__actions .btn {
  padding: 11px 18px;
  font-size: 0.86rem;
}

/* ---------- 摘要卡（桌機 sticky） ---------- */

.booking-summary {
  position: sticky;
  top: 96px;
  max-height: calc(100dvh - 112px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.booking-summary__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px dashed var(--line);
  background: linear-gradient(180deg, var(--white), #fbf8f1);
}

.booking-summary__title {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: 0;
}

.booking-summary__head-price {
  display: none;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.booking-summary__toggle {
  display: none;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.booking-summary__body {
  padding: 16px 20px 20px;
}

.booking-summary__route {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 800;
}

.booking-summary__route i {
  color: var(--amber-deep);
  font-style: normal;
}

.booking-summary__list {
  display: grid;
  gap: 9px;
  margin: 0;
}

.booking-summary__list > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.booking-summary__list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.booking-summary__list dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.booking-summary__price {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
}

.booking-summary__price span {
  color: var(--amber-deep);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.booking-summary__price strong {
  color: var(--ink);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.booking-summary__price small {
  color: var(--amber-deep);
  font-size: 0.72rem;
}

.booking-summary__status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.booking-summary__actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

/* ---------- 靜態 SEO 內容 ---------- */

.booking-answer {
  margin-bottom: clamp(22px, 2.8vw, 34px);
}

.booking-facts {
  margin-bottom: clamp(24px, 3.2vw, 40px);
}

.booking-facts strong {
  display: block;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.booking-facts span {
  color: var(--muted);
  font-size: 0.82rem;
}

.booking-static__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.booking-static__subtitle {
  margin: 0 0 14px;
  font-size: 1.12rem;
  letter-spacing: 0;
}

.booking-static .table-wrap {
  margin-bottom: 16px;
}

.booking-flow {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.booking-flow__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 15px 17px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.booking-flow__num {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.booking-flow__title {
  margin: 0 0 3px;
  font-size: 1rem;
}

.booking-flow__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

.booking-static__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.booking-static__links .btn {
  padding: 11px 18px;
  font-size: 0.86rem;
}

/* ---------- 動畫 ---------- */

@keyframes booking-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes booking-typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes booking-pulse {
  0%,
  100% {
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- 分區車資：靜態表格補充 ---------- */

.booking-fare-block + .booking-fare-block {
  margin-top: 22px;
}

.booking-fare-block__districts {
  display: block;
  margin-top: 3px;
  color: var(--muted-light);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.5;
}

.booking-static__subtitle--gap {
  margin-top: 26px;
}

.booking-outarea {
  align-items: flex-start;
}

.booking-outarea p {
  margin: 0 0 6px;
}

.booking-outarea p:last-child {
  margin-bottom: 0;
}

/* ---------- 車型 chips ---------- */

.booking-chip--vehicle {
  font-variant-numeric: tabular-nums;
}

.booking-chip--vehicle.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

/* ---------- 加購（舉牌／加點） ---------- */

.booking-addons {
  display: grid;
  flex: 1 1 100%;
  gap: 10px;
  min-width: 0;
}

.booking-addon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.booking-addon input[type='checkbox'] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.booking-addon__fee {
  margin-left: auto;
  color: var(--amber-deep);
  font-weight: 800;
  white-space: nowrap;
}

.booking-addstop {
  display: grid;
  gap: 8px;
}

.booking-addstop__row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.booking-addstop__label {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- 摘要內明細 ---------- */

.booking-summary__breakdown {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--paper-2);
}

.booking-breakdown__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}

.booking-breakdown__row span {
  color: var(--muted);
}

.booking-breakdown__row strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.booking-breakdown__row--total {
  margin-top: 2px;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-weight: 800;
}

/* ---------- 不服務區訊息 ---------- */

.booking-out-message {
  display: block;
  margin: 8px 0 4px;
  padding: 10px 12px;
  border: 1px solid rgba(164, 38, 44, 0.24);
  border-radius: 10px;
  background: #fbeceb;
  color: #a4262c;
  font-weight: 800;
}

/* ---------- 響應式 ---------- */

@media (max-width: 980px) {
  .booking-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking-chat {
    height: auto;
    min-height: 560px;
  }

  .booking-log {
    min-height: 300px;
    max-height: min(54dvh, 500px);
  }

  .booking-static__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .booking-summary {
    position: static;
  }
}

@media (max-width: 860px) {
  /* 手機：摘要改成固定底部列，不遮住輸入區 */
  .booking-summary {
    position: fixed;
    top: auto;
    max-height: none;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    padding-bottom: env(safe-area-inset-bottom);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 40px rgba(11, 31, 42, 0.18);
  }

  .booking-summary__head {
    padding: 11px 16px;
    border-bottom: 0;
  }

  .booking-summary__head-price {
    display: inline-flex;
    margin-left: auto;
  }

  .booking-summary__toggle {
    display: inline-flex;
  }

  .booking-summary__body {
    display: none;
    max-height: min(58dvh, 460px);
    overflow-y: auto;
    padding: 2px 16px 18px;
    border-top: 1px dashed var(--line);
  }

  .booking-summary.is-open .booking-summary__body {
    display: block;
  }

  .booking-summary__price {
    margin-top: 12px;
  }

  .booking-section {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .booking-chat {
    min-height: 520px;
  }

  .booking-log {
    max-height: min(50dvh, 440px);
  }

  .page-book .footer {
    margin-bottom: calc(66px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .booking-hero {
    padding-top: 22px;
  }

  .booking-hero h1 {
    font-size: clamp(2rem, 8.6vw, 2.5rem);
  }

  .booking-hero__prices {
    gap: 8px;
  }

  .booking-price-link {
    padding: 8px 13px;
  }

  .booking-price-link__amount {
    font-size: 1.05rem;
  }

  .booking-price-link__name {
    font-size: 0.76rem;
  }

  .booking-chat {
    min-height: 500px;
    border-radius: var(--radius-md);
  }

  .booking-chat.is-done {
  height: auto;
  min-height: 0;
}

.booking-chat.is-done .booking-success {
  flex: 0 0 auto;
  overflow: visible;
}

.booking-chat__bar {
    gap: 9px;
    padding: 11px 13px;
  }

  .booking-chat__avatar {
    width: 32px;
    height: 32px;
    font-size: 0.72rem;
  }

  .booking-chat__title {
    font-size: 0.86rem;
  }

  .booking-chat__status {
    font-size: 0.64rem;
  }

  .booking-chat__progress {
    font-size: 0.64rem;
    padding: 3px 8px;
  }

  .booking-chat__reset {
    padding: 5px 10px;
    font-size: 0.68rem;
  }

  .booking-log {
    min-height: 260px;
    max-height: min(46dvh, 400px);
    padding: 14px;
  }

  .booking-log .msg {
    max-width: 95%;
  }

  .booking-log .msg__bubble {
    font-size: 0.88rem;
    padding: 10px 13px;
  }

  .booking-composer {
    padding: 12px 12px 13px;
    gap: 8px;
  }

  .booking-chip {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .booking-send {
    flex: 1 1 100%;
    order: 21;
    width: 100%;
  }

  .booking-composer__hint {
    flex-basis: 100%;
    order: 10;
  }

  .booking-success {
    padding: 18px 15px;
  }

  .booking-success__list > div {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .booking-success__actions .btn {
    flex: 1 1 auto;
  }

  .booking-static__links .btn {
    flex: 1 1 auto;
  }
}

/* 很小的螢幕：摘要列只留標題＋價格 */
@media (max-width: 400px) {
  .booking-chat__status {
    display: none;
  }

  .booking-summary__title {
    font-size: 0.9rem;
  }
}

/* ---------- 減少動態偏好（JS 動畫忽略；CSS 動畫由 styles.css 全域規則關閉） ---------- */

@media (prefers-reduced-motion: reduce) {
  .booking-chat__dot {
    animation: none;
  }

  .booking-msg {
    animation: none;
  }
}

/* ---------- 列印 ---------- */

@media print {
  .booking-layout,
  .booking-hero__prices,
  .booking-summary {
    display: none !important;
  }
}
