/* Prefer OS CJK fonts — no Google Fonts network requests */
:root {
  --font-sans: "PingFang TC", "Hiragino Sans GB", "Microsoft JhengHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}
html {
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body {
  font-family: inherit;
  overflow-x: clip;
}
img, iframe {
  max-width: 100%;
}

/* Contained horizontal carousels — no page-level white bleed */
.h-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.h-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.white-shadow {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.white-shadow-hover:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
@media (hover: none) {
  .white-shadow-hover:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transform: none;
  }
}
/* Mobile timeline dot offset for tighter padding */
@media (max-width: 639px) {
  .event-item .timeline-dot {
    left: -23px;
    width: 12px;
    height: 12px;
    border-width: 3px;
  }
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.animate-marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 35s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .animate-marquee { animation: none; }
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #F3F4F6; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#timelineContainer.cards-mode .timeline-dot {
  display: none;
}
