:root {
  --as-bg: #f4f0e8;
  --as-paper: #fffdfa;
  --as-paper-2: #f6f1e9;
  --as-line: #dfd4c5;
  --as-line-strong: #cdb99f;
  --as-text: #2f261f;
  --as-muted: #7b6c5d;
  --as-accent: #876142;
  --as-shadow: 0 14px 34px rgba(63, 43, 23, .07);
}

html,
body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #f8f5ef 0%, #f0eadf 100%);
  color: var(--as-text);
  font-family: "Segoe UI", "PingFang SC", Arial, sans-serif;
}

body {
  line-height: 1.75;
}

img {
  max-width: 100%;
}

a {
  color: var(--as-accent);
  text-decoration: none;
}

a:hover {
  color: #67462d;
}

.as-hidden {
  display: none;
}

.as-wrap {
  width: min(1340px, calc(100% - 24px));
  margin: 0 auto;
}

.as-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 240, 232, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--as-line);
}

/* Row 1: brand + search/actions */
.as-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 16px;
}

.as-brand a {
  font-size: 26px;
  font-weight: 800;
  color: var(--as-text);
  white-space: nowrap;
}

.as-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Shared muted text */
.as-card-meta,
.as-meta-line,
.as-mini-card span,
.as-mini-card strong,
.as-chip-cloud span,
.as-breadcrumb,
.as-breadcrumb a,
.as-breadcrumb li,
.as-tag-card p,
.as-diy-box strong {
  color: var(--as-muted);
  font-size: 13px;
}

/* Row 2: nav bar */
.as-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 0 12px;
  border-top: 1px solid var(--as-line);
  margin-top: 2px;
}

.as-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--as-text);
  font-size: 14px;
  font-weight: 500;
  transition: .2s ease;
  white-space: nowrap;
}

.as-nav a:hover,
.as-home-link {
  background: rgba(255,255,255,.7);
}

.as-home-link {
  font-weight: 700;
}

.as-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--as-line);
  background: #fff;
  color: var(--as-text);
  font-size: 18px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.as-search,
.as-search-wide {
  display: grid;
  grid-template-columns: minmax(120px, 200px) auto;
  gap: 0;
}

.as-search input,
.as-search-wide input {
  height: 38px;
  border-radius: 12px 0 0 12px;
  border: 1px solid var(--as-line);
  border-right: none;
  background: #fff;
  padding: 0 14px;
  outline: none;
  color: var(--as-text);
  font-size: 13px;
}

.as-search input:focus {
  border-color: var(--as-accent);
}

.as-search button,
.as-search-wide button,
.as-btn {
  height: 38px;
  border: 0;
  border-radius: 0 12px 12px 0;
  padding: 0 16px;
  background: var(--as-accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.as-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.as-btn-light {
  background: #fff;
  color: var(--as-text);
  border: 1px solid var(--as-line);
}

.as-main {
  padding: 24px 0 40px;
}

.as-hero-shelf,
.as-feature-index,
.as-list-head,
.as-search-panel,
.as-diy-panel,
.as-empty-page,
.as-article-record,
.as-comments-box,
.as-shelf-block,
.as-tag-card,
.as-tag-board {
  background: var(--as-paper);
  border: 1px solid var(--as-line);
  border-radius: 24px;
  box-shadow: var(--as-shadow);
}

.as-hero-shelf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 28px;
  margin-bottom: 22px;
}

.as-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f1e6d8;
  color: var(--as-accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.as-hero-copy h1,
.as-list-head h1,
.as-search-panel h1,
.as-diy-panel h1,
.as-article-head h1,
.as-empty-page h1 {
  margin: 14px 0 10px;
  font-size: 48px;
  line-height: 1.08;
}

.as-hero-copy p,
.as-feature-index p,
.as-list-head p,
.as-index-body p,
.as-ledger-body p,
.as-result-card p,
.as-diy-box span {
  color: var(--as-muted);
}

.as-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.as-feature-index,
.as-list-head,
.as-search-panel,
.as-diy-panel,
.as-empty-page {
  padding: 26px 28px;
  margin-bottom: 22px;
}

.as-feature-index h2,
.as-index-body h3,
.as-ledger-body h3,
.as-result-card h3,
.as-tag-card h3 {
  margin: 10px 0;
  font-size: 28px;
  line-height: 1.16;
}

.as-catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.as-shelf-block {
  padding: 20px;
  margin-bottom: 22px;
}

.as-shelf-head {
  margin-bottom: 14px;
}

.as-chip-cloud,
.as-tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.as-chip-cloud a,
.as-tag-line a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #faf6ef;
  border: 1px solid var(--as-line);
  color: var(--as-text);
}

.as-mini-list {
  display: grid;
  gap: 12px;
}

.as-mini-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--as-paper-2);
  border: 1px solid var(--as-line);
}

