:root {
  color-scheme: light;
  --navy: #0B2545;
  --navy-soft: #16345c;
  --cream-bg: #F8F7F4;
  --cream-card: #FFFDF8;
  --gold: #D8B36A;
  --gold-soft: #F4E8D2;
  --border-soft: #EAF2F8;
  --success: #2F8F6B;
  --warning: #D96B4E;
  --ink: #0B2545;
  --muted: #6b7c90;
  --surface: #FFFDF8;
  --background: #F8F7F4;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  min-height: 100vh;
  background: var(--background);
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}
button, input, select, textarea { font: inherit; }

.booking-header {
  min-height: 78px;
  padding: 14px max(24px, calc((100vw - 1320px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--navy);
  box-shadow: 0 4px 20px rgba(11, 37, 69, .18);
}
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand-logo-wrap { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.brand-logo { display: block; width: 86%; height: 86%; object-fit: contain; }
.brand div { display: grid; gap: 2px; }
.brand strong { font-size: 18px; }
.brand small { color: rgba(255, 255, 255, .65); font-size: 13px; }
.line-link { padding: 11px 18px; border-radius: 12px; background: var(--gold); color: var(--navy); font-weight: 800; text-decoration: none; box-shadow: 0 8px 18px rgba(216, 179, 106, .25); transition: transform .2s ease, box-shadow .2s ease; }
.line-link:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(216, 179, 106, .32); }

main { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 40px 0 70px; display: grid; grid-template-columns: minmax(320px, .75fr) minmax(620px, 1.4fr); align-items: start; gap: 36px; }
.booking-intro { position: sticky; top: 30px; overflow: hidden; padding: 34px; border: 1px solid var(--border-soft); border-radius: 16px; background: linear-gradient(145deg, var(--cream-card) 0%, var(--gold-soft) 100%); color: var(--ink); box-shadow: 0 18px 42px rgba(11, 37, 69, .08); }
.intro-copy { padding-bottom: 25px; border-bottom: 1px solid var(--border-soft); }
.eyebrow { margin: 0 0 10px; color: #b9883a; font-size: 13px; font-weight: 800; letter-spacing: .04em; }
h1 { margin: 0; color: var(--navy); font-size: clamp(29px, 3vw, 42px); line-height: 1.35; letter-spacing: 0; }
h1 span { display: block; margin-top: 8px; color: var(--muted); font-size: clamp(14px, 1.4vw, 17px); font-weight: 400; line-height: 1.6; }
.booking-intro p:not(.eyebrow) { color: var(--muted); font-size: 15px; line-height: 1.75; }
.booking-steps { display: grid; gap: 3px; padding: 21px 0; }
.booking-steps article { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 12px; padding: 10px 0; }
.booking-steps strong { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); color: var(--navy); font-size: 12px; }
.booking-steps div { display: grid; gap: 3px; }
.booking-steps b { font-size: 15px; color: var(--ink); }
.booking-steps span { color: var(--muted); font-size: 13px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-row span { padding: 7px 10px; border: 1px solid var(--border-soft); border-radius: 999px; background: rgba(255, 255, 255, .72); color: var(--navy); font-size: 12px; font-weight: 700; }
.intro-note { margin: 17px 0 0; padding-top: 15px; border-top: 1px solid var(--border-soft); font-size: 12px !important; }

.booking-card { padding: 34px; border: 1px solid var(--border-soft); border-radius: 16px; background: var(--cream-card); box-shadow: 0 14px 40px rgba(11, 37, 69, .06); }
.form-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border-soft); }
.form-heading h2 { margin: 0; color: var(--navy); font-size: 25px; }
.form-heading > span { color: var(--muted); font-size: 13px; }
.reassurance { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-bottom: 26px; padding: 15px 17px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--gold-soft); color: var(--ink); }
.reassurance strong { color: var(--navy); white-space: nowrap; }
.reassurance p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

