:root {
  --bg: #f7f1e8;
  --paper: #fffaf4;
  --ink: #241d18;
  --muted: #7a6c60;
  --line: #e7d9ca;
  --accent: #9b3f2f;
  --accent-dark: #6f2a20;
  --nav: #211814;
  --shadow: 0 18px 46px rgba(58, 39, 24, .08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(circle at 50% 0%, rgba(194, 139, 69, .14), transparent 34%),
    linear-gradient(180deg, #fbf7f0 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

.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;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
}

.site-header {
  background: rgba(255, 252, 247, .96);
  border-bottom: 1px solid rgba(231, 217, 202, .8);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 68px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #33241c, var(--accent-dark));
  color: #fff7ea;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(46, 31, 22, .18);
}

.brand-text {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 16px;
  white-space: nowrap;
}

.brand-text small {
  margin-top: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.header-link {
  min-width: 122px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid #e3d5c7;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255, 255, 255, .9);
  color: #8b7c70;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mobile-subnav {
  padding: 0 16px 12px;
}

.mobile-subnav-track {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mobile-subnav-track::-webkit-scrollbar {
  display: none;
}

.mobile-subnav-track a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #eadbc9;
  background: #fff4e9;
  color: #5a4a40;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.mobile-subnav-track a.active {
  border-color: #2a1d16;
  background: #2a1d16;
  color: #fff4e9;
}

.mobile-subnav-track a:hover {
  border-color: #4a2b20;
  background: #4a2b20;
  color: #fff8ec;
}

.page {
  padding: 16px 16px 36px;
}

.mobile-detail {
  display: grid;
  gap: 16px;
}

.mobile-category {
  display: grid;
  gap: 16px;
}

.card {
  background: rgba(255, 250, 244, .94);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  overflow: hidden;
}

.hero-top {
  padding: 14px 14px 2px;
  background:
    radial-gradient(circle at 92% 12%, rgba(194, 139, 69, .16), transparent 30%),
    linear-gradient(135deg, #fffdf9 0%, #fbf1e3 100%);
}

.hero-main {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.cover-wrap {
  width: 108px;
  height: 108px;
  border-radius: 24px;
  background: #fff7eb;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cover-wrap img {
  width: 98px;
  height: 98px;
  object-fit: contain;
}

.hero-copy {
  min-width: 0;
  padding-top: 6px;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: -.04em;
  white-space: normal;
}

.hero-copy h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary {
  margin: 6px 0 0;
  color: #4f443c;
  font-size: 16px;
  line-height: 1.75;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tags a {
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid #eadbc9;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: var(--paper);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.tags a:hover {
  border-color: rgba(155, 63, 47, .35);
  background: #fff3e4;
  color: var(--accent);
  transform: translateY(-1px);
}

.info-strip {
  padding: 0 18px 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-grid div {
  min-width: 0;
  padding: 12px 12px 10px;
  border: 1px solid #eadfd1;
  border-radius: 16px;
  background: rgba(255, 255, 255, .56);
}

.info-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.info-grid dd {
  margin: 6px 0 0;
  color: #221a15;
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download {
  margin-top: 14px;
  min-height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff9f2;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 16px 28px rgba(155, 63, 47, .2);
}

.content-card {
  overflow: hidden;
}

.section-block + .section-block {
  border-top: 1px solid var(--line);
}

.resource-content {
  counter-reset: section;
}

.resource-content h2 {
  counter-increment: section;
  margin: 0;
  padding: 20px 18px 8px;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: start;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.resource-content h2::before {
  content: counter(section, decimal-leading-zero);
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

.resource-content p {
  margin: 0;
  padding: 0 18px 20px 86px;
  color: #4f463f;
  font-size: 14px;
}

.card-title {
  margin: 0;
  padding: 18px 18px 0;
  color: #241b16;
  font-size: 20px;
  line-height: 1.25;
}

.card-body {
  padding: 16px 18px 18px;
}

.recommend-grid {
  display: grid;
  gap: 12px;
}

.rec-item {
  padding: 14px;
  border: 1px solid #eadfd1;
  border-radius: 18px;
  background: rgba(255, 255, 255, .54);
  display: grid;
  gap: 8px;
}

.rec-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.rec-no {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.rec-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 800;
  transition: color .2s ease;
}

.rec-name:hover {
  color: var(--accent);
}

.rec-tags {
  margin-left: 38px;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rec-tags a {
  display: inline-flex;
  vertical-align: top;
  margin-right: 8px;
  padding: 4px 8px;
  border: 1px solid #eadfd1;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.rec-tags a:last-child {
  margin-right: 0;
}

.site-footer {
  padding: 22px 16px 28px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.site-footer p {
  margin: 10px 0 0;
}

.breadcrumb {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb a {
  color: #5b4b41;
}

.category-hero {
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at 92% 12%, rgba(194, 139, 69, .16), transparent 30%),
    linear-gradient(135deg, #fffdf9 0%, #fbf1e3 100%);
}

.category-hero h1 {
  font-size: 30px;
}

.category-hero p {
  margin: 12px 0 0;
  color: #4f443c;
  font-size: 15px;
}

.category-filter-card {
  padding: 14px 18px;
}

.category-filter {
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-filter::-webkit-scrollbar {
  display: none;
}

.category-filter a {
  flex: 0 0 auto;
  white-space: nowrap;
}

.category-filter a.active {
  border-color: #2a1d16;
  background: #2a1d16;
  color: #fff4e9;
}

.mobile-category-list {
  display: grid;
}

.mobile-category-item + .mobile-category-item {
  border-top: 1px solid var(--line);
}

.mobile-category-item {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.mobile-category-thumb {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  background: #fff7eb;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.mobile-category-thumb img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.mobile-category-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.mobile-category-copy h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  overflow: hidden;
}

.mobile-category-copy h3 a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color .2s ease;
}

.mobile-category-copy h3 a:hover {
  color: var(--accent);
}

.mobile-category-copy p {
  margin: 0;
  color: #4f463f;
  font-size: 14px;
  line-height: 1.7;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-category-meta {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-category-meta a {
  display: inline-flex;
  vertical-align: top;
  margin-right: 8px;
  padding: 5px 9px;
  border: 1px solid #eadfd1;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.mobile-category-meta a:last-child {
  margin-right: 0;
}

.pagination {
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 0;
  text-align: center;
}

.pagination a,
.pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #eadfd1;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #554941;
  background: rgba(255, 255, 255, .72);
  font-weight: 800;
}

.pagination .active,
.pagination a:hover {
  border-color: var(--nav);
  background: var(--nav);
  color: #fff8ec;
}

.page-404 {
  flex: 1;
  padding: 28px 14px 36px;
  display: grid;
  align-items: center;
}

.page-404-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.error-shell {
  padding: 34px 22px 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(194, 139, 69, .16), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, #fbf1e3 100%);
}

.error-code {
  margin: 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
}

.error-shell h1 {
  margin: 16px 0 0;
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -.03em;
  white-space: normal;
}

.error-text {
  margin: 14px 0 0;
  color: #5c5047;
  font-size: 15px;
  line-height: 1.8;
}

.error-actions {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.error-actions a {
  min-height: 46px;
  border: 1px solid #e4d5c7;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .82);
  color: #4c4038;
  font-size: 15px;
  font-weight: 800;
}

.error-actions .primary {
  border-color: var(--accent-dark);
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff8ec;
}