.as-mini-card a {
  display: block;
  font-weight: 700;
  color: var(--as-text);
}

.as-mini-card span,
.as-mini-card strong {
  display: block;
  margin-top: 6px;
}

.as-ledger-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.as-index-card,
.as-result-card,
.as-diy-box,
.as-tag-card {
  border-radius: 20px;
  background: var(--as-paper-2);
  border: 1px solid var(--as-line);
  overflow: hidden;
}

.as-index-thumb {
  display: block;
}

.as-index-thumb img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.as-index-body,
.as-result-card,
.as-diy-box,
.as-tag-card {
  padding: 16px 18px;
}

.as-ledger-list {
  display: grid;
  gap: 14px;
}

.as-ledger-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 200px;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: var(--as-paper-2);
  border: 1px solid var(--as-line);
}

.as-ledger-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--as-line-strong);
  color: var(--as-accent);
  font-weight: 800;
}

.as-ledger-thumb {
  display: block;
  overflow: hidden;
  border-radius: 16px;
}

.as-ledger-thumb img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.as-breadcrumb {
  margin-bottom: 18px;
}

.as-pagination,
.pagination {
  margin-top: 18px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  margin: 4px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--as-line);
  background: #fff;
  color: var(--as-text);
}

.as-detail-wrap {
  width: min(1080px, calc(100% - 24px));
}

.as-article-record,
.as-comments-box {
  padding: 24px;
  margin-bottom: 22px;
}

.as-article-cover {
  margin: 18px 0 22px;
  overflow: hidden;
  border-radius: 18px;
}

.as-article-content {
  font-size: 17px;
  line-height: 1.95;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

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

.as-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  margin: 18px 0;
  display: block;
}

.as-article-content h1, .as-article-content h2, .as-article-content h3,
.as-article-content h4, .as-article-content h5, .as-article-content h6 {
  margin: 32px 0 14px; font-weight: 700; line-height: 1.3;
}
.as-article-content h1 { font-size: 28px; }
.as-article-content h2 { font-size: 24px; border-bottom: 1px solid var(--as-line); padding-bottom: 8px; }
.as-article-content h3 { font-size: 20px; }
.as-article-content h4 { font-size: 18px; }

.as-article-content p, .as-article-content div { margin: 0 0 16px; }
.as-article-content a { text-decoration: underline; text-underline-offset: 3px; }
.as-article-content b, .as-article-content strong { font-weight: 700; }

.as-article-content ul, .as-article-content ol {
  margin: 14px 0; padding: 0 0 0 28px; line-height: 1.8;
}
.as-article-content ol { list-style: decimal; }
.as-article-content ul { list-style: disc; }
.as-article-content li { margin-bottom: 6px; }

