:root {
  --linen: #f6f0e4;
  --cream: #fcf9f2;
  --burlap: #e8dcc8;
  --wood: #332419;
  --wood-soft: #634d3c;
  --wood-muted: #8c7662;
  --barn: #a8382b;
  --barn-dark: #82271d;
  --barn-soft: #fceae7;
  --denim: #2a4a68;
  --denim-soft: #e9f0f7;
  --wheat: #c98324;
  --wheat-soft: #fdf4e3;
  --pine: #43664b;
  --pine-soft: #eaf2ec;
  --stitch: #c9b79c;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--linen);
  background-image:
    repeating-linear-gradient(0deg, rgba(140, 118, 98, 0.04) 0px, rgba(140, 118, 98, 0.04) 1px, transparent 1px, transparent 26px),
    radial-gradient(rgba(201, 131, 36, 0.07) 1px, transparent 1px);
  background-size: 100% 26px, 24px 24px;
  color: var(--wood);
  font-family: 'Noto Sans SC', Georgia, 'Songti SC', serif;
  line-height: 1.82;
}
a { color: var(--barn); text-decoration: none; font-weight: 700; transition: all .18s; }
a:hover { color: var(--denim); }

/* 美式红白野餐格子布顶栏 (Red Gingham Banner) */
.gingham-strip {
  height: 14px;
  background-color: #fbf5eb;
  background-image:
    linear-gradient(90deg, rgba(168, 56, 43, 0.55) 50%, transparent 50%),
    linear-gradient(rgba(168, 56, 43, 0.55) 50%, transparent 50%);
  background-size: 16px 16px;
  border-bottom: 2px solid var(--wood);
}

/* 顶部农夫历木板导航栏 */
.porch-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252, 249, 242, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 2px dashed var(--stitch);
  box-shadow: 0 4px 14px rgba(51, 36, 25, 0.06);
}
.porch-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.barn-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--wood); font-size: 1.2rem; font-weight: 900;
}
.barn-brand:hover { color: var(--barn); }
.brand-emblem {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--barn); color: #fcf9f2;
  border: 2px dashed #f6d5a3; font-size: 19px;
  box-shadow: 2px 2px 0 rgba(51,36,25,.2);
}
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav-links a {
  font-size: 13.5px; color: var(--wood-soft); padding: 6px 12px;
  border-radius: 8px; border: 1.5px solid transparent;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--wheat-soft); color: var(--barn); border-color: #e6c696;
}
.nav-links a.nav-shed {
  background: var(--denim); color: #fff; border-color: var(--denim);
}
.nav-links a.nav-shed:hover { background: var(--barn); border-color: var(--barn); color: #fff; }

/* 主容器 */
.wrap { max-width: 1160px; margin: 0 auto; padding: 36px 20px 64px; }

/* 美式谷仓门廊主视觉 Hero */
.barn-hero {
  background: linear-gradient(140deg, #fcf9f2 0%, #f5ebd9 100%);
  border: 2.5px solid var(--wood);
  border-radius: 18px;
  padding: 40px 36px;
  margin-bottom: 34px;
  position: relative;
  box-shadow: 7px 7px 0 #d9c8ae;
  display: grid; grid-template-columns: 1.3fr 0.85fr; gap: 30px; align-items: center;
}
.barn-hero::before {
  content: ''; position: absolute; inset: 7px;
  border: 1.5px dashed var(--stitch); border-radius: 12px; pointer-events: none;
}
.almanac-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--pine-soft); color: var(--pine);
  border: 1.5px solid #a8c4ae; padding: 4px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; margin-bottom: 14px;
}
.barn-hero h1 {
  font-family: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  font-size: clamp(1.9rem, 4.2vw, 3.05rem); font-weight: 900; line-height: 1.24;
  color: var(--wood); margin-bottom: 14px;
}
.barn-hero h1 span { color: var(--barn); }
.hero-desc { font-size: 15px; color: var(--wood-soft); margin-bottom: 24px; }

/* 黑板风农场公告牌 (Chalkboard Widget) */
.chalkboard {
  background: #223029;
  color: #f4efe4;
  border: 8px solid #7d5635;
  border-radius: 12px;
  padding: 22px 20px;
  box-shadow: inset 0 0 24px rgba(0,0,0,.45), 5px 5px 0 rgba(51,36,25,.2);
  position: relative; z-index: 1;
}
.chalkboard h3 {
  color: #f5cb78; font-size: 15px; margin-bottom: 12px;
  border-bottom: 1.5px dashed rgba(245,203,120,.4); padding-bottom: 8px;
}
.chalk-list { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.chalk-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chalk-list a { color: #fcf9f2; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.chalk-list a:hover { color: #f5cb78; }
.chalk-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 4px;
  background: rgba(168, 56, 43, 0.75); color: #fff; white-space: nowrap;
}

/* 复古牛仔与谷仓按钮 */
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 800;
  border: 2px solid var(--wood); cursor: pointer; font-family: inherit; transition: all .16s;
}
.btn:hover { transform: translate(-1px, -2px); }
.btn-barn { background: var(--barn); color: #fff; box-shadow: 3px 3px 0 #702117; }
.btn-barn:hover { background: var(--barn-dark); color: #fff; }
.btn-denim { background: var(--denim); color: #fff; box-shadow: 3px 3px 0 #1b3145; }
.btn-denim:hover { background: #1e3850; color: #fff; }
.btn-pine { background: var(--pine); color: #fff; box-shadow: 3px 3px 0 #2b4531; }
.btn-pine:hover { background: #33523a; color: #fff; }
.btn-linen { background: var(--cream); color: var(--wood); box-shadow: 3px 3px 0 #d4c4aa; }
.btn-linen:hover { background: var(--wheat-soft); color: var(--barn); }

/* 二级页 Banner */
.sub-hero {
  background: var(--cream); border: 2px solid var(--wood);
  border-radius: 16px; padding: 30px 32px; margin-bottom: 30px;
  box-shadow: 5px 5px 0 #d9c8ae;
}
.crumb { font-size: 12.5px; color: var(--wood-muted); margin-bottom: 10px; }
.sub-hero h1 { font-family: 'Playfair Display', 'Noto Serif SC', serif; font-size: clamp(1.65rem, 3.6vw, 2.4rem); font-weight: 900; margin-bottom: 10px; line-height: 1.28; }
.sub-hero p { font-size: 14.8px; color: var(--wood-soft); max-width: 780px; }

/* 麦穗分割标题 */
.wheat-head {
  display: flex; align-items: center; gap: 14px; margin: 36px 0 20px;
}
.wheat-head::before, .wheat-head::after {
  content: ''; flex: 1; border-top: 2px dashed var(--stitch);
}
.wheat-head h2 { font-family: 'Playfair Display', 'Noto Serif SC', serif; font-size: 1.42rem; font-weight: 900; white-space: nowrap; }

/* 卡片与网格 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 22px; margin-bottom: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 30px; }

.porch-card {
  background: var(--cream);
  border: 2px solid #c9b79c;
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: 5px 5px 0 #e2d4be;
  display: flex; flex-direction: column;
  transition: transform .18s, border-color .18s;
}
.porch-card:hover { transform: translate(-2px, -2px); border-color: var(--barn); }
.patch {
  display: inline-block; align-self: flex-start;
  font-size: 11.5px; font-weight: 800; padding: 3px 10px;
  border-radius: 6px; margin-bottom: 10px; border: 1px dashed;
}
.p-barn { background: var(--barn-soft); color: var(--barn); border-color: #e4a39b; }
.p-denim { background: var(--denim-soft); color: var(--denim); border-color: #a4bdd4; }
.p-pine { background: var(--pine-soft); color: var(--pine); border-color: #9ec0a6; }
.p-wheat { background: var(--wheat-soft); color: #9c6111; border-color: #e3c18c; }

.porch-card h3 { font-size: 1.1rem; font-weight: 900; margin-bottom: 8px; color: var(--wood); line-height: 1.4; }
.porch-card p { font-size: 13.8px; color: var(--wood-soft); flex: 1; margin-bottom: 14px; }
.card-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding-top: 12px; border-top: 1.5px dashed #dcd0bc; font-size: 13px;
}

/* 长篇文章木框 */
.journal {
  background: var(--cream); border: 2px solid var(--wood);
  border-top: 6px solid var(--barn);
  border-radius: var(--radius); padding: 32px 34px; margin-bottom: 28px;
  box-shadow: 5px 5px 0 #dfd2bd;
}
.journal.denim-top { border-top-color: var(--denim); }
.journal.pine-top { border-top-color: var(--pine); }
.journal h2 {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 1.36rem; font-weight: 900; padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 2px dashed var(--stitch);
}
.journal h3 { font-size: 1.08rem; font-weight: 800; color: var(--barn); margin: 20px 0 8px; }
.journal p { font-size: 14.8px; color: var(--wood-soft); margin-bottom: 14px; }
.journal p a { text-decoration: underline; text-underline-offset: 4px; }
.journal ul, .journal ol { padding-left: 22px; margin: 10px 0 16px; }
.journal li { font-size: 14.3px; color: var(--wood-soft); margin-bottom: 8px; }
.journal strong { color: var(--wood); }

.note-box {
  background: var(--wheat-soft); border: 2px dashed #deb673;
  border-radius: 10px; padding: 16px 20px; margin: 16px 0;
  font-size: 14px; color: #5c3a0b;
}

/* 表格 */
.tbl-wrap { overflow-x: auto; border: 2px solid var(--wood); border-radius: 10px; margin: 16px 0; background: #fffdf9; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--burlap); color: var(--wood); font-size: 13px; font-weight: 900; padding: 12px 14px; text-align: left; border-bottom: 2px solid var(--wood); }
td { padding: 12px 14px; font-size: 13.6px; color: var(--wood-soft); border-top: 1px dashed #d6c7b0; vertical-align: top; }
tr:hover td { background: #fdf9f0; }

/* 提示词木框 */
.prompt-crate {
  background: #261c15; color: #f6efe2; border: 2px solid #9e7346;
  border-radius: 10px; padding: 18px 20px; margin: 14px 0; position: relative;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.75;
}
.cp-btn {
  position: absolute; top: 10px; right: 10px;
  background: var(--barn); color: #fff; border: 1px solid #f6d5a3;
  padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.cp-btn:hover { background: var(--pine); }

/* 搜索与牛仔标签 */
.shed-bar {
  background: var(--cream); border: 2px solid var(--wood);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 24px;
  box-shadow: 4px 4px 0 #dfd2bd;
}
.shed-search {
  width: 100%; padding: 11px 16px; border-radius: 8px;
  border: 2px solid var(--stitch); background: #fffdf9; color: var(--wood);
  font-size: 14px; outline: none; margin-bottom: 12px;
}
.shed-search:focus { border-color: var(--barn); }
.denim-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.d-tab {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--linen); border: 1.5px solid var(--stitch); color: var(--wood-soft); cursor: pointer;
}
.d-tab.active, .d-tab:hover { background: var(--denim); color: #fff; border-color: var(--denim); }

.t-row { display: flex; gap: 8px; width: 100%; }
.t-row a { flex: 1; text-align: center; padding: 7px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 800; }
.tr-ext { background: var(--barn); color: #fff; }
.tr-ext:hover { background: var(--denim); color: #fff; }
.tr-int { background: var(--linen); color: var(--wood); border: 1.5px solid var(--stitch); }
.tr-int:hover { border-color: var(--barn); color: var(--barn); }

/* 页脚美式木屋风 */
.barn-footer {
  background: #2b1e16; color: #dfd2bd;
  border-top: 6px solid var(--barn);
  padding: 46px 20px 28px; margin-top: 48px;
}
.f-grid {
  max-width: 1160px; margin: 0 auto 28px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 26px;
}
.f-grid h4 { color: #f6d5a3; font-size: 14.5px; margin-bottom: 12px; }
.f-grid ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.f-grid a { color: #cfc0a8; font-size: 13.5px; font-weight: 500; }
.f-grid a:hover { color: #f6d5a3; }
.f-btm {
  max-width: 1160px; margin: 0 auto; padding-top: 18px;
  border-top: 1px dashed rgba(246, 213, 163, 0.25);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: #9c8870;
}

@media (max-width: 840px) {
  .barn-hero { grid-template-columns: 1fr; padding: 26px 20px; }
  .journal { padding: 22px 18px; }
  .f-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .f-grid { grid-template-columns: 1fr; }
}
