:root {
  --primary: #967bb6;
  --primary-strong: #8a2be2;
  --secondary: #e6e6fa;
  --secondary-strong: #dcd0ff;
  --surface: #ffffff;
  --surface-soft: #f8f6ff;
  --surface-tint: #f1ecff;
  --text: #2a2438;
  --text-soft: #665f73;
  --line: rgba(138, 43, 226, 0.16);
  --line-strong: rgba(138, 43, 226, 0.28);
  --shadow: 0 18px 50px rgba(71, 45, 104, 0.12);
  --shadow-soft: 0 10px 30px rgba(71, 45, 104, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --line-green: #06c755;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--surface-soft);
}

body {
  min-width: 280px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 2%, rgba(220, 208, 255, 0.78), transparent 30rem),
    radial-gradient(circle at 94% 18%, rgba(230, 230, 250, 0.88), transparent 28rem),
    linear-gradient(180deg, #fff 0, var(--surface-soft) 38rem, #fff 100%);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-strong);
  text-underline-offset: 0.2em;
}

a:hover {
  color: #6419ad;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--primary-strong);
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.top-note {
  padding: 8px 16px;
  color: #4d3b62;
  background: linear-gradient(90deg, var(--secondary), #f5f0ff, var(--secondary-strong));
  border-bottom: 1px solid rgba(150, 123, 182, 0.18);
  font-size: 0.84rem;
  text-align: center;
  letter-spacing: 0.04em;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(138, 43, 226, 0.1);
  box-shadow: 0 8px 30px rgba(59, 37, 80, 0.05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

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

.brand-mark {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  background: linear-gradient(145deg, var(--secondary), #fff);
  border: 1px solid rgba(138, 43, 226, 0.18);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(138, 43, 226, 0.14);
}

.brand-heart,
.brand-heart::before,
.brand-heart::after {
  position: absolute;
  width: 16px;
  height: 24px;
  background: linear-gradient(180deg, var(--primary-strong), var(--primary));
  border-radius: 16px 16px 4px 4px;
  content: "";
}

.brand-heart {
  transform: translate(3px, 0) rotate(45deg);
  transform-origin: 0 100%;
}

.brand-heart::before {
  left: -16px;
  transform: rotate(-90deg);
  transform-origin: 100% 100%;
}

.brand-heart::after {
  display: none;
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 1.04rem;
  letter-spacing: 0.04em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.main-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav > a {
  padding: 10px 11px;
  color: var(--text);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav > a:hover {
  color: var(--primary-strong);
  background: var(--surface-tint);
  transform: translateY(-1px);
}

.main-nav .nav-line,
.line-button,
.mobile-menu-line,
.mobile-line {
  color: #fff;
  background: var(--line-green);
  box-shadow: 0 10px 24px rgba(6, 199, 85, 0.22);
}

.main-nav .nav-line:hover,
.line-button:hover,
.mobile-menu-line:hover,
.mobile-line:hover {
  color: #fff;
  background: #05ae4a;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(6, 199, 85, 0.28);
}

.line-mark {
  display: inline-grid;
  width: 29px;
  height: 25px;
  place-items: center;
  color: var(--line-green);
  background: #fff;
  border-radius: 50%;
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.line-mark span {
  transform: translateY(-0.5px);
}

.mobile-menu {
  position: relative;
  display: none;
}

.mobile-menu summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  color: var(--text);
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

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

.menu-icon {
  display: grid;
  gap: 4px;
}

.menu-icon span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary-strong);
  border-radius: 999px;
}

.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  width: min(82vw, 310px);
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-menu-panel a {
  padding: 11px 13px;
  color: var(--text);
  border-radius: 10px;
  font-weight: 650;
  text-decoration: none;
}

.mobile-menu-panel a:hover {
  color: var(--primary-strong);
  background: var(--surface-tint);
}

.mobile-menu-panel .mobile-menu-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 8px;
  color: #fff;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 44px;
}

.page-hero::before,
.page-hero::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  filter: blur(2px);
}

.page-hero::before {
  top: 16px;
  right: 8%;
  width: 220px;
  height: 220px;
  background: rgba(220, 208, 255, 0.52);
}

.page-hero::after {
  bottom: -80px;
  left: 4%;
  width: 180px;
  height: 180px;
  background: rgba(230, 230, 250, 0.76);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--primary-strong);
  font-weight: 650;
  text-decoration: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  border-radius: 999px;
  content: "";
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.35;
  text-wrap: balance;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.75rem);
  letter-spacing: -0.03em;
}

.hero-summary {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}

.article-shell {
  padding: 0 0 88px;
}

.article-card {
  position: relative;
  padding: clamp(22px, 5vw, 58px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.preservation-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 34px;
  padding: 15px 17px;
  color: #51465d;
  background: linear-gradient(135deg, var(--surface-tint), #fff);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.preservation-note::before {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
  content: "i";
  font-family: Georgia, serif;
  font-weight: 800;
  line-height: 1;
}

.article-content {
  color: #393244;
  overflow-wrap: anywhere;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content > :last-child {
  margin-bottom: 0;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 1.7em 0 0.7em;
  color: #372748;
  line-height: 1.45;
}

.article-content h1 {
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.article-content h2 {
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  font-size: clamp(1.35rem, 3.3vw, 1.8rem);
}

.article-content h3 {
  color: #5c357d;
  font-size: clamp(1.18rem, 3vw, 1.45rem);
}

.article-content p,
.article-content div {
  max-width: 100%;
}

.article-content p {
  margin: 1em 0;
}

.article-content ul,
.article-content ol {
  padding-left: 1.4em;
}

.article-content li + li {
  margin-top: 0.35em;
}

.article-content strong,
.article-content b {
  color: #3f2853;
}

.article-content table {
  width: 100% !important;
  max-width: 100%;
  margin: 22px 0;
  border-spacing: 0;
  border-collapse: separate;
}

.article-content td,
.article-content th {
  width: auto !important;
  height: auto !important;
  padding: 10px;
  vertical-align: top;
}

.article-content img {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 12px auto;
  border-radius: 15px;
  box-shadow: var(--shadow-soft);
}

.legacy-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr));
  gap: 18px;
  margin: 22px 0;
}

.legacy-gallery figure {
  margin: 0;
  padding: 10px;
  background: linear-gradient(180deg, #fff, var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 18px;
}

.legacy-gallery img {
  width: 100%;
  margin: 0;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: none;
}

.legacy-gallery figcaption {
  padding: 9px 4px 2px;
  color: var(--text-soft);
  font-size: 0.86rem;
  text-align: center;
}

.legacy-contact-notice,
.article-cta {
  margin: 34px 0 0;
  padding: 24px;
  background: linear-gradient(135deg, var(--surface-tint), #fff);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
}

.legacy-contact-notice h2,
.article-cta h2 {
  margin-top: 0;
}

.legacy-form-archive {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.legacy-form-archive summary {
  color: var(--primary-strong);
  cursor: pointer;
  font-weight: 750;
}

.legacy-form-archive p {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.line-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.archive-grid {
  display: grid;
  gap: 28px;
}

.archive-group {
  padding: 24px;
  background: linear-gradient(145deg, #fff, var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.archive-group h2 {
  margin-top: 0;
  color: #573175;
  font-size: 1.35rem;
}

.archive-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-list a {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.archive-list a:hover {
  color: var(--primary-strong);
}

.site-footer {
  padding: 36px 0 92px;
  color: #eae3f2;
  background: #2a2438;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.site-footer p {
  margin: 0.2em 0;
}

.site-footer strong {
  color: #fff;
}

.footer-links {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  padding: 6px 9px;
  color: #f4effa;
  border-radius: 8px;
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

.mobile-line {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  display: none;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  padding: 10px 17px;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

@media (max-width: 980px) {
  .main-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .header-inner {
    min-height: 70px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15.5px;
  }

  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .top-note {
    padding-inline: 10px;
    font-size: 0.76rem;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .brand-copy strong {
    font-size: 0.93rem;
  }

  .brand-copy small {
    display: none;
  }

  .page-hero {
    padding: 48px 0 28px;
  }

  .article-shell {
    padding-bottom: 64px;
  }

  .article-card {
    border-radius: 22px;
  }

  .article-content table {
    display: block;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .article-content td,
  .article-content th {
    padding: 7px;
  }

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

  .footer-inner {
    display: grid;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .mobile-line {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
