:root {
  --bg: #f4f7fb;
  --paper: #ffffff;
  --paper-soft: #f8fbfe;
  --ink: #1d3247;
  --muted: #5d7388;
  --line: #c9d8e6;
  --line-strong: #aebfd0;
  --accent: #2f6ea6;
  --accent-deep: #1f4e7c;
  --accent-soft: #eaf2f9;
  --shadow: 0 10px 24px rgba(20, 45, 70, 0.06);
  --radius-md: 18px;
  --radius-lg: 28px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Serif TC", "PingFang TC", "Microsoft JhengHei", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(47, 110, 166, 0.12), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  line-height: 1.72;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--accent-deep);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-deep);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 12px;
}

.page-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 16px auto 40px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header,
.tabs-shell,
.tabpanel-wrap,
.sources,
.footer,
.card,
.table-card,
.wide-card,
.step-card,
.route-head,
.stats-ribbon div,
.faq-list details,
.source-list a,
.place-grid > article {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.map-card {
  background: var(--paper-soft);
  padding: 18px;
}

#panel-overview .content-grid.two-up {
  align-items: stretch;
}

#panel-overview .editorial,
#panel-overview .artwork-card {
  height: 100%;
}

#panel-overview .artwork-card {
  padding: 8px;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.artwork-zoom {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  cursor: zoom-in;
}

#panel-overview .artwork-card img,
.artwork-zoom img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(18, 26, 36, 0.72);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1200px);
  max-height: 92vh;
  margin: 4vh auto;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(92vh - 36px);
  object-fit: contain;
  border-radius: 14px;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(18, 26, 36, 0.08);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.map-embed {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  background: #e8f0f7;
  box-shadow: inset 0 0 0 1px rgba(47, 110, 166, 0.08);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.site-header,
.tabs-shell,
.tabpanel-wrap,
.sources,
.footer,
.card,
.table-card,
.wide-card,
.step-card,
.route-head,
.place-grid > article {
  border-radius: var(--radius-md);
}

.site-header {
  position: sticky;
  top: 10px;
  z-index: 20;
  backdrop-filter: blur(12px);
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.84);
}

.mobile-header-menu {
  margin-top: 12px;
  margin-bottom: 0;
}

