:root {
  --ink: #183044;
  --muted: #5f7182;
  --brand: #174f9b;
  --brand-dark: #123a70;
  --teal: #0f8b8d;
  --mint: #dff4ef;
  --green: #43885c;
  --coral: #e45d4f;
  --gold: #f2b94b;
  --paper: #ffffff;
  --soft: #f5f9fb;
  --line: #d7e2ea;
  --shadow: 0 18px 45px rgba(24, 48, 68, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

main[id],
section[id],
article[id],
.anchor-target {
  scroll-margin-top: 112px;
}

.anchor-target {
  display: block;
  height: 0;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

body.dialog-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(215, 226, 234, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(15, 139, 141, 0.16);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.3;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.76rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.site-nav a,
.header-call {
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
}

.site-nav a {
  padding: 8px 12px;
  color: #365064;
}

.site-nav a:hover {
  background: #eef6f6;
  color: var(--teal);
}

.header-call {
  padding: 9px 14px;
  color: var(--paper);
  background: var(--brand);
  white-space: nowrap;
}

.header-call:hover {
  background: var(--brand-dark);
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 82vh;
  padding: 120px 32px 72px;
  color: var(--paper);
  background:
    linear-gradient(90deg, rgba(16, 41, 72, 0.92) 0%, rgba(16, 70, 110, 0.78) 48%, rgba(15, 139, 141, 0.34) 100%),
    url("/static/images/quankang/hours-map.jpg") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(245, 249, 251, 0), var(--soft));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #bcece8;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: 4.6rem;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 2.4rem;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin-bottom: 28px;
  color: #e5f5fb;
  font-size: 1.25rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  color: var(--paper);
  background: var(--coral);
}

.button.primary:hover {
  background: #c9483e;
}

.button.line {
  color: var(--paper);
  background: #06c755;
}

.button.line:hover {
  background: #05ad4b;
}

.button.secondary {
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.12);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.contact-actions .button.secondary {
  color: var(--brand);
  border-color: var(--line);
  background: var(--paper);
}

.contact-actions .button.line {
  box-shadow: 0 10px 24px rgba(6, 199, 85, 0.18);
}

.text-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--brand);
  font-weight: 900;
}

.text-link:hover {
  color: var(--teal);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 900px;
  margin: 36px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-facts div {
  padding: 16px;
  background: rgba(13, 44, 74, 0.42);
}

.hero-facts dt,
.contact-details dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-facts dt {
  color: #bcece8;
}

.hero-facts dd,
.contact-details dd {
  margin: 0;
  font-weight: 800;
}

.contact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(1180px, calc(100% - 40px));
  margin: -32px auto 0;
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.contact-strip div {
  min-height: 112px;
  padding: 22px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.contact-strip div:last-child {
  border-right: 0;
}

.contact-strip span,
.contact-strip strong {
  display: block;
}

.contact-strip span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.contact-strip strong {
  margin-top: 4px;
  color: var(--brand);
  font-size: 1.25rem;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-heading p:last-child,
.split-copy p,
.contact-copy p {
  color: var(--muted);
}

.service-grid,
.plan-grid,
.focus-grid,
.material-grid {
  display: grid;
  gap: 18px;
}

.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.plan-card,
.focus-panel,
.contact-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(24, 48, 68, 0.06);
}

.service-card {
  min-height: 292px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--brand);
}

.service-card.accent-teal::before {
  background: var(--teal);
}

.service-card.accent-coral::before {
  background: var(--coral);
}

.service-card.accent-green::before {
  background: var(--green);
}

.service-code {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-weight: 800;
}

.service-card p {
  color: var(--muted);
}

.service-card a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--brand);
  font-weight: 800;
}

.package-section {
  padding-top: 30px;
}

.plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.plan-card {
  padding: 0 24px 24px;
  overflow: hidden;
}

.plan-topline {
  height: 8px;
  margin: 0 -24px 22px;
}

.plan-topline.red {
  background: var(--coral);
}

.plan-topline.green {
  background: var(--green);
}

.plan-topline.blue {
  background: var(--brand);
}

.plan-count {
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 800;
}

.plan-original {
  margin-bottom: 2px;
  color: var(--muted);
  font-weight: 800;
}

.plan-price,
.focus-price {
  color: var(--coral);
  font-weight: 900;
}

.plan-price {
  margin-bottom: 14px;
  font-size: 1.7rem;
}

.poster {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfefe;
  box-shadow: 0 12px 28px rgba(24, 48, 68, 0.08);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper);
  transition: transform 220ms ease;
}

.poster:hover img {
  transform: scale(1.015);
}

.poster.wide {
  aspect-ratio: 16 / 11;
}

.poster.tall,
.poster.portrait {
  aspect-ratio: 9 / 13;
}

.poster.landscape {
  aspect-ratio: 16 / 9;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: start;
}

