:root {
  --font-family: "SF Pro Text", "SF Pro Icons", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-card:
    0 40px 80px -12px rgba(0, 0, 0, 0.12),
    0 16px 40px -8px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  --shadow-card-dark:
    0 40px 80px -12px rgba(0, 0, 0, 0.5),
    0 16px 40px -8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --transition-smooth: cubic-bezier(0.32, 0.72, 0, 1);
}

:root {
  --bg-color: #fbfbfd;
  --text-color: #1d1d1f;
  --text-secondary: #86868b;
  --surface-color: rgba(255, 255, 255, 0.72);
  --surface-border: rgba(0, 0, 0, 0.05);
  --primary-color: #0071e3;
  --primary-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --divider-color: rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] {
  --bg-color: #000000;
  --text-color: #f5f5f7;
  --text-secondary: #86868b;
  --surface-color: rgba(28, 28, 30, 0.65);
  --surface-border: rgba(255, 255, 255, 0.1);
  --primary-color: #2997ff;
  --primary-hover: #409cff;
  --accent-soft: rgba(41, 151, 255, 0.12);
  --divider-color: rgba(255, 255, 255, 0.1);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Base layout */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: -50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 113, 227, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 80% 5%, rgba(52, 199, 89, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 20% 5%, rgba(175, 82, 222, 0.08) 0%, transparent 40%);
  filter: blur(60px);
  z-index: -2;
  animation: bg-drift 20s ease-in-out infinite alternate;
  opacity: 0.8;
}

@keyframes bg-drift {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-20px) scale(1.05);
  }
}

main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(1.75rem, 4vw, 3rem) 1.5rem;
  min-height: 100vh;
}


.page-card {
  width: min(640px, 100%);
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  backdrop-filter: saturate(180%) blur(50px);
  -webkit-backdrop-filter: saturate(180%) blur(50px);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.2rem);
  position: relative;
  transition: transform 0.4s var(--transition-smooth), box-shadow 0.4s var(--transition-smooth);
}

:root[data-theme="dark"] .page-card {
  box-shadow: var(--shadow-card-dark);
}

.page-card:hover {
  transform: translateY(-2px);
}


header.page-header {
  text-align: center;
  display: grid;
  gap: 0.5rem;
}

.page-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
}

.page-subtitle {
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  color: var(--text-secondary);
  margin: 0;
  font-weight: 400;
}

.lead-paragraph {
  font-size: clamp(1.05rem, 3.2vw, 1.18rem);
  line-height: 1.6;
  margin: 0;
  color: var(--text-color);
}

.highlight-card {
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: clamp(1rem, 2.5vw, 1.4rem);
  line-height: 1.65;
}

.action-area {
  display: grid;
  justify-content: center;
}

.primary-button {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: 1rem 3rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: #ffffff;
  background: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.primary-button .zh-text {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.primary-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 113, 227, 0.35);
}

.primary-button:hover::after {
  opacity: 1;
}

.primary-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.2);
}

.primary-button:disabled,
.primary-button[disabled] {
  cursor: default;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
  background: var(--text-secondary);
}

.primary-link {
  color: inherit;
  text-decoration: none;
}

.primary-link:hover,
.primary-link:focus-visible {
  text-decoration: underline;
}

.primary-button.primary-link {
  color: #ffffff;
  text-decoration: none;
}

.primary-button.primary-link:hover,
.primary-button.primary-link:focus-visible {
  text-decoration: none;
}


.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--surface-color);
  color: var(--text-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  z-index: 100;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  background: var(--bg-color);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: transform 0.5s var(--transition-smooth);
}

:root[data-theme="dark"] .theme-toggle svg {
  transform: rotate(180deg);
}


.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.info-list li {
  position: relative;
  padding-left: 1.65rem;
  font-size: 1.02rem;
  line-height: 1.55;
}

.info-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 6px 12px rgba(0, 113, 227, 0.25);
  transform: translateY(-50%);
}

.service-hours {
  appearance: none;
  border: none;
  background: none;
  font: inherit;
  color: var(--primary-color);
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline;
  line-height: inherit;
  white-space: normal;
  text-align: left;
  text-decoration: none;
  font-weight: 500;
  transition: color 160ms ease;
}