.topbar {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  flex-wrap: nowrap;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.18em;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: inset 0 -10px 22px rgba(0, 0, 0, 0.12);
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.brand-copy strong,
.section-heading h2,
.card h3,
.table-card h3,
.step-card h3,
.route-head h3,
.place-grid h3,
.faq-list summary {
  font-family: "Noto Serif TC", "PingFang TC", serif;
}

.brand-copy strong {
  font-size: 1.02rem;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 0;
  white-space: nowrap;
}

.brand-copy small,
.section-heading p,
.card p,
.step-card p,
.route-head p,
.place-grid p,
.footer p,
.small-muted,
.key-list,
.step-points,
.faq-list p,
.source-list a,
tbody td,
.stats-ribbon span {
  color: var(--muted);
}

.card h3,
.table-card h3,
.step-card h3,
.route-head h3 {
  margin-top: 0;
  margin-bottom: 10px;
  line-height: 1.35;
}

.ghost-link,
.solid-link,
.tab {
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  text-decoration: none;
  transition: 180ms ease;
}

.ghost-link,
.tab {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.solid-link,
.tab.is-active {
  color: #fff;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.ghost-link:hover,
.tab:hover {
  border-color: rgba(31, 78, 124, 0.28);
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--accent);
}

.card-tag,
.route-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.82rem;
}

.tabs-section,
.sources {
  margin-top: 28px;
}

.sources {
  padding: 20px;
}

.section-heading {
  margin-bottom: 20px;
}

.compact-heading {
  margin-bottom: 10px;
}

.compact-heading:empty {
  display: none;
}

.tabs-shell {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.mobile-page-menu {
  display: none;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.mobile-page-menu-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.mobile-page-menu-summary::-webkit-details-marker {
  display: none;
}

.mobile-page-menu-label {
  color: var(--muted);
  font-size: 0.86rem;
}

.mobile-page-menu-current {
  color: var(--ink);
}

.mobile-page-menu-summary::after {
  content: "▾";
  color: var(--accent-deep);
}

.mobile-page-menu[open] .mobile-page-menu-summary::after {
  content: "▴";
}

.mobile-page-menu-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 14px;
}

.mobile-page-link {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  font: inherit;
}

.mobile-page-link.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.mobile-fee-list {
  display: grid;
  gap: 10px;
}

.mobile-fee-item {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.mobile-fee-item strong {
  font-size: 0.96rem;
  line-height: 1.45;
}

.mobile-fee-item span {
  color: var(--accent-deep);
  font-weight: 700;
}

.tablist {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.tab {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 14px;
  font-weight: 600;
  white-space: nowrap;
}

.tabpanel-wrap {
  padding: 24px;
  border-radius: 24px;
}

.tabpanel {
  display: grid;
  gap: 18px;
}

.content-grid.two-up,
.fee-notes-grid,
.place-grid,
.route-columns,
.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.content-grid.two-up > *,
.fee-notes-grid > *,
.place-grid > *,
.route-columns > *,
.source-list > * {
  min-width: 0;
}

.card,
.table-card,
.wide-card,
.step-card,
.route-head {
  padding: 24px;
}

.card,
.table-card,
.step-card,
.route-head,
.stats-ribbon div,
.source-list a,
.faq-list details {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

:focus-visible {
  outline: 3px solid rgba(47, 110, 166, 0.3);
  outline-offset: 3px;
}

.card:hover,
.table-card:hover,
.step-card:hover,
.route-head:hover,
.stats-ribbon div:hover,
.source-list a:hover,
.faq-list details:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(20, 45, 70, 0.09);
  border-color: rgba(47, 110, 166, 0.24);
}

.editorial,
.table-card,
.wide-card,
.step-card,
.fee-notes-grid .soft-card,
.place-grid.location-grid article {
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats-ribbon div {
  display: grid;
  gap: 4px;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
}

.flow-intro {
  display: grid;
  gap: 16px;
}

.flow-split {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  color: var(--accent);
}

.flow-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.72;
}

.flow-divider,
.route-line {
  height: 1px;
  background: var(--line-strong);
}

.route-columns {
  margin-top: 18px;
  align-items: stretch;
}

.route-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.route-column .route-step {
  flex: 1 1 auto;
}

.route-column .route-head {
  min-height: 132px;
}

.route-column .step-arrow {
  flex: 0 0 auto;
}

.route-collapse {
  min-width: 0;
}

.route-collapse summary {
  list-style: none;
  cursor: pointer;
}

.route-collapse summary::-webkit-details-marker {
  display: none;
}

.route-collapse .route-head {
  position: relative;
  padding-right: 46px;
}

.route-collapse .route-head::after {
  content: "▾";
  position: absolute;
  top: 18px;
  right: 18px;
  color: var(--accent-deep);
  font-size: 0.95rem;
}

.route-collapse[open] .route-head::after {
  content: "▴";
}

.route-body {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.route-head {
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fc 100%);
}

.route-head.warm {
  background: linear-gradient(180deg, #fffaf4 0%, #fff4e6 100%);
}

.route-head.calm {
  background: linear-gradient(180deg, #f7fbff 0%, #edf6ff 100%);
}

.step-arrow {
  margin: 10px 0;
  text-align: center;
  color: var(--accent);
  font-size: 1rem;
  opacity: 0.72;
}

.step-no {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 700;
}

.step-points {
  margin: 14px 0 0;
  padding-left: 18px;
}

.compact-points li + li {
  margin-top: 6px;
}

.responsive-table {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.responsive-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  position: sticky;
  top: 0;
  background: #f1f6fb;
}

tr:last-child td {
  border-bottom: 0;
}

.key-list,
.faq-list,
.source-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.key-list li + li,
.faq-list details + details {
  margin-top: 12px;
}

.place-grid > article {
  padding: 20px 22px;
}

.source-list a {
  display: flex;
  align-items: flex-start;
  min-height: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  text-decoration: none;
  line-height: 1.5;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.faq-list details {
  padding: 16px 18px;
  border-radius: 16px;
}

.faq-list details[open] {
  border-color: rgba(47, 110, 166, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
}

.footer {
  margin-top: 24px;
  padding: 18px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .content-grid.two-up,
  .fee-notes-grid,
  .place-grid,
  .route-columns,
  .source-list,
  .stats-ribbon {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max));
  }

  .site-header {
    top: 0;
    padding: 14px;
  }

  .site-header,
  .tabs-shell,
  .sources,
  .footer,
  .card,
  .table-card,
  .wide-card,
  .step-card,
  .route-head {
    padding: 14px;
  }

  .place-grid > article {
    padding: 16px;
  }

  .topbar {
    align-items: center;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .mobile-page-menu {
    display: block;
  }

  .mobile-header-menu {
    display: block;
  }

  .tablist {
    display: none;
  }

  .tabpanel-wrap {
    display: block;
    padding: 12px;
  }

  #panel-flow {
    gap: 12px;
  }

  .flow-intro,
  .route-columns {
    gap: 12px;
  }

  .route-columns {
    margin-top: 12px;
  }

  .route-column .route-head {
    min-height: 0;
  }

  .step-card,
  .route-head {
    padding: 12px;
  }

  .route-collapse .route-head {
    padding-right: 42px;
  }

  .route-body {
    margin-top: 8px;
  }

  .step-card h3,
  .route-head h3 {
    margin-bottom: 8px;
    font-size: 1rem;
  }

  .step-card p,
  .route-head p,
  .step-points {
    font-size: 0.95rem;
    line-height: 1.58;
  }

  .step-no {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
    font-size: 0.9rem;
  }

  .step-arrow {
    margin: 4px 0;
    font-size: 0.88rem;
  }

  .step-points {
    margin-top: 10px;
    padding-left: 16px;
  }

  .compact-points li + li {
    margin-top: 4px;
  }

  .flow-split {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 8px;
  }

  .flow-arrow {
    width: 32px;
  }

  .source-list a {
    padding: 13px 14px;
    line-height: 1.38;
  }

  #panel-fees .responsive-table {
    border: 0;
    overflow: visible;
  }

  #panel-fees .responsive-table table,
  #panel-fees .responsive-table thead,
  #panel-fees .responsive-table tbody,
  #panel-fees .responsive-table tr,
  #panel-fees .responsive-table th,
  #panel-fees .responsive-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #panel-fees .responsive-table thead {
    display: none;
  }

  #panel-fees .responsive-table tr {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%);
  }

  #panel-fees .responsive-table td {
    padding: 0;
    border: 0;
  }

  #panel-fees .responsive-table td:first-child {
    margin-bottom: 6px;
    color: var(--ink);
    font-weight: 600;
  }

  #panel-fees .responsive-table td:last-child {
    color: var(--accent-deep);
    font-weight: 700;
  }
}

@media (max-width: 560px) {
  .tabs-shell {
    padding: 14px;
  }

  #panel-overview .artwork-card {
    padding: 10px;
  }

  #panel-overview .artwork-card img {
    max-height: 220px;
    width: 100%;
    object-fit: contain;
  }

  .route-collapse .route-head::after {
    top: 14px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
