:root {
  --c-gold: #C9A227;
  --c-red: #B03E2E;
  --c-brown: #3E2723;
  --c-cream: #FAF3E0;
  --c-light-gold: #E6CE8A;
  --c-dark-red: #A03028;
  --c-ivory: #FFF8E7;
  --c-deep-gold: #8B6914;
  --c-charcoal: #2D2A26;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --base-size: 16px;
  --heading-scale: clamp(2.5rem, 6vw, 5rem);
  --container-max: 1240px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-cream);
  color: var(--c-charcoal);
  font-family: var(--font-body);
  font-size: var(--base-size);
  line-height: 1.75;
  text-rendering: optimizeSpeed;
}

main {
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  color: var(--c-brown);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
}

h1 {
  font-size: var(--heading-scale);
  line-height: 1.12;
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--c-deep-gold);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--c-red);
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(201, 162, 39, 0.25);
}

:focus-visible {
  outline: 3px solid var(--c-red);
  outline-offset: 3px;
}

.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

.container--narrow {
  max-width: 800px;
}

.container--wide {
  max-width: 1400px;
}

.site-main {
  display: block;
  min-height: 76vh;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 120;
  background: var(--c-red);
  color: var(--c-ivory);
  padding: 0.6rem 1rem;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 243, 224, 0.98);
  border-bottom: 1px solid var(--c-light-gold);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header[data-scrolled] {
  background: var(--c-ivory);
  box-shadow: 0 10px 30px rgba(62, 39, 35, 0.08);
}

.header-topbar {
  max-height: 38px;
  overflow: hidden;
  background: var(--c-brown);
  color: rgba(250, 243, 224, 0.78);
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.site-header[data-scrolled] .header-topbar {
  max-height: 0;
  opacity: 0;
}

.header-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 38px;
  font-size: 0.78rem;
}

.header-topbar-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: 0.02em;
}

.header-topbar-contact a {
  color: var(--c-light-gold);
  text-decoration: none;
  font-weight: 600;
}

.header-topbar-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--c-light-gold);
  letter-spacing: 0.08em;
}

.topbar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
}

.header-topbar-sync {
  color: var(--c-ivory);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  padding-bottom: 0.12rem;
  border-bottom: 1px solid var(--c-gold);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.header-topbar-sync:hover {
  color: var(--c-light-gold);
  border-color: var(--c-red);
}

.header-main {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 78px;
  transition: min-height 0.3s ease;
}

.site-header[data-scrolled] .header-main {
  min-height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-right: auto;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--c-ivory), var(--c-gold) 68%);
  color: var(--c-brown);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 0 0 2px var(--c-ivory), 0 0 0 4px rgba(201, 162, 39, 0.4), 0 5px 14px rgba(139, 105, 20, 0.24);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(62, 39, 35, 0.5);
  border-radius: 50%;
}

.brand-logotype {
  display: grid;
  gap: 0.1rem;
}

.brand-cn {
  display: block;
  color: var(--c-brown);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.08em;
}

.brand-en {
  display: block;
  color: var(--c-deep-gold);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.58rem;
  line-height: 1;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.site-nav {
  display: block;
  margin-inline: 1.25rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 0.8rem 0.68rem;
  color: var(--c-brown);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.68rem;
  right: 0.68rem;
  bottom: 0.5rem;
  height: 2px;
  background: var(--c-red);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.25s ease;
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

.nav-link[aria-current="page"] {
  color: var(--c-red);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0.5rem 1rem;
  background: var(--c-red);
  color: var(--c-ivory);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(176, 62, 46, 0.22);
  transition: background 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.nav-cta:hover {
  background: var(--c-dark-red);
  color: var(--c-ivory);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(176, 62, 46, 0.28);
}

.nav-toggle {
  display: none;
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--c-gold), var(--c-red));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.site-footer {
  background: var(--c-brown);
  color: rgba(250, 243, 224, 0.82);
  font-size: 0.95rem;
}

.footer-cordon {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--c-gold) 0 25%, var(--c-red) 25% 50%, var(--c-gold) 50% 75%, var(--c-red) 75% 100%);
}