.service-hours:hover,
.service-hours:focus-visible {
  color: var(--primary-hover);
  text-decoration: underline dotted;
}

.service-hours:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.25);
  border-radius: 6px;
}

.service-hours[aria-expanded="true"] {
  color: var(--primary-hover);
}

.page-subtitle .service-hours {
  text-decoration: underline dotted;
}

.page-subtitle .service-hours:hover,
.page-subtitle .service-hours:focus-visible {
  text-decoration: underline;
}

.qr-wrapper {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

.qr-hint {
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 380px;
}

.service-tooltip {
  position: fixed;
  z-index: 30;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  box-shadow: 0 26px 46px rgba(15, 31, 68, 0.26);
  color: var(--text-color);
  max-width: min(320px, 88vw);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 200ms ease;
  display: grid;
  gap: 0.45rem;
}

.service-tooltip::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: inherit;
  border: 1px solid var(--surface-border);
  border-left: none;
  border-bottom: none;
  transform: translate(-50%, 0) rotate(45deg);
  bottom: -6px;
  left: var(--tooltip-arrow-x, 50%);
  box-shadow: inherit;
}

.service-tooltip[data-visible="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.service-tooltip.tooltip-below {
  transform: translateY(-6px);
}

.service-tooltip.tooltip-below::after {
  bottom: auto;
  top: -6px;
  border: 1px solid var(--surface-border);
  border-top: none;
  border-right: none;
}

.service-tooltip.tooltip-below[data-visible="true"] {
  transform: translateY(0);
}

:root[data-theme="dark"] .service-tooltip {
  background: rgba(28, 28, 30, 0.94);
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .service-tooltip::after {
  background: rgba(28, 28, 30, 0.94);
}

.service-tooltip .tooltip-primary {
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text-color);
}

.service-tooltip .tooltip-secondary {
  font-size: 0.78rem;
  color: rgba(110, 110, 115, 0.8);
  letter-spacing: 0.02em;
}

:root[data-theme="dark"] .service-tooltip .tooltip-secondary {
  color: rgba(190, 190, 205, 0.7);
}

.qr-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.qr-overlay[data-active="true"] {
  opacity: 1;
  pointer-events: auto;
}

.qr-modal {
  background: var(--surface-color);
  border-radius: 22px;
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--surface-border);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
  display: grid;
  gap: 1.2rem;
  justify-items: center;
  width: min(360px, calc(100vw - 2rem));
  position: relative;
}

.qr-modal button[type="button"] {
  appearance: none;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
}

.qr-modal h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.qr-modal p {
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.qr-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.76);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

:root[data-theme="dark"] .qr-close {
  background: rgba(30, 30, 32, 0.9);
}

.qr-close:hover,
.qr-close:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.18);
}

.qr-image {
  width: min(280px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  border: 1px solid var(--surface-border);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
}

.qr-guidance {
  text-align: center;
  font-size: 1.02rem;
  color: #ff2d55 !important;
  font-weight: 700 !important;
  line-height: 1.55;
  margin: 0;
}

:root[data-theme="dark"] .qr-guidance {
  color: #ff6b9d !important;
}

body.qr-open {
  overflow: hidden;
}

.page-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .theme-toggle {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
  }

  .page-card {
    padding: clamp(2rem, 6vw, 2.5rem);
  }
}

@media (max-width: 560px) {
  main {
    padding: 2rem 1rem 1.5rem;
    min-height: auto;
  }

  .page-card {
    border-radius: 18px;
    box-shadow: 0 16px 28px rgba(31, 41, 55, 0.16);
    max-height: none;
  }

  .lead-paragraph,
  .info-list li {
    font-size: 1rem;
  }

  .primary-button {
    width: 100%;
  }
}

.page-back {
  position: absolute;
  top: clamp(1.2rem, 3vw, 2rem);
  left: clamp(1.2rem, 3vw, 2rem);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] .page-back {
  background: rgba(30, 30, 32, 0.6);
}

.page-back svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: transform 0.3s var(--transition-smooth);
}

.page-back:hover,
.page-back:focus-visible {
  transform: translateX(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  background: var(--surface-color);
  outline: none;
}


.page-back:active {
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(15, 31, 68, 0.18);
}