:root {
  --yellow: #D5A51D;
  --yellow-hover: #C39510;
  --gold-line: #F1D98A;
  --ink: #171717;
  --paper: #FFFFFF;
  --wash: #FCFBF7;
  --muted: #666666;
  --line: #D9D9D9;
  --notice: #FFF9E8;
  --shadow: 0 5px 18px rgb(23 23 23 / 5%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgb(213 165 29 / 35%);
}
::selection { color: var(--ink); background: #F9E9B9; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 9; padding: .5rem .75rem;
  color: var(--ink); background: #F9E9B9; border: 2px solid var(--yellow); border-radius: .5rem;
}

header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px clamp(16px, 5vw, 64px);
  color: var(--ink); background: var(--paper); border-bottom: 2px solid var(--yellow);
}
.brand {
  color: #8D6A00; font-size: 23px; font-weight: 900; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap;
}
.brand::before {
  content: "▣"; display: inline-grid; width: 38px; height: 38px; margin-right: 9px;
  place-items: center; color: var(--ink); background: #F9E9B9; border: 1px solid var(--gold-line); border-radius: 9px;
}
.brand small { display: none; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); }
.nav a { position: relative; color: var(--ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.nav a:hover, .nav a:focus-visible { color: #9B7408; }
.langs { display: flex; gap: 6px; }
.test-langs { align-items: center; }
.test-langs span { color: var(--muted); font-size: 12px; }
.langs a {
  min-width: 42px; padding: 5px 9px; color: var(--muted); background: var(--paper);
  border: 1px solid #BFC1C4; border-radius: 18px; font-size: 12px; text-align: center; text-decoration: none;
}
.langs [aria-current="page"] { color: var(--ink); background: #FFF4CF; border-color: var(--yellow); font-weight: 850; }

.wrap {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  align-items: start; gap: 18px; max-width: 1320px; margin: auto; padding: 24px clamp(14px, 2vw, 26px) 36px;
}
#app-error, .prototype-test-banner, .hero, #contact, .wrap > p.notice { grid-column: 1 / -1; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr); align-items: stretch;
  gap: clamp(20px, 4vw, 48px); padding: clamp(24px, 4vw, 48px);
  background: linear-gradient(118deg, #FFFFFF 0%, #FFFEFA 56%, #FFFFFF 100%);
  border: 1px solid var(--gold-line); border-radius: 18px; box-shadow: var(--shadow);
}
.hero > div:first-child { align-self: center; max-width: 640px; }
#faq { grid-column: 1 / -1; }
.tag {
  display: inline-block; padding: 5px 11px; color: #765900; background: #FFF4CF;
  border-radius: 5px; font-size: 13px; font-weight: 850;
}
.hero h1 { margin: 14px 0 10px; font-size: clamp(34px, 5vw, 58px); line-height: 1.12; letter-spacing: -.025em; }
.hero p { color: #343434; }

.panel {
  min-width: 0; margin: 0; padding: clamp(18px, 2.3vw, 26px);
  background: var(--paper); border: 1px solid var(--gold-line); border-radius: 14px; box-shadow: var(--shadow);
}
.panel h2, #contact h2 { margin: 0 0 8px; font-size: clamp(21px, 2.4vw, 27px); line-height: 1.25; }
.panel h2::before {
  content: ""; display: inline-block; width: 7px; height: 1.05em; margin: 0 10px -3px 0;
  background: var(--yellow); border-radius: 3px;
}
.panel h3 { color: var(--ink); }
.panel > p:first-of-type { margin-top: 4px; }
.field { margin: 12px 0; }
.field label { display: block; margin-bottom: 5px; font-size: 14px; font-weight: 750; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 8px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
button {
  min-height: 42px; padding: 9px 14px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--ink); border-radius: 8px; font-weight: 750;
}
button:hover { background: #FFF9E8; }
.gold, .burgundy {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 20px;
  color: var(--ink); background: var(--yellow); border: 1px solid var(--yellow); border-radius: 10px;
  font-size: 16px; font-weight: 900; text-decoration: none;
}
.gold:hover, .burgundy:hover { color: var(--ink); background: var(--yellow-hover); border-color: var(--yellow-hover); }
#enquiry-form > .gold { width: 100%; margin-top: 3px; }

.notice {
  padding: 13px 16px; color: var(--ink); background: var(--notice);
  border: 1px solid var(--gold-line); border-left: 5px solid var(--yellow); border-radius: 9px;
}
.notice p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); font-size: 13px; }
.faq-list details { padding: 12px 0; border-top: 1px solid var(--line); }
.faq-list summary { color: var(--ink); font-weight: 800; cursor: pointer; }
.faq-list summary::marker { color: #B48708; }
.faq-list details[open] summary { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.faq-list details p { margin: 9px 0 2px; color: #343434; }
.status { color: var(--ink); font-size: 13px; font-weight: 800; }
.transcript {
  margin: 10px 0; padding: 12px; color: var(--ink); background: #F7F7F5;
  border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.case { padding: 15px 0; border-top: 1px solid var(--line); }
.case-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.success { color: var(--ink); font-weight: 800; }
#enquiry-result.success, #faq-result.success { padding: 8px 10px; border-left: 4px solid var(--yellow); }
.footer {
  padding: 18px 22px; color: var(--muted); background: var(--paper); border-top: 3px solid var(--yellow);
  font-size: 13px; text-align: center;
}
.hidden { display: none !important; }

.fares-wrap { max-width: 1120px; margin: auto; padding: 28px clamp(14px, 3vw, 32px) 40px; }
.fares-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; }
.fares-heading .tag { margin: 0; }
.fares-heading h1 { flex: 1 1 100%; margin: 2px 0 0; font-size: clamp(30px, 4vw, 42px); line-height: 1.2; }
.fare-home { color: #765900; font-weight: 750; }
.fare-section { margin: 16px 0; }
.fare-section h2 { margin-bottom: 14px; }
.fare-table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border: 1px solid var(--line); border-radius: 9px; }
.fare-table { width: 100%; border-collapse: collapse; text-align: left; }
.fare-table caption { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.fare-table th, .fare-table td { padding: 10px 13px; border-bottom: 1px solid #E8E8E6; vertical-align: top; }
.fare-table thead th { color: var(--ink); background: #FFF4CF; font-size: 14px; }
.fare-table th:first-child { min-width: 14rem; }
.fare-table td { min-width: 7rem; white-space: nowrap; font-weight: 750; }
.fare-table .fare-region th { padding-top: 9px; padding-bottom: 8px; color: #765900; background: #FFF9E8; font-size: 14px; }
.fare-table tbody:last-child tr:last-child > * { border-bottom: 0; }
.fare-place-note { margin: 10px 4px; }

@media (max-width: 780px) {
  header { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; justify-content: space-between; gap: 10px; }
  .wrap { grid-template-columns: 1fr; }
  #app-error, .prototype-test-banner, .hero, #contact, .wrap > p.notice { grid-column: 1; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(300px, .95fr); }
}
@media (max-width: 680px) {
  header { position: static; gap: 8px; padding: 9px 14px; }
  header { display: grid; grid-template-columns: 1fr auto; }
  .brand { font-size: 20px; }
  .brand::before { width: 34px; height: 34px; margin-right: 6px; }
  .langs { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
  .nav { grid-column: 1 / -1; grid-row: 3; order: initial; overflow-x: auto; justify-content: flex-start; gap: 20px; padding: 5px 0 2px; }
  .nav a { flex: 0 0 auto; padding: 5px 0; font-size: 13px; }
  .langs a { min-width: 38px; padding: 5px 7px; }
  .wrap { gap: 14px; padding: 14px 12px 26px; }
  .hero { grid-template-columns: 1fr; gap: 12px; padding: 20px 16px; border-radius: 14px; }
  .hero h1 { font-size: clamp(32px, 9vw, 42px); }
  .panel { padding: 17px 15px; }
  .grid { grid-template-columns: 1fr; gap: 0; }
  .case-actions button { flex: 1 1 auto; }
  .fares-wrap { padding: 18px 12px 28px; }
  .fare-section { padding: 16px 12px; }
  .fare-table { min-width: 490px; }
}