.site-footer a {
  color: var(--c-light-gold);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--c-ivory);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr 1fr 1.5fr;
  gap: 2.8rem;
  padding-block: 3.5rem 2.75rem;
}

.footer-brand {
  min-width: 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  color: var(--c-ivory);
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer-logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-gold);
  color: var(--c-brown);
  font-family: var(--font-display);
  font-weight: 700;
}

.footer-logo-text {
  line-height: 1;
}

.footer-trust {
  max-width: 44ch;
  margin: 0;
  color: rgba(250, 243, 224, 0.78);
  font-size: 0.9rem;
  line-height: 1.9;
}

.footer-update {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.1rem 0 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: var(--c-light-gold);
  font-size: 0.78rem;
}

.footer-update::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-red);
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  margin: 0 0 0.9rem;
  color: var(--c-gold);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 0.5rem;
}

.footer-links a {
  position: relative;
  display: inline-block;
  padding-left: 0.4rem;
  color: rgba(250, 243, 224, 0.82);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--c-ivory);
  transform: translateX(0.15rem);
}

.footer-links a::before {
  content: "—";
  margin-right: 0.3rem;
  color: var(--c-gold);
}

.footer-contact {
  font-size: 0.9rem;
}

.footer-contact p {
  margin: 0 0 0.65rem;
}

.footer-phone {
  color: var(--c-ivory);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.footer-email {
  color: var(--c-light-gold);
  font-weight: 600;
}

.footer-address {
  max-width: 30ch;
  color: rgba(250, 243, 224, 0.78);
}

.footer-service-note {
  max-width: 40ch;
  color: rgba(250, 243, 224, 0.62);
  font-size: 0.76rem;
  line-height: 1.7;
}

.footer-bottom {
  background: rgba(0, 0, 0, 0.12);
  border-top: 1px solid rgba(201, 162, 39, 0.3);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 60px;
  font-size: 0.82rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-beian {
  color: rgba(250, 243, 224, 0.7);
}

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--c-light-gold);
  border-radius: 50%;
  background: var(--c-brown);
  color: var(--c-ivory);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
}

.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--c-red);
  border-color: var(--c-red);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.section--cream {
  background: var(--c-cream);
}

.section--ivory {
  background: var(--c-ivory);
}

.section--gold {
  background: var(--c-gold);
  color: var(--c-brown);
}

.section--red {
  background: var(--c-red);
  color: var(--c-ivory);
}

.section--dark {
  background: var(--c-brown);
  color: var(--c-cream);
}

.section--dark .display-title {
  color: var(--c-ivory);
}

