:root {
  --blue-950: #031525;
  --blue-900: #06233a;
  --blue-850: #082c49;
  --blue-800: #0a3a5c;
  --blue-700: #075985;
  --blue-600: #087aa8;
  --blue-500: #0ea5c9;
  --cyan-400: #38d6e8;
  --cyan-300: #79e5ef;
  --white: #f7fbff;
  --text: #dcecf5;
  --muted: #91acbd;
  --line: rgba(151, 211, 235, 0.16);
  --panel: rgba(6, 35, 58, 0.86);
  --field: rgba(3, 21, 37, 0.58);
  --orange: #ffad32;
  --danger: #ff6b75;
  --shadow: 0 24px 70px rgba(0, 13, 24, 0.34);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans TC", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(14, 165, 201, 0.18), transparent 28rem),
    radial-gradient(circle at 92% 36%, rgba(56, 214, 232, 0.1), transparent 24rem),
    linear-gradient(145deg, var(--blue-950), #052942 55%, #073957);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 72%);
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.booking-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 104px 0 40px;
}

.service-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(8, 44, 73, .95), rgba(5, 27, 47, .92));
  box-shadow: var(--shadow);
}

.hero-media { position: relative; min-height: 420px; overflow: hidden; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, rgba(5, 27, 47, .7)), linear-gradient(0deg, rgba(3, 21, 37, .52), transparent 55%); }
.hero-media img { width: 100%; height: 100%; display: block; object-fit: cover; }
.hero-badge { position: absolute; z-index: 1; left: 24px; bottom: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: var(--white); background: rgba(3, 28, 47, .78); font-size: .84rem; font-weight: 700; }

.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vw, 52px); }
.eyebrow, .step-kicker { margin: 0 0 8px; color: var(--cyan-400); font-size: .74rem; font-weight: 800; letter-spacing: .16em; }
.hero-copy h1 { margin: 0; color: var(--white); font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.12; letter-spacing: -.04em; }
.hero-copy h1 span { color: var(--cyan-400); }
.hero-description { margin: 18px 0 24px; color: var(--muted); line-height: 1.8; }

.service-facts { display: grid; gap: 10px; }
.service-facts > div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid rgba(121,229,239,.12); border-radius: 13px; background: rgba(2, 20, 35, .35); }
.service-facts i { width: 22px; color: var(--cyan-400); text-align: center; }
.service-facts span { display: flex; flex: 1; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .86rem; }
.service-facts strong { color: var(--white); font-weight: 700; }

.location-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 18px; padding: 14px; border: 1px solid rgba(56,214,232,.24); border-radius: 15px; color: inherit; background: rgba(14,165,201,.07); text-decoration: none; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.location-card:hover { transform: translateY(-2px); border-color: rgba(56,214,232,.55); background: rgba(14,165,201,.13); }
.location-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; color: var(--cyan-300); background: rgba(14,165,201,.16); }
.location-card small, .location-card strong { display: block; }
.location-card small { color: var(--muted); font-size: .72rem; }
.location-card strong { margin-top: 2px; color: var(--white); font-size: .88rem; }
.location-card > i { color: var(--cyan-400); font-size: .8rem; }

.booking-card { width: min(780px, 100%); margin: 28px auto 0; padding: clamp(24px, 5vw, 48px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--panel); box-shadow: var(--shadow); }
.form-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.form-heading h2 { margin: 0; color: var(--white); font-size: clamp(1.65rem, 4vw, 2.3rem); letter-spacing: -.03em; }
.secure-note { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; color: var(--cyan-300); background: rgba(14,165,201,.1); font-size: .75rem; font-weight: 700; white-space: nowrap; }

