:root {
  --ink: #172126;
  --muted: #64727a;
  --line: #dbe4e7;
  --brand: #16705b;
  --brand-dark: #10272b;
  --accent: #d97706;
  font-family: "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5f7f8;
}

.page {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 16px 14px 36px;
}

.hero {
  min-height: 62vh;
  display: grid;
  align-content: end;
  gap: 22px;
  border-radius: 10px;
  padding: 22px;
  color: white;
  background:
    linear-gradient(rgba(16, 39, 43, 0.78), rgba(22, 112, 91, 0.68)),
    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;
}

.source-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 8px 0;
  font-size: 38px;
  line-height: 1.12;
}

.hero p {
  margin: 0;
  line-height: 1.6;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hero-actions button {
  grid-column: auto;
}

.line-friend {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.line-friend img {
  display: block;
  width: auto;
  max-width: 100%;
}

.card,
.success {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 16px;
}

.hidden {
  display: none !important;
}

.success {
  display: grid;
  gap: 5px;
  border-left: 5px solid var(--brand);
  background: #eef8f4;
}

.success span,
.notice,
.mini {
  color: var(--muted);
  line-height: 1.6;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
}

.full,
.notice,
button {
  grid-column: 1 / -1;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: white;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

button.secondary {
  background: white;
  color: var(--brand-dark);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.panel-title {
  margin-bottom: 12px;
}

.panel-title h2 {
  margin-bottom: 4px;
}

.panel-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.service-list {
  display: grid;
  gap: 9px;
}

.service {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
}

.service strong,
.service span {
  display: block;
}

.price {
  font-weight: 900;
  color: var(--brand);
}

.lookup-result {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.booking-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
}

.booking-result strong,
.booking-result span {
  display: block;
}

.booking-result strong {
  margin-bottom: 4px;
}

.booking-result strong span {
  display: inline;
}

.booking-result.cancelled {
  border-color: #f4b4ae;
  background: #fff8f7;
}

.booking-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.cancel-booking {
  min-height: 42px;
  border: 1px solid #f4b4ae;
  background: #fff5f5;
  color: #b42318;
}

.cancel-booking:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 460px) {
  .form,
  .service,
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 58vh;
  }
}