.gold-grid {
  background-image: linear-gradient(rgba(201, 162, 39, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(201, 162, 39, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

.display-title {
  margin: 0 0 0.3em;
  color: var(--c-brown);
  font-family: var(--font-display);
  font-size: var(--heading-scale);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.01em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.8rem;
  color: var(--c-deep-gold);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--c-red);
}

.section--gold .eyebrow,
.section--red .eyebrow {
  color: var(--c-brown);
}

.lede {
  color: var(--c-brown);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.8;
}

.section--dark .lede {
  color: var(--c-cream);
}

.body-prose {
  max-width: 68ch;
}

.chapter-number {
  display: block;
  color: rgba(201, 162, 39, 0.28);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.8rem 0;
  list-style: none;
  font-size: 0.88rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 0.35rem;
  color: var(--c-light-gold);
}

.breadcrumb-link {
  color: var(--c-deep-gold);
  text-decoration: none;
}

.breadcrumb-current {
  color: var(--c-brown);
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--c-gold);
  background: transparent;
  color: var(--c-brown);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

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

.button--primary {
  background: var(--c-red);
  border-color: var(--c-red);
  color: var(--c-ivory);
  box-shadow: 0 8px 18px rgba(176, 62, 46, 0.22);
}

.button--primary:hover {
  background: var(--c-dark-red);
  border-color: var(--c-dark-red);
  box-shadow: 0 12px 24px rgba(176, 62, 46, 0.28);
}

.button--gold {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: var(--c-brown);
  box-shadow: 0 8px 16px rgba(201, 162, 39, 0.22);
}

.button--ghost {
  background: var(--c-ivory);
  border-color: var(--c-light-gold);
  color: var(--c-deep-gold);
}

.card {
  position: relative;
  padding: 1.75rem;
  background: var(--c-ivory);
  border: 1px solid var(--c-light-gold);
}

.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 56px;
  height: 4px;
  background: var(--c-red);
}

.card--gold::before {
  background: var(--c-gold);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card-title {
  margin: 0 0 0.5rem;
  color: var(--c-brown);
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.card-text {
  font-size: 0.94rem;
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 1.6rem;
  border-left: 1px solid var(--c-light-gold);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: -6px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--c-gold);
  border-radius: 50%;
  background: var(--c-ivory);
}

.timeline-date {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--c-deep-gold);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.faq-panel {
  border-bottom: 1px solid var(--c-light-gold);
}

.faq-panel summary {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 0;
  cursor: pointer;
  color: var(--c-brown);
  font-family: var(--font-display);
  font-weight: 700;
  list-style: none;
}

.faq-panel summary::-webkit-details-marker {
  display: none;
}

.faq-panel summary::before {
  content: "Q";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.7em;
  height: 1.7em;
  background: var(--c-gold);
  color: var(--c-brown);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
}

.faq-panel-body {
  padding: 0 0 1.25rem 2.4rem;
}

.toc {
  position: sticky;
  top: 130px;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--c-light-gold);
  list-style: none;
}

.toc-link {
  display: block;
  margin-left: -1px;
  padding: 0.4rem 0.85rem;
  border-left: 2px solid transparent;
  color: var(--c-deep-gold);
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
}

.toc-link:hover {
  border-left-color: var(--c-light-gold);
  color: var(--c-red);
}

.toc-link[data-active] {
  border-left-color: var(--c-red);
  background: linear-gradient(90deg, rgba(176, 62, 46, 0.08), transparent);
  color: var(--c-red);
  font-weight: 600;
}

.media-frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--c-ivory);
  border: 1px solid var(--c-light-gold);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(201, 162, 39, 0.25);
  pointer-events: none;
}

.media-frame--wide {
  aspect-ratio: 16 / 9;
}

.media-frame--tall {
  aspect-ratio: 3 / 4;
}

.media-frame--gold {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.08);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.media-frame:hover img {
  transform: scale(1.02);
}

.coin-charm {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-gold);
}

.coin-charm::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(62, 39, 35, 0.55);
  border-radius: 50%;
}

.coin-charm::after {
  content: "財";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--c-brown);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.coin-charm--float {
  animation: coinFloat 5s ease-in-out infinite;
}

@keyframes coinFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.nav-toggle {
  position: relative;
  flex-direction: column;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0.6rem 0.68rem;
  border: 1px solid var(--c-light-gold);
  background: var(--c-ivory);
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  margin-block: 3px;
  background: var(--c-brown);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

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

@media (max-width: 960px) {
  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    margin-inline: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    background: var(--c-ivory);
    border-bottom: 1px solid var(--c-light-gold);
    box-shadow: 0 20px 32px rgba(62, 39, 35, 0.1);
    transition: max-height 0.3s ease, opacity 0.25s ease, visibility 0.3s ease;
  }

  .site-nav[data-open] {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    display: grid;
    gap: 0;
  }

  .nav-link {
    padding: 0.9rem 1.4rem;
    border-bottom: 1px solid rgba(230, 206, 138, 0.35);
  }

  .nav-link::after {
    display: none;
  }

  .nav-link[aria-current="page"] {
    background: rgba(176, 62, 46, 0.08);
    color: var(--c-red);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .header-topbar-note {
    display: none;
  }

  .header-topbar-inner {
    min-height: 34px;
  }

  .brand-cn {
    font-size: 1.25rem;
  }

  .brand-en {
    display: none;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding-block: 2.5rem;
  }

  .footer-brand,
  .footer-contact {
    grid-column: auto;
  }

  .footer-bottom-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-block: 0.8rem;
  }

  .to-top {
    right: 0.9rem;
    bottom: 0.9rem;
    width: 42px;
    height: 42px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
