:root {
  --ink: #2a2422;
  --muted: #6b5f5b;
  --paper: #fbfaf6;
  --panel: #f2eee7;
  --line: #e0d6c9;
  --primary: #8b1428;
  --primary-dark: #5c0c19;
  --gold: #ad8242;
  --white: #fff;
  --shadow: 0 18px 50px rgba(75, 43, 31, .11);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.reading-progress { position: fixed; inset: 0 0 auto; z-index: 100; height: 4px; pointer-events: none; }
.reading-progress span { display: block; width: 0; height: 100%; background: var(--gold); }
.top-strip { background: var(--primary-dark); color: var(--white); font-size: .9rem; }
.top-strip .container { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.top-strip a { font-weight: 800; }
.blog-language-switcher { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.blog-language-switcher a { padding: 3px 1px; color: rgba(255, 255, 255, .76); }
.blog-language-switcher a:hover, .blog-language-switcher a:focus-visible, .blog-language-switcher a.active { color: var(--white); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(224, 214, 201, .75); background: rgba(251, 250, 246, .95); backdrop-filter: blur(14px); }
.nav { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { min-width: 255px; display: flex; align-items: center; gap: 13px; color: var(--primary); font-weight: 900; line-height: 1.2; }
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: .75rem; }
.nav-links { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: .93rem; font-weight: 800; white-space: nowrap; }
.nav-links a { position: relative; padding: 10px 0; }
.nav-links a::after { position: absolute; right: 0; bottom: 3px; left: 0; height: 2px; content: ""; background: var(--gold); transform: scaleX(0); transform-origin: center; transition: transform .2s ease; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a.active { color: var(--gold); }
.nav-links a:hover::after, .nav-links a:focus-visible::after, .nav-links a.active::after { transform: scaleX(1); }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 11px 20px; border: 1px solid var(--primary); border-radius: var(--radius); background: var(--primary); color: var(--white); font-weight: 900; letter-spacing: .04em; text-transform: uppercase; transition: background .2s ease, transform .2s ease; }
.button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.button--small { min-height: 40px; padding: 8px 14px; font-size: .82rem; }
.eyebrow { margin: 0; color: var(--gold); font-size: .76rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.12; letter-spacing: 0; }
:lang(zh-CN) h1, :lang(zh-CN) h2, :lang(zh-CN) h3 { font-family: "Songti SC", "STSong", Georgia, serif; }
:lang(ko-KR) h1, :lang(ko-KR) h2, :lang(ko-KR) h3 { font-family: "Apple SD Gothic Neo", "Noto Serif KR", Georgia, serif; }
h1 { margin: 14px 0 20px; color: var(--primary); font-size: clamp(2.5rem, 5vw, 4.7rem); }
h2 { color: var(--primary); }
.intro { max-width: 800px; color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.2rem); }
.blog-hero { padding: 64px 0 50px; background: var(--panel); }
.blog-hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); align-items: center; gap: 54px; }
.blog-hero-grid img { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }
.blog-tools { padding-top: 42px; }
.search-box { display: flex; max-width: 720px; min-height: 54px; align-items: center; gap: 12px; padding: 0 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 26px rgba(75, 43, 31, .06); }
.search-box:focus-within { border-color: var(--gold); outline: 3px solid rgba(173, 130, 66, .14); }
.search-box svg { width: 22px; fill: none; stroke: var(--primary); stroke-linecap: round; stroke-width: 2; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.category-filters { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.filter-button { min-height: 40px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--muted); cursor: pointer; font-weight: 800; }
.filter-button:hover, .filter-button:focus-visible, .filter-button.active { border-color: var(--primary); background: var(--primary); color: var(--white); }
.result-count { margin: 18px 0 0; color: var(--muted); font-size: .9rem; }
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 28px 0 84px; }
.post-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 30px rgba(75, 43, 31, .06); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card[hidden] { display: none; }
.post-image { display: block; overflow: hidden; background: var(--panel); }
.post-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-image img { transform: scale(1.025); }
.post-content { display: flex; min-height: 280px; flex-direction: column; padding: 24px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; color: var(--gold); font-size: .76rem; font-weight: 800; }
.post-meta > * + *::before { margin-right: 10px; color: var(--line); content: "•"; }
.post-card h2 { margin: 15px 0 12px; font-size: 1.48rem; }
.post-card h2 a:hover { color: var(--primary); }
.post-card p { margin: 0 0 18px; color: var(--muted); }
.read-link { margin-top: auto; color: var(--primary); font-weight: 900; }
.empty-state { padding: 60px 0 100px; text-align: center; }
.empty-state h2 { font-size: 2rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; color: var(--muted); font-size: .88rem; }
.breadcrumbs a { color: var(--primary); font-weight: 800; }
.article-hero { padding: 48px 0 54px; background: var(--panel); }
.article-hero-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); align-items: center; gap: 52px; }
.article-hero h1 { font-size: clamp(2.45rem, 4.4vw, 4.35rem); }
.featured-image { margin: 0; }
.featured-image img { width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }
.featured-image figcaption { margin-top: 8px; color: var(--muted); font-size: .78rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 26px; color: var(--muted); font-size: .84rem; font-weight: 700; }
.article-meta > * + *::before { margin-right: 16px; color: var(--gold); content: "•"; }
.article-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 48px; padding: 58px 0 90px; }
.article-sidebar { position: sticky; top: 112px; align-self: start; }
.side-card { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.side-card h2 { margin: 0 0 15px; font-size: 1.25rem; }
.toc-card nav { max-height: calc(100vh - 270px); overflow: auto; }
.toc-card a { display: block; padding: 7px 0 7px 12px; border-left: 2px solid var(--line); color: var(--muted); font-size: .86rem; line-height: 1.35; }
.toc-card a:hover, .toc-card a.active { border-left-color: var(--gold); color: var(--primary); }
.side-card a:not(.button) { color: var(--primary); font-weight: 800; }
.article-main { min-width: 0; }
.article-card { padding: clamp(28px, 5vw, 54px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 34px rgba(75, 43, 31, .06); }
.article-card > :first-child { margin-top: 0; }
.article-card p, .article-card li { color: #4f4541; font-size: 1.04rem; }
.article-card p { margin: 0 0 1.28em; }
.article-card h2 { scroll-margin-top: 118px; margin: 2em 0 .65em; font-size: clamp(1.65rem, 3vw, 2.25rem); }
.article-card h3 { margin: 1.6em 0 .45em; color: var(--ink); font-size: 1.3rem; }
.article-card a { color: var(--primary); font-weight: 800; text-decoration: underline; text-decoration-color: rgba(139, 20, 40, .3); text-underline-offset: 3px; }
.note { margin: 28px 0; padding: 18px 20px; border-left: 4px solid var(--gold); border-radius: var(--radius); background: #fff8ec; color: var(--muted); }
.faq-item { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.share-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 26px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.share-panel h2 { margin: 0; font-size: 1.3rem; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share-button { min-height: 38px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--primary); cursor: pointer; font-size: .82rem; font-weight: 900; }
.share-button:hover { border-color: var(--primary); }
.article-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.article-pagination a { display: flex; min-height: 120px; flex-direction: column; justify-content: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.article-pagination a:hover { border-color: var(--gold); }
.article-pagination a.next { text-align: right; }
.article-pagination span { color: var(--gold); font-size: .78rem; font-weight: 900; text-transform: uppercase; }
.article-pagination strong { margin-top: 6px; font-family: Georgia, "Times New Roman", serif; line-height: 1.25; }
.related-section { margin-top: 58px; }
.related-section > h2 { margin: 9px 0 24px; font-size: 2.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card--compact .post-content { min-height: 220px; padding: 18px; }
.post-card--compact .post-meta { font-size: .68rem; }
.post-card--compact .post-meta span:last-child { display: none; }
.post-card--compact h2 { font-size: 1.14rem; }
.post-card--compact p { display: none; }
.not-found { min-height: 62vh; padding: 90px 0; }
.not-found h1 { max-width: 760px; }
.footer { padding: 42px 0; background: #292622; color: rgba(255, 255, 255, .78); }
.footer .container { display: flex; justify-content: space-between; gap: 24px; }
.footer p { margin: 0; }
.footer a { color: var(--white); font-weight: 800; }

@media (max-width: 1050px) {
  .nav-links { gap: 15px; font-size: .86rem; }
  .nav-cta { display: none; }
  .article-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 30px; }
}

@media (max-width: 850px) {
  .top-strip .container { min-height: 44px; }
  .nav { min-height: 72px; }
  .nav-links { display: none; }
  .brand { min-width: 0; }
  .blog-hero-grid, .article-hero-grid, .article-layout { grid-template-columns: 1fr; }
  .blog-hero-grid, .article-hero-grid { gap: 32px; }
  .article-sidebar { position: static; order: 2; }
  .toc-card nav { max-height: none; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { width: min(100% - 28px, 1180px); }
  .top-strip .container { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 6px 0; }
  .top-strip .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .brand { font-size: .87rem; }
  .brand img { width: 42px; height: 42px; }
  .brand small { font-size: .66rem; }
  .blog-hero, .article-hero { padding: 38px 0; }
  .blog-hero-grid { grid-template-columns: 1fr; }
  .blog-hero-grid img { aspect-ratio: 4 / 3; }
  .blog-grid { grid-template-columns: 1fr; gap: 18px; padding-bottom: 60px; }
  .post-content { min-height: 0; }
  .article-card { padding: 25px 20px; }
  .article-card p, .article-card li { font-size: 1rem; }
  .article-meta > * + *::before, .post-meta > * + *::before { display: none; }
  .share-panel { align-items: flex-start; flex-direction: column; }
  .article-pagination { grid-template-columns: 1fr; }
  .article-pagination > span:empty { display: none; }
  .footer .container { flex-direction: column; }
}

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