.as-article-content blockquote {
  border-left: 4px solid var(--as-accent);
  padding: 14px 20px; margin: 20px 0;
  background: var(--as-paper-2, #f7f2ea);
  border-radius: 0 14px 14px 0;
}

.as-article-content code {
  padding: 2px 6px; margin: 0 3px;
  background: var(--as-paper-2, #f7f2ea);
  border: 1px solid var(--as-line);
  border-radius: 6px; font-size: 14px;
  font-family: 'Consolas', 'Monaco', monospace;
}

.as-article-content pre {
  padding: 18px 20px; margin: 20px 0;
  background: var(--as-text);
  color: var(--as-bg, #fff);
  border-radius: 14px; font-size: 14px; line-height: 1.6;
  overflow-x: auto; white-space: pre;
  font-family: 'Consolas', 'Monaco', monospace;
}
.as-article-content pre code {
  padding: 0; margin: 0; background: none; border: none; color: inherit;
}

.as-article-content hr {
  border: 0; border-top: 1px solid var(--as-line); margin: 24px 0;
}

.as-article-content table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  overflow-x: auto; display: block;
}
.as-article-content td, .as-article-content th {
  min-width: 60px; border: 1px solid var(--as-line);
  padding: 8px 12px; text-align: left;
}
.as-article-content th { font-weight: 700; }

/* Title word-wrap */
.as-article-head h1 {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Mini-card link truncation */
.as-mini-card a {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.as-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.as-tag-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 18px;
  margin-bottom: 22px;
}

.as-search-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.as-result-board,
.as-diy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.as-empty-inline {
  padding: 24px;
  border-radius: 18px;
  text-align: center;
  color: var(--as-muted);
  background: #faf6ef;
  border: 1px dashed var(--as-line-strong);
}

.as-diy-box strong {
  display: block;
  margin-bottom: 8px;
}

.as-footer {
  padding: 0 0 30px;
}

.as-footer-inner {
  padding: 20px 24px;
  text-align: center;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--as-line);
  border-radius: 22px;
}

.as-footer p {
  margin: 0;
  color: var(--as-muted);
}

.as-empty-page {
  text-align: center;
}

.as-scrolltop {
  position: fixed;
  right: 20px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--as-accent);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .25s ease;
  box-shadow: 0 8px 24px rgba(70, 46, 27, .22);
}

.as-scrolltop.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 1180px) {
  .as-ledger-grid,
  .as-tag-board,
  .as-result-board,
  .as-diy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .as-ledger-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }
}

@media (max-width: 991px) {
  .as-hero-shelf,
  .as-catalog-grid,
  .as-search-top,
  .as-detail-grid {
    grid-template-columns: 1fr;
  }

  .as-menu-toggle {
    display: inline-flex;
  }

  .as-nav {
    display: none;
    border-top: none;
    padding: 8px 0 12px;
  }

  .as-nav.open {
    display: flex;
  }

  .as-search,
  .as-search-wide,
  .as-ledger-grid,
  .as-tag-board,
  .as-result-board,
  .as-diy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .as-wrap,
  .as-detail-wrap {
    width: min(100% - 16px, 1340px);
  }

  .as-main {
    padding-top: 16px;
  }

  /* Header mobile */
  .as-header-top {
    flex-wrap: wrap;
    min-height: 50px;
    gap: 8px;
  }

  .as-brand a {
    font-size: 22px;
  }

  .as-search,
  .as-search-wide {
    grid-template-columns: 1fr auto;
  }

  .as-hero-copy h1,
  .as-list-head h1,
  .as-search-panel h1,
  .as-diy-panel h1,
  .as-article-head h1,
  .as-empty-page h1 {
    font-size: 32px;
  }

  .as-feature-index h2,
  .as-index-body h3,
  .as-ledger-body h3,
  .as-result-card h3,
  .as-tag-card h3 {
    font-size: 22px;
  }

  .as-feature-index,
  .as-list-head,
  .as-search-panel,
  .as-diy-panel,
  .as-empty-page,
  .as-article-record,
  .as-comments-box,
  .as-shelf-block,
  .as-footer-inner,
  .as-tag-board {
    padding: 18px;
  }

  /* Article content mobile */
  .as-article-content { font-size: 15px; }
  .as-article-content h1 { font-size: 24px; }
  .as-article-content h2 { font-size: 20px; }
  .as-article-content h3 { font-size: 18px; }
  .as-article-content pre { font-size: 12px; padding: 14px; }
  .as-article-content td, .as-article-content th { padding: 6px 8px; min-width: 40px; }
  .as-article-content img { border-radius: 10px; margin: 12px 0; }
  .as-article-head h1 { font-size: 28px; }
  .as-detail-grid { grid-template-columns: 1fr; }
}