/* Step progress indicator */
.step-progress { margin: 0 0 26px; }
.step-progress-list { display: flex; justify-content: space-between; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.step-progress-list li { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.step-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--border-soft); color: var(--muted); font-size: 13px; font-weight: 800; transition: background .2s ease, color .2s ease; }
.step-progress-list li.active .step-dot,
.step-progress-list li.done .step-dot { background: var(--navy); color: #fff; }
.step-progress-list li.active b,
.step-progress-list li.done b { color: var(--navy); }
.step-progress-track { position: relative; height: 4px; border-radius: 999px; background: var(--border-soft); overflow: hidden; }
.step-progress-fill { position: absolute; inset: 0; width: 20%; border-radius: 999px; background: var(--gold); transition: width .25s ease; }

/* Step cards */
.step-card { min-width: 0; margin: 0; padding: 22px; border: 1px solid var(--border-soft); border-radius: 14px; background: #fff; }
.step-card[hidden] { display: none; }
.step-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: 13px; font-weight: 800; flex-shrink: 0; }
.step-card-head h3 { margin: 0; color: var(--navy); font-size: 18px; }
.step-card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { display: grid; gap: 8px; color: var(--navy); font-size: 14px; font-weight: 700; }
.required { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(217, 107, 78, .12); color: var(--warning); font-size: 11px; font-weight: 800; vertical-align: middle; }
.wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 48px; padding: 12px 13px; border: 1px solid var(--border-soft); border-radius: 12px; background: #fff; color: var(--ink); outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(216, 179, 106, .2); }
textarea { resize: vertical; line-height: 1.6; }
.section-hint { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* Field validation errors */
.field-error { display: none; margin-top: 2px; color: var(--warning); font-size: 12px; font-weight: 700; line-height: 1.5; }
.field-error.show { display: block; }
input.has-error, select.has-error, textarea.has-error { border-color: var(--warning) !important; box-shadow: 0 0 0 3px rgba(217, 107, 78, .14) !important; }
.service-type-grid.has-error { outline: 1.5px solid var(--warning); outline-offset: 4px; border-radius: 12px; }

/* Service type cards */
.service-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.service-type-card { position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 12px 14px; border: 1.5px solid var(--border-soft); border-radius: 12px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.service-type-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.service-type-card:has(input:checked) { border-color: var(--navy); background: var(--gold-soft); box-shadow: 0 4px 14px rgba(11, 37, 69, .08); }
.service-type-card:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Photo upload */
.upload-field { padding: 18px; border: 1px dashed var(--gold); border-radius: 12px; background: var(--gold-soft); }
.upload-title { color: var(--navy); }
.upload-field small { color: var(--muted); font-weight: 400; line-height: 1.55; }
.upload-field .privacy-note { color: var(--success); font-weight: 700; }
.photo-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 0; }
.photo-preview figure { position: relative; margin: 0; padding: 8px; border: 1px solid var(--border-soft); border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(11, 37, 69, .05); }
.photo-preview img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.photo-preview .photo-delete-button { position: absolute; top: 14px; right: 14px; display: grid; width: 26px; height: 26px; place-items: center; border: 0; border-radius: 50%; background: rgba(11, 37, 69, .65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }

.field-hint { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.anytime-field { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 14px; font-weight: 700; color: var(--navy); }
.anytime-field input { width: 18px; min-height: auto; }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 24px 0 0; color: var(--muted); font-weight: 400; }
.consent input { width: 18px; min-height: auto; margin-top: 2px; }
.line-confirm-reminder {
  margin: 22px 0 0;
  padding: 13px 15px;
  border: 1px solid rgba(216, 179, 106, .45);
  border-radius: 12px;
  background: #fff8e8;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.65;
}

/* Step navigation buttons */
.step-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.step-button { min-width: 120px; min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--border-soft); background: #fff; color: var(--navy); font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.step-button.next-button { margin-left: auto; border-color: var(--navy); background: var(--navy); color: #fff; }
.step-button.next-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(11, 37, 69, .18); }
.step-button.prev-button:hover { background: var(--border-soft); }

.submit-button { width: 100%; min-height: 54px; border: 0; border-radius: 12px; background: var(--success); color: white; font-weight: 800; cursor: pointer; box-shadow: 0 10px 24px rgba(47, 143, 107, .22); transition: background .2s ease, transform .2s ease; margin-top: 8px; }
.submit-button:hover { background: #267a5b; transform: translateY(-1px); }
.submit-button:disabled { opacity: .55; cursor: wait; }
.submit-note { margin: 13px 8px 0; color: var(--muted); font-size: 12px; line-height: 1.65; text-align: center; }
.form-message { min-height: 24px; margin: 14px 0 0; text-align: center; color: var(--success); font-weight: 700; }
.form-message.error { color: var(--warning); }
.form-message.success {
  padding: 14px 16px;
  border-radius: 12px;
  background: #e7f5ee;
  border: 1px solid rgba(47, 143, 107, .32);
  color: var(--success);
  font-size: 15px;
  line-height: 1.6;
}
.booking-success-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 26px;
  border: 1px solid rgba(47, 143, 107, .24);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #edf8f2 100%);
  box-shadow: 0 14px 34px rgba(11, 37, 69, .08);
}
.booking-success-panel[hidden] { display: none; }
.booking-success-panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(23px, 2.5vw, 31px);
  line-height: 1.35;
}
.booking-success-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}
.success-warning {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(217, 107, 78, .24);
  border-radius: 12px;
  background: #fff3ed;
  color: var(--ink);
  line-height: 1.65;
}
.success-warning strong { color: var(--warning); }
.line-desktop-guide {
  display: grid;
  gap: 8px;
  padding: 15px 16px;
  border: 1px solid rgba(216, 179, 106, .42);
  border-radius: 12px;
  background: #fff9ec;
}
.line-desktop-guide[hidden],
.line-mobile-guide[hidden],
.line-copy-button[hidden] {
  display: none;
}
.line-desktop-guide strong {
  color: var(--navy);
  font-size: 15px;
}
.line-desktop-guide p,
.line-mobile-guide {
  color: var(--muted) !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
}
.line-mobile-guide {
  padding: 12px 14px;
  border: 1px solid rgba(47, 143, 107, .25);
  border-radius: 12px;
  background: #edf8f2;
}
.line-confirm-button {
  min-height: 56px;
  border: 0;
  border-radius: 13px;
  background: #06c755;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(6, 199, 85, .24);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.line-confirm-button:hover {
  transform: translateY(-1px);
  background: #05b84e;
  box-shadow: 0 15px 28px rgba(6, 199, 85, .3);
}
.line-copy-button {
  min-height: 52px;
  border: 1.5px solid rgba(11, 37, 69, .18);
  border-radius: 13px;
  background: #fff;
  color: var(--navy);
  font-weight: 900;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}
