:root {
  --ink: #2b2622;
  --ink-soft: #5b534b;
  --paper: #faf7f2;
  --paper-2: #f3ede4;
  --line: #e4dccf;
  --green: #4a6b52;
  --green-d: #3a5642;
  --clay: #b5795f;
  --gold: #c9a24a;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(60, 50, 40, 0.08);
  --shadow-lg: 0 14px 40px rgba(60, 50, 40, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: min(1160px, 92vw); margin: 0 auto; }
.meta-title { display: none; }

/* ---------- Header ---------- */
#siteHeader {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { display: flex; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; color: var(--ink); }
.nav { display: flex; gap: 6px; margin-left: 18px; }
.nav-link {
  padding: 8px 14px; border-radius: 10px; font-size: 15px; color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--paper-2); color: var(--ink); }
.nav-link.active { background: var(--green); color: #fff; }
.header-right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 18px;
  font-size: 15px; font-weight: 600; transition: all .18s; font-family: inherit;
}
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-solid { background: var(--green); color: #fff; }
.btn-solid:hover { background: var(--green-d); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-clay { background: var(--clay); color: #fff; }
.btn-clay:hover { background: #a3674f; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 120% at 85% 0%, rgba(181,121,95,0.10), transparent 55%),
    radial-gradient(120% 120% at 0% 100%, rgba(74,107,82,0.12), transparent 55%),
    var(--paper);
  padding: 64px 0 56px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 40px; line-height: 1.25; margin: 0 0 16px; font-weight: 800; letter-spacing: 0.5px; }
.hero h1 .accent { color: var(--green); }
.hero p.lead { font-size: 17px; color: var(--ink-soft); margin: 0 0 26px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 30px; }
.hero-stats .stat b { font-size: 24px; color: var(--green); display: block; }
.hero-stats .stat span { font-size: 13px; color: var(--ink-soft); }
.hero-art {
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); background: var(--paper-2); aspect-ratio: 4/3;
}
.hero-art svg { width: 100%; height: 100%; }

/* ---------- Section ---------- */
.section { padding: 54px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; gap: 16px; }
.section-head h2 { font-size: 26px; margin: 0 0 6px; font-weight: 800; }
.section-head p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.cat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 26px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white); font-size: 14px; cursor: pointer; color: var(--ink-soft);
  transition: all .16s;
}
.chip svg { color: var(--green); }
.chip:hover { border-color: var(--green); color: var(--ink); }
.chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.chip.active svg { color: #fff; }

/* ---------- Cards grid ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .18s, box-shadow .18s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4/3; background: var(--paper-2); position: relative; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-cat {
  position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.92); padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--green); box-shadow: var(--shadow);
}
.card-cat svg { color: var(--green); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 17px; font-weight: 700; margin: 0; line-height: 1.4; }
.card-summary { font-size: 14px; color: var(--ink-soft); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-soft); margin-top: auto; padding-top: 6px; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-price { color: var(--clay); font-weight: 700; }

/* ---------- Forms ---------- */
.auth-wrap { max-width: 440px; margin: 48px auto; }
.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow);
}
.panel h1 { font-size: 24px; margin: 0 0 6px; }
.panel .sub { color: var(--ink-soft); margin: 0 0 24px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px;
  font-family: inherit; background: var(--paper); color: var(--ink); transition: border .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--ink-soft); margin: 10px 0; }