.notice-card { display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; border: 1px solid rgba(56,214,232,.2); border-radius: var(--radius-md); color: #b8d5e5; background: rgba(14,165,201,.07); }
.notice-card i { margin-top: 4px; color: var(--cyan-400); }
.notice-card p { margin: 0; font-size: .87rem; line-height: 1.65; }
.notice-card strong { color: var(--white); }

.form-section { padding-top: 34px; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.section-title > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--cyan-300); background: rgba(14,165,201,.13); font-size: .78rem; font-weight: 900; }
.section-title h3, .section-title p { margin: 0; }
.section-title h3 { color: var(--white); font-size: 1.05rem; }
.section-title p { margin-top: 3px; color: var(--muted); font-size: .75rem; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-grid { grid-template-columns: minmax(0, 1.35fr) minmax(130px, .65fr); }
.full-field { grid-column: 1 / -1; }
.field { display: block; }
.field > span { display: block; margin: 0 0 8px 3px; color: #bad0dd; font-size: .78rem; font-weight: 700; }
.field small { display: block; margin: 7px 3px 0; color: var(--muted); font-size: .72rem; }

input, select { width: 100%; height: 52px; padding: 0 15px; border: 1px solid rgba(151,211,235,.18); border-radius: var(--radius-md); outline: 0; color: var(--white); background: var(--field); transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
input::placeholder { color: #66869a; }
input:hover, select:hover { border-color: rgba(121,229,239,.34); }
input:focus, select:focus { border-color: var(--cyan-400); background: rgba(3,21,37,.78); box-shadow: 0 0 0 4px rgba(14,165,201,.12); }
input:disabled, select:disabled { cursor: not-allowed; opacity: .58; }
select { color-scheme: dark; cursor: pointer; }
select option { color: var(--white); background: var(--blue-900); }
input[type="number"] { appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { opacity: .5; }
.number-field { position: relative; }
.number-field i { position: absolute; top: 50%; left: 16px; z-index: 1; color: var(--cyan-400); transform: translateY(-50%); }
.number-field input { padding-left: 45px; }

.calendar-container { padding: 18px; border: 1px solid rgba(151,211,235,.16); border-radius: var(--radius-lg); background: rgba(3,21,37,.46); }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-header strong { color: var(--white); font-size: 1.02rem; }
.calendar-nav { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(151,211,235,.18); border-radius: 11px; color: var(--cyan-300); background: rgba(14,165,201,.08); cursor: pointer; transition: .2s ease; }
.calendar-nav:hover:not(:disabled) { border-color: var(--cyan-400); background: rgba(14,165,201,.18); }
.calendar-nav:disabled { cursor: not-allowed; opacity: .25; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-day { padding: 6px 0; color: #7694a8; font-size: .7rem; font-weight: 700; text-align: center; }
.day { display: grid; aspect-ratio: 1; min-height: 38px; place-items: center; border: 1px solid transparent; border-radius: 11px; color: #cfdee7; background: transparent; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.day:hover:not(:disabled) { border-color: rgba(56,214,232,.3); background: rgba(14,165,201,.1); }
.day.today { border-color: rgba(56,214,232,.58); color: var(--cyan-300); }
.day.selected { border-color: var(--cyan-400); color: #002331; background: linear-gradient(135deg, var(--cyan-300), var(--blue-500)); font-weight: 900; box-shadow: 0 7px 18px rgba(14,165,201,.22); }
.day:disabled { color: #456072; cursor: not-allowed; opacity: .38; }
.calendar-legend { display: flex; gap: 18px; margin-top: 14px; color: var(--muted); font-size: .68rem; }
.calendar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.today-dot { border: 1px solid var(--cyan-400); }
.selected-dot { background: var(--cyan-400); }
.time-field { margin-top: 14px; }

.student-offer { margin-top: 34px; padding: 20px; border: 1px solid rgba(255,173,50,.3); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(255,173,50,.08), rgba(255,173,50,.025)); }
.offer-heading { display: flex; align-items: center; gap: 13px; }
.offer-icon { display: grid; flex: 0 0 auto; width: 44px; height: 44px; place-items: center; border-radius: 13px; color: #231505; background: var(--orange); }
.offer-heading p, .offer-heading h3 { margin: 0; }
.offer-heading p { color: var(--orange); font-size: .76rem; font-weight: 800; }
.offer-heading h3 { margin-top: 3px; color: var(--white); font-size: .98rem; }
.student-offer ul { margin: 16px 0; padding-left: 20px; color: #b9c9d2; font-size: .8rem; line-height: 1.9; }
.student-offer li::marker { color: var(--orange); }

.booking-summary { margin-top: 26px; border: 1px solid rgba(56,214,232,.18); border-radius: var(--radius-md); background: rgba(3,21,37,.42); }
.booking-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 17px; }
.booking-summary span { color: var(--muted); font-size: .76rem; }
.booking-summary strong { color: var(--cyan-300); font-size: 1.1rem; }

.agreement { display: flex; align-items: flex-start; gap: 10px; margin: 18px 2px 0; color: #a9c0ce; font-size: .78rem; line-height: 1.65; cursor: pointer; }
.agreement input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; padding: 0; accent-color: var(--blue-500); }
.form-error { min-height: 22px; margin: 10px 2px 0; color: #ff9fa6; font-size: .8rem; }

.submit-btn { display: flex; width: 100%; min-height: 56px; align-items: center; justify-content: space-between; gap: 12px; margin-top: 5px; padding: 0 22px; border: 0; border-radius: 15px; color: #fff; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); box-shadow: 0 14px 30px rgba(4,106,151,.25); cursor: pointer; font-weight: 900; transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.submit-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 18px 34px rgba(4,106,151,.34); }
.submit-btn:disabled { cursor: wait; opacity: .7; }

.result-box { display: none; margin-top: 24px; padding: 20px; border: 1px solid rgba(56,214,232,.35); border-radius: var(--radius-lg); background: rgba(14,165,201,.08); }
.result-box.show { display: block; }
.result-heading { display: flex; align-items: center; gap: 12px; }
.result-heading > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: #002b3a; background: var(--cyan-400); }
.result-heading h3, .result-heading p { margin: 0; }
.result-heading h3 { color: var(--white); font-size: 1rem; }
.result-heading p { margin-top: 3px; color: var(--muted); font-size: .74rem; }
.result-content { margin: 16px 0; padding: 16px; overflow-x: auto; border: 1px solid rgba(151,211,235,.13); border-radius: 12px; color: #cee4ef; background: rgba(2,18,31,.62); font-family: inherit; font-size: .82rem; line-height: 1.75; white-space: pre-wrap; }
.copy-btn, .ig-btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 12px; font-size: .82rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.copy-btn { border: 1px solid rgba(56,214,232,.32); color: var(--cyan-300); background: rgba(14,165,201,.08); }
.ig-btn { margin-left: 8px; border: 0; color: white; background: linear-gradient(135deg, #7c3aed, #e1306c); }

.footer { padding: 34px 16px 10px; text-align: center; }
.footer img { width: 110px; height: auto; opacity: .75; }
.footer p { max-width: 620px; margin: 10px auto 0; color: #7896a8; font-size: .74rem; line-height: 1.65; }
.toast { position: fixed; z-index: 10000; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 11px 16px; border: 1px solid rgba(121,229,239,.25); border-radius: 12px; color: var(--white); background: rgba(3,21,37,.95); box-shadow: 0 14px 36px rgba(0,0,0,.3); opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .booking-shell { padding-top: 82px; }
  .service-hero { grid-template-columns: 1fr; }
  .hero-media { min-height: 280px; }
  .hero-media::after { background: linear-gradient(0deg, rgba(5,27,47,.85), transparent 60%); }
  .service-facts span { display: block; }
  .service-facts strong { display: block; margin-top: 2px; }
}

@media (min-width: 821px) {
  .booking-shell {
    width: min(1000px, calc(100% - 40px));
    padding-top: 82px;
  }
  .service-hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, .86fr);
  }
  .hero-media { min-height: 360px; }
  .hero-copy { padding: 30px 34px; }
  .hero-copy h1 { font-size: clamp(2rem, 3vw, 2.65rem); }
  .hero-copy h1 span { display: block; margin-top: 6px; }
  .hero-description { margin: 14px 0 18px; font-size: .9rem; line-height: 1.7; }
  .service-facts { gap: 8px; }
  .service-facts > div { padding: 10px 12px; }
  .location-card { margin-top: 14px; padding: 12px; }
  .hero-badge { left: 18px; bottom: 18px; padding: 8px 12px; font-size: .78rem; }

  .booking-card {
    width: min(720px, 100%);
    margin-top: 22px;
    padding: 32px 38px;
    border-radius: 26px;
  }
  .form-heading { margin-bottom: 14px; }
  .form-heading h2 { font-size: 1.8rem; }
  .form-section { padding-top: 26px; }
  .section-title { margin-bottom: 14px; }
  .section-title > span { width: 34px; height: 34px; }
  input, select { height: 48px; }
}

@media (max-width: 560px) {
  .booking-shell { width: min(100% - 20px, 1120px); padding-bottom: 24px; }
  .service-hero, .booking-card { border-radius: 22px; }
  .hero-media { min-height: 220px; }
  .hero-badge { left: 14px; bottom: 14px; }
  .hero-copy { padding: 24px 20px 26px; }
  .hero-copy h1 { font-size: 1.75rem; }
  .booking-card { margin-top: 16px; padding: 24px 16px; }
  .form-heading { align-items: flex-start; }
  .secure-note { margin-top: 4px; font-size: 0; }
  .secure-note i { font-size: .85rem; }
  .field-grid, .contact-grid { grid-template-columns: 1fr; }
  .compact-field, .full-field { grid-column: auto; }
  .people-grid { grid-template-columns: 1fr 1fr; }
  .calendar-container { padding: 13px; }
  .calendar-grid { gap: 3px; }
  .day { min-height: 34px; border-radius: 9px; font-size: .82rem; }
  .copy-btn, .ig-btn { display: flex; width: 100%; }
  .ig-btn { margin: 8px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