.line-copy-button:hover {
  transform: translateY(-1px);
  background: var(--border-soft);
}
.line-copy-status {
  min-height: 22px;
  color: var(--success) !important;
  font-size: 13px !important;
  font-weight: 800;
}
.desktop-line-note {
  padding-top: 2px;
  color: var(--muted) !important;
  font-size: 13px !important;
}

@media (max-width: 980px) {
  main { width: min(760px, calc(100% - 32px)); grid-template-columns: 1fr; padding-top: 28px; }
  .booking-intro { position: static; padding: 26px 28px; }
  .booking-steps { grid-template-columns: repeat(3, 1fr); padding: 18px 0; gap: 10px; }
  .booking-steps article { grid-template-columns: 30px 1fr; gap: 8px; }
  .booking-steps strong { width: 28px; height: 28px; }
  .booking-steps span { display: none; }
}
@media (max-width: 720px) {
  .booking-header { min-height: 0; padding: 10px 16px; align-items: center; flex-direction: row; }
  .line-link { width: 100%; text-align: center; }
  .brand-logo-wrap { width: 48px; height: 48px; border-radius: 10px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .line-link { width: auto; padding: 10px 12px; font-size: 12px; }
  main { width: calc(100% - 24px); padding: 14px 0 40px; gap: 14px; }
  .booking-intro { padding: 19px 18px 17px; border-radius: 13px; }
  .intro-copy { padding-bottom: 15px; }
  .eyebrow { margin-bottom: 6px; font-size: 11px; }
  h1 { font-size: 24px; line-height: 1.34; }
  h1 span { font-size: 13px; }
  .booking-intro p:not(.eyebrow) { margin-bottom: 0; font-size: 13px; line-height: 1.65; }
  .booking-steps { grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 12px 0; }
  .booking-steps article { display: flex; gap: 5px; padding: 4px 0; }
  .booking-steps strong { width: 24px; height: 24px; flex: 0 0 24px; font-size: 10px; }
  .booking-steps b { font-size: 11px; white-space: nowrap; }
  .trust-row { gap: 5px; }
  .trust-row span { padding: 5px 7px; font-size: 10px; }
  .intro-note { display: none; }
  .booking-card { padding: 18px 14px; border-radius: 13px; }
  .form-heading { margin-bottom: 16px; padding-bottom: 14px; }
  .form-heading h2 { font-size: 21px; }
  .form-heading > span { font-size: 11px; }
  .reassurance { grid-template-columns: 1fr; gap: 4px; margin-bottom: 18px; padding: 12px 13px; }
  .reassurance p { font-size: 12px; }
  .step-progress-list span.step-dot { width: 26px; height: 26px; font-size: 12px; }
  .step-progress-list b { font-size: 10px; }
  .step-card { margin-bottom: 0; padding: 16px 12px; border-radius: 12px; }
  .step-card-head { gap: 8px; margin-bottom: 14px; }
  .step-num { width: 30px; height: 30px; font-size: 12px; }
  .step-card-head h3 { font-size: 16px; }
  .step-card-head p { display: none; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .wide { grid-column: auto; }
  input, select, textarea { min-height: 48px; }
  textarea { max-height: 150px; }
  .upload-field { width: 100%; padding: 14px 12px; }
  .photo-preview { grid-template-columns: repeat(2, 1fr); }
  .service-type-grid { grid-template-columns: repeat(2, 1fr); }
  .consent { margin: 19px 2px 0; font-size: 13px; line-height: 1.5; }
  .line-confirm-reminder { margin-top: 18px; padding: 12px; font-size: 12px; }
  .step-actions { flex-direction: column-reverse; gap: 10px; }
  .step-button { width: 100%; }
  .step-button.next-button { margin-left: 0; }
  .submit-button { width: 100%; }
  .submit-note { margin-inline: 4px; }
  .booking-success-panel { padding: 20px 15px; border-radius: 13px; }
  .booking-success-panel h2 { font-size: 22px; }
  .line-confirm-button,
  .line-copy-button { width: 100%; }
  .line-desktop-guide { padding: 13px 12px; }
}