.check-row input { margin-top: 3px; }
.check-row a { color: var(--green); text-decoration: underline; }
.form-error { color: #b23b3b; font-size: 13.5px; min-height: 18px; margin: 4px 0 10px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--ink-soft); }
.auth-switch a { color: var(--green); font-weight: 600; }

/* ---------- Detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; padding: 40px 0; }
.detail-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); aspect-ratio: 4/3; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: 28px; margin: 0 0 12px; font-weight: 800; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; background: var(--paper-2); font-size: 13px; color: var(--ink-soft); }
.tag.green { background: var(--green); color: #fff; }
.detail-content { font-size: 16px; color: #3a342e; line-height: 1.9; white-space: pre-wrap; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-card h4 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 7px; }
.side-card .row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); margin: 9px 0; }
.side-card .row b { color: var(--ink); font-weight: 600; }
.note-card { background: linear-gradient(180deg, #fbf6ee, #f6efe2); border: 1px solid var(--line); }
.note-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.8; }

/* ---------- Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin: 28px 0; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.profile-head .info b { font-size: 18px; }
.profile-head .info p { margin: 2px 0 0; color: var(--ink-soft); font-size: 13.5px; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab { padding: 11px 18px; cursor: pointer; font-size: 15px; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }
.my-card { display: flex; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; align-items: center; }
.my-thumb { width: 96px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--paper-2); flex-shrink: 0; }
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-body { flex: 1; min-width: 0; }
.my-body .t { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.my-body .m { font-size: 13px; color: var(--ink-soft); margin: 0; }
.status-badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.status-pending { background: #f3e7c9; color: #8a6a1f; }
.status-approved { background: #dcebe0; color: var(--green-d); }
.status-rejected { background: #f1dcd8; color: #a3472f; }
.my-actions { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.mini-btn { padding: 6px 12px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); }
.mini-btn:hover { border-color: var(--green); color: var(--green); }
.mini-btn.danger:hover { border-color: #c0573f; color: #c0573f; }

/* ---------- Admin ---------- */
.admin-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 24px 0; }
.admin-stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px; box-shadow: var(--shadow); min-width: 130px; }
.admin-stat b { font-size: 26px; color: var(--green); display: block; }
.admin-stat span { font-size: 13px; color: var(--ink-soft); }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--paper-2); font-weight: 700; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-actions { display: flex; gap: 8px; }

/* ---------- About ---------- */
.about-hero { padding: 48px 0 8px; }
.about-hero h1 { font-size: 32px; margin: 0 0 10px; }
.about-hero p { color: var(--ink-soft); max-width: 720px; font-size: 16px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin: 30px 0; }
.about-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.about-card h3 { margin: 0 0 12px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.about-card p, .about-card li { color: #3a342e; font-size: 15px; line-height: 1.9; }
.about-card ul { padding-left: 20px; margin: 8px 0; }
.timeline { border-left: 2px solid var(--line); padding-left: 22px; margin: 10px 0 0; }
.timeline li { list-style: none; position: relative; margin-bottom: 18px; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--green); border: 2px solid var(--paper); }
.info-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 16px; }
.info-item { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.info-item b { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 4px; font-weight: 600; }
.info-item span { font-size: 15px; }

/* ---------- Footer ---------- */
#siteFooter { background: #2b2622; color: #d8cfc2; margin-top: 60px; padding: 46px 0 22px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 30px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer-desc { font-size: 13.5px; line-height: 1.8; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 14px; margin: 0 0 14px; letter-spacing: 1px; }
.footer-col a { display: block; font-size: 13.5px; color: #c8bfb2; margin-bottom: 9px; }
.footer-col a:hover { color: var(--gold); }
.footer-line { font-size: 13px; color: #b3a99c; margin: 6px 0 0; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 30px; padding-top: 18px; font-size: 13px; color: #b3a99c; }
.footer-bottom a { color: var(--gold); }
.footer-bottom a:hover { text-decoration: underline; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty svg { color: var(--line); }
.loading { text-align: center; padding: 40px; color: var(--ink-soft); }
.pagination { display: flex; gap: 8px; justify-content: center; margin: 30px 0; }
.page-btn { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.page-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.page-btn[disabled] { opacity: .4; cursor: not-allowed; }
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .25s, transform .25s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }
.modal-mask { position: fixed; inset: 0; background: rgba(40,34,28,0.45); display: flex; align-items: center; justify-content: center; z-index: 150; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); padding: 26px; max-width: 520px; width: 100%; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 14px; }
.modal textarea { width: 100%; min-height: 110px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-family: inherit; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .detail-grid, .about-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .nav { display: none; }
  .hero h1 { font-size: 30px; }
  .info-list { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .header-right .btn-sm { padding: 6px 10px; }
  .brand-name { font-size: 15px; }
  .section { padding: 38px 0; }
}
