:root {
  --ink: #17231c;
  --muted: #68726b;
  --cream: #f7f5ed;
  --paper: #fffef9;
  --sage: #dfe9df;
  --forest: #214d36;
  --line: #d9ddd6;
  --orange: #e97643;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; border-bottom: 1px solid rgba(23,35,28,.12); background: rgba(247,245,237,.9); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; font-family: Georgia, "Songti SC", serif; font-size: 19px; font-weight: 700; letter-spacing: .08em; }
.brand-seal { width: 34px; height: 34px; display: grid; place-items: center; background: var(--forest); color: white; border-radius: 2px 10px 2px 10px; font-weight: 400; }
.brand-copy { display: flex; flex-direction: column; gap: 2px; line-height: 1.05; }
.brand-copy strong { font: inherit; white-space: nowrap; }
.brand-copy small { font-family: Arial, sans-serif; font-size: 9px; font-weight: 700; letter-spacing: .26em; color: var(--orange); }
.header-controls { display: flex; align-items: center; gap: 24px; }
nav { display: flex; align-items: center; gap: 36px; font-size: 14px; }
nav a { color: #465149; transition: color .2s; }
nav a:hover { color: var(--forest); }
.bili-nav { border: 1px solid var(--ink); padding: 10px 16px; border-radius: 999px; }
.language-toggle { display: flex; align-items: center; gap: 5px; border-left: 1px solid #c9cec9; padding-left: 20px; color: #a0a7a1; font-size: 11px; }
.language-toggle button { border: 0; background: transparent; color: #929a94; padding: 7px 3px; cursor: pointer; font-size: 11px; font-weight: 700; }
.language-toggle button.active { color: var(--forest); }
.language-toggle button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 2px; }

.hero { min-height: 650px; padding: 88px 8vw 86px; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 7vw; overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 34vw; height: 34vw; right: -12vw; top: -12vw; border: 1px solid rgba(33,77,54,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(33,77,54,.025), 0 0 0 140px rgba(33,77,54,.018); }
.eyebrow { font-size: 11px; letter-spacing: .22em; color: var(--forest); font-weight: 700; display: flex; align-items: center; gap: 12px; }
.eyebrow span { display: block; width: 34px; height: 1px; background: var(--forest); }
h1 { margin: 25px 0 24px; font-family: Georgia, "Songti SC", serif; font-size: clamp(48px, 5.6vw, 78px); line-height: 1.14; letter-spacing: -.055em; font-weight: 500; }
h1 em { color: var(--forest); font-weight: 500; }
.hero-copy > p { max-width: 590px; color: var(--muted); font-size: 17px; line-height: 1.9; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px 34px; margin-top: 38px; }
.primary-action { background: var(--forest); color: #fff; border-radius: 3px; padding: 17px 24px; display: flex; align-items: center; gap: 38px; font-size: 14px; box-shadow: 0 12px 30px rgba(33,77,54,.16); transition: transform .2s, box-shadow .2s; }
.primary-action:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(33,77,54,.22); }
.text-action { font-size: 14px; border-bottom: 1px solid #aab1ab; padding: 10px 0; }
.text-action span { color: var(--orange); margin-left: 8px; }

.hero-art { min-height: 450px; position: relative; display: grid; place-items: center; }
.hero-art::after { content: ""; position: absolute; inset: 14% 7% 6% 15%; border-radius: 50%; background: #dce7dd; filter: blur(.2px); }
.paper { position: absolute; width: min(310px, 72vw); height: 400px; background: var(--paper); z-index: 2; box-shadow: 0 24px 65px rgba(37,52,42,.16); border: 1px solid rgba(33,77,54,.08); }
.paper-back { transform: rotate(10deg) translate(18px, -2px); background: #bdcdbd; padding: 25px; color: rgba(33,77,54,.5); font-size: 10px; letter-spacing: .2em; }
.paper-front { transform: rotate(-4deg); padding: 34px; }
.paper-top { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .22em; color: #7d887f; }
.paper-word { font-family: Georgia, serif; font-size: 55px; margin-top: 88px; letter-spacing: -.04em; }
.phonetic { color: var(--orange); font-family: Georgia, serif; font-style: italic; margin-top: 5px; }
.rule { width: 34px; height: 2px; background: var(--forest); margin: 23px 0 16px; }
.paper-front p { line-height: 1.6; color: #657067; font-family: Georgia, serif; }
.paper-stamp { position: absolute; bottom: 28px; right: 28px; border: 1px solid #be6f50; color: #be6f50; width: 48px; height: 48px; display: grid; place-items: center; text-align: center; font-family: "Songti SC", serif; font-size: 11px; line-height: 1.25; transform: rotate(6deg); }
.orbit { position: absolute; z-index: 3; background: #fff; border-radius: 999px; padding: 9px 14px; box-shadow: 0 9px 25px rgba(39,52,43,.12); font-size: 9px; letter-spacing: .12em; font-weight: 700; color: var(--forest); }
.orbit-one { left: 4%; top: 21%; transform: rotate(-8deg); }
.orbit-two { right: 2%; bottom: 18%; transform: rotate(7deg); }

.library { background: var(--paper); padding: 95px 8vw 110px; border-top: 1px solid var(--line); }
.section-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-index { font-size: 10px; letter-spacing: .2em; color: var(--orange); font-weight: 700; }
h2 { margin: 14px 0 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(34px, 4vw, 52px); font-weight: 500; letter-spacing: -.035em; }
.search-box { width: min(310px, 100%); height: 48px; border-bottom: 1px solid #9aa39c; display: flex; align-items: center; gap: 12px; }
.search-box span { font-family: serif; font-size: 24px; color: var(--forest); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: #9ba29d; }
.category-tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 54px; }
.category-tabs button { border: 0; border-right: 1px solid var(--line); background: transparent; padding: 18px 14px 17px; color: #7b837e; cursor: pointer; font-family: Georgia, "Songti SC", serif; font-size: 16px; transition: background .2s, color .2s; }
.category-tabs button:last-child { border-right: 0; }
.category-tabs button small { display: block; font-family: Arial, sans-serif; font-size: 8px; letter-spacing: .16em; margin-bottom: 7px; opacity: .75; }
.category-tabs button:hover { background: #f5f5ee; color: var(--forest); }
.category-tabs button.active { background: var(--forest); color: #fff; }
.results-meta { margin: 38px 0 22px; display: flex; align-items: center; gap: 13px; color: #879089; font-size: 11px; letter-spacing: .08em; }
.meta-line { width: 30px; height: 1px; background: #cfd3ce; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.resource-card { padding: 30px; background: #fbfaf5; border: 1px solid #e2e2da; min-height: 275px; display: flex; flex-direction: column; animation: card-in .5s both; animation-delay: var(--delay); transition: transform .2s, border-color .2s, box-shadow .2s; }
.resource-card:hover { transform: translateY(-3px); border-color: #b9c7bc; box-shadow: 0 16px 40px rgba(37,52,42,.08); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.resource-heading { display: flex; justify-content: space-between; gap: 20px; }
.resource-type { color: var(--orange); font-size: 10px; letter-spacing: .16em; font-weight: 700; }
.resource-heading h3 { font-family: Georgia, "Songti SC", serif; margin: 9px 0 0; font-size: 23px; font-weight: 500; line-height: 1.4; }
.resource-number { font-family: Georgia, serif; color: #c9cdc8; font-size: 23px; font-style: italic; }
.resource-card > p { color: var(--muted); font-size: 13px; line-height: 1.75; margin: 15px 0 24px; }
.resource-links { margin-top: auto; display: flex; flex-direction: column; gap: 9px; }
.link-row { display: flex; gap: 8px; min-width: 0; }
.disk-link { flex: 1; min-width: 0; border: 1px solid #d7dcd7; background: white; display: flex; align-items: center; gap: 11px; padding: 10px 12px; font-size: 12px; transition: border-color .2s, background .2s; }
.disk-link:hover { border-color: #8da18f; background: #f9fbf8; }
.disk-mark { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: #ecf3ed; color: var(--forest); font-family: "Songti SC", serif; }
.disk-link.baidu .disk-mark { background: #edf1ff; color: #315bca; }
.disk-link small { display: block; color: #979e98; font-size: 9px; margin-bottom: 2px; }
.arrow { margin-left: auto; color: var(--orange); }
.copy-button { flex: 0 0 86px; border: 1px dashed #bdc5be; color: #667069; background: transparent; cursor: pointer; font-size: 10px; padding: 0 8px; }
.copy-button:hover { background: var(--sage); color: var(--forest); }
.empty-state { text-align: center; padding: 85px 20px; border: 1px dashed #ced5ce; background: #fafaf5; }
.empty-state > span { color: var(--orange); letter-spacing: .2em; font-size: 9px; }
.empty-state h3 { font-family: Georgia, "Songti SC", serif; font-size: 28px; font-weight: 500; margin: 16px 0 10px; }
.empty-state p { color: var(--muted); font-size: 13px; }

.about { padding: 100px 8vw; background: #e5ece3; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 10vw; margin-top: 18px; }
.about-grid h2 { line-height: 1.35; }
.about-copy { padding-top: 10px; }
.about-copy p { color: #59645c; line-height: 1.85; font-size: 14px; margin: 0 0 14px; }
.about-copy strong { color: var(--forest); }
.about-copy a { display: inline-flex; gap: 50px; border-bottom: 1px solid var(--forest); padding: 12px 0 8px; margin-top: 12px; color: var(--forest); font-size: 13px; }
.about-copy a span { color: var(--orange); }
footer { min-height: 125px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 28px 5vw; background: var(--ink); color: #eef1ec; }
footer p { text-align: center; font-family: Georgia, serif; font-style: italic; color: #aeb8b0; }
footer > span { text-align: right; color: #7f8e83; font-size: 9px; letter-spacing: .12em; }

@media (max-width: 800px) {
  .site-header { padding: 0 20px; }
  nav { display: none; }
  .header-controls { gap: 0; }
  .language-toggle { border-left: 0; padding-left: 0; }
  .hero { grid-template-columns: 1fr; padding: 65px 24px 70px; }
  .hero-art { min-height: 390px; margin-top: 10px; }
  .paper { width: 250px; height: 340px; }
  .paper-front { padding: 27px; }
  .paper-word { font-size: 46px; margin-top: 68px; }
  .library, .about { padding: 72px 22px 82px; }
  .section-intro { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .category-tabs { grid-template-columns: repeat(2, 1fr); }
  .category-tabs button { border-bottom: 1px solid var(--line); }
  .category-tabs button:last-child { grid-column: span 2; }
  .resource-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  footer { grid-template-columns: 1fr; gap: 18px; text-align: center; padding: 42px 20px; }
  footer .brand { justify-content: center; }
  footer p, footer > span { text-align: center; margin: 0; }
}

@media (max-width: 460px) {
  .brand { font-size: 16px; }
  .brand-copy small { font-size: 8px; }
  h1 { font-size: 43px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 12px; }
  .primary-action { justify-content: space-between; }
  .text-action { text-align: center; }
  .resource-card { padding: 23px; }
  .link-row { flex-direction: column; }
  .copy-button { min-height: 35px; flex-basis: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