.split-copy {
  position: sticky;
  top: 100px;
  padding: 30px;
  border-left: 5px solid var(--teal);
  background: var(--mint);
  border-radius: 8px;
}

.price-list {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(15, 139, 141, 0.22);
}

.price-list li:last-child {
  border-bottom: 0;
}

.price-list span {
  font-weight: 800;
}

.price-list strong {
  color: var(--coral);
  white-space: nowrap;
}

.poster-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.focused-section {
  width: 100%;
  padding: 92px max(20px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, #eef8f6 0%, #f9fbfc 100%);
}

.focused-section .section-heading,
.focused-section .focus-grid {
  width: min(1180px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.focus-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.focus-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  padding: 22px;
}

.focus-panel.compact {
  grid-template-columns: 1fr;
}

.focus-copy {
  min-width: 0;
}

.focus-price {
  margin-bottom: 12px;
  font-size: 1.55rem;
}

.focus-copy p:not(.focus-price),
.focus-copy li {
  color: var(--muted);
}

.focus-copy ul {
  margin: 18px 0 0;
  padding-left: 1.2rem;
}

.detail-section {
  padding-top: 72px;
}

.detail-stack {
  display: grid;
  gap: 14px;
}

.detail-group {
  scroll-margin-top: 112px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 24px rgba(24, 48, 68, 0.06);
}

.detail-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  color: var(--brand);
  font-weight: 900;
  cursor: pointer;
}

.detail-group summary::-webkit-details-marker {
  display: none;
}

.detail-group summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--paper);
  background: var(--teal);
  font-size: 1rem;
  line-height: 1;
}

.detail-group[open] summary::after {
  content: "-";
}

.detail-body {
  padding: 0 24px 24px;
}

.detail-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.test-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

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

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

.test-table th {
  color: var(--brand);
  background: #eef6f6;
  font-weight: 900;
  white-space: nowrap;
}

.test-table td:first-child,
.test-table td:nth-child(2) {
  font-weight: 800;
}

.test-table .price {
  color: var(--coral);
  font-weight: 900;
  white-space: nowrap;
}

.detail-list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.list-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfefe;
}

.list-block h3 {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 1.05rem;
}

.list-block ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.material-grid {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}

.material-grid .poster.landscape {
  aspect-ratio: 4 / 3;
}

.contact-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: center;
}

.contact-copy {
  min-width: 0;
}

.contact-details {
  padding: 28px;
}

.contact-details dl {
  display: grid;
  gap: 18px;
  margin: 0;
}

.contact-details div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.contact-details div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-details a {
  color: var(--brand);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 32px;
  color: #dbe9ef;
  background: #102943;
}

.site-footer p {
  margin: 0;
}

.image-dialog {
  width: min(1040px, calc(100% - 28px));
  max-height: min(92vh, 980px);
  padding: 18px;
  border: 0;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(10, 24, 38, 0.36);
}

.image-dialog::backdrop {
  background: rgba(6, 22, 35, 0.72);
}

.image-dialog img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--paper);
  background: rgba(16, 41, 67, 0.86);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

#dialog-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 18px;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .hero {
    min-height: 78vh;
    padding: 84px 20px 56px;
  }

  h1 {
    font-size: 3.6rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-facts,
  .contact-strip,
  .service-grid,
  .plan-grid,
  .split-section,
  .focus-grid,
  .focus-panel,
  .material-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .contact-strip {
    width: min(720px, calc(100% - 28px));
  }

  .contact-strip div {
    min-height: 92px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .contact-strip div:last-child {
    border-bottom: 0;
  }

  main[id],
  section[id],
  article[id],
  .detail-group,
  .anchor-target {
    scroll-margin-top: 190px;
  }

  .section {
    width: min(720px, calc(100% - 28px));
    padding: 72px 0;
  }

  .service-card {
    min-height: auto;
  }

  .split-copy {
    position: static;
  }

  .poster-row {
    grid-template-columns: 1fr;
  }

  .poster.tall,
  .poster.portrait {
    aspect-ratio: 9 / 12.8;
  }

  .focused-section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .detail-list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand strong {
    font-size: 0.92rem;
  }

  .brand small {
    display: none;
  }

  .header-call {
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  .hero {
    min-height: 76vh;
    background-position: 57% center;
  }

  h1 {
    font-size: 2.65rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-copy {
    font-size: 1.05rem;
  }

  .hero-facts div,
  .contact-strip div,
  .split-copy,
  .focus-panel,
  .detail-group summary,
  .detail-body,
  .list-block,
  .contact-details {
    padding: 18px;
  }

  .test-table {
    min-width: 680px;
    font-size: 0.9rem;
  }

  .contact-details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .price-list li {
    flex-direction: column;
    gap: 4px;
  }

  .poster.wide,
  .poster.landscape {
    aspect-ratio: 4 / 3;
  }

  .site-footer {
    padding: 24px 20px;
  }
}
