/* ============================================================
   家居志 — 共享样式表（系统字体,无 Google Fonts:大陆加载安全 + 首屏快）
   ============================================================ */
:root {
  --bg: #ffffff; --bg: oklch(1 0 0);
  --surface: #f6f6f7; --surface: oklch(0.972 0 0);
  --ink: #18181b; --ink: oklch(0.215 0 0);
  --muted: #52525b; --muted: oklch(0.43 0.006 286);
  --border: #e4e4e7; --border: oklch(0.92 0.004 286);
  --gold: #a16207; --gold-deep: #854d0e; --gold-cta: #8a5a06; --gold-tint: #fbf3e2;
  --pos: #15803d; --neg: #b91c1c;
  --radius: 12px; --radius-sm: 8px; --maxw: 1080px; --prose: 68ch; --z-header: 100;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* 系统字体栈:汉字走 PingFang/微软雅黑,标题走系统衬线(苹果 Songti 优雅) */
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-serif: Georgia, "Times New Roman", "Songti SC", "Noto Serif SC", "SimSun", serif;
  --font-num: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--ink); background: var(--bg);
  line-height: 1.65; font-size: 1rem; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
svg { display: block; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 2.5rem); }

/* 顶栏 */
header { position: sticky; top: 0; z-index: var(--z-header); background: #ffffff;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.1) blur(8px); backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-family: var(--font-serif); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.brand span { color: var(--gold-deep); }
.nav ul { display: flex; gap: 1.6rem; list-style: none; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 0.15s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav .lang { border: 1px solid var(--border); border-radius: 999px; padding: 0.18rem 0.65rem; font-size: 0.8rem; color: var(--muted); }
.nav .lang:hover { color: var(--ink); border-color: #d4d4d8; }
@media (max-width: 640px) {
  .nav { height: auto; min-height: 56px; flex-wrap: wrap; gap: 0.3rem 1rem; padding-block: 0.55rem; }
  .nav ul { gap: 1.1rem; font-size: 0.86rem; }
  .ctable { font-size: 0.9rem; }
  .ctable th, .ctable td { padding: 0.65rem 0.5rem; }
}

/* 面包屑 */
.crumb { font-size: 0.85rem; color: var(--muted); padding-top: 1.5rem; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--ink); }
.crumb span { margin: 0 0.4rem; opacity: 0.6; }

/* Hero */
.hero { padding-top: clamp(2.25rem, 6vw, 4rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } }
.kicker { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--gold-deep); margin-bottom: 1rem; }
.kicker::after { content: ""; width: 26px; height: 1px; background: var(--gold); opacity: 0.5; }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.4rem); letter-spacing: -0.015em; }
.dek { margin-top: 1.1rem; font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--muted); max-width: 28em; }
.meta { margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.1rem; font-size: 0.9rem; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 600; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border); }

.visual { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius);
  background: radial-gradient(120% 120% at 70% 20%, #ffffff 0%, var(--surface) 60%, #ededee 100%);
  border: 1px solid var(--border); display: grid; place-items: center; overflow: hidden; }
.visual .ico { width: 40%; color: #c9c9cf; }
.visual .shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* 区块通用 */
section { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.rule { border: 0; border-top: 1px solid var(--border); }
.h-sec { font-size: clamp(1.5rem, 3vw, 1.95rem); margin-bottom: 0.5rem; }
.sub-sec { color: var(--muted); font-size: 0.98rem; margin-bottom: 1.6rem; max-width: var(--prose); }

/* 趋势 term 列表 */
.terms { display: grid; max-width: 840px; }
.term { display: grid; grid-template-columns: 190px 1fr; gap: 1.25rem; padding: 1.15rem 0; border-top: 1px solid var(--border); align-items: start; }
.term:last-child { border-bottom: 1px solid var(--border); }
@media (max-width: 600px) { .term { grid-template-columns: 1fr; gap: 0.35rem; } }
.term dt { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.term dd { color: var(--muted); font-size: 0.98rem; }

/* 场景 Tab + 图集 */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tab-btn { font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--muted); background: none;
  border: 1px solid var(--border); border-radius: 999px; padding: 0.45rem 1.05rem; cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease); }
.tab-btn:hover { color: var(--ink); border-color: #d4d4d8; }
.tab-btn[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.tab-btn:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.75rem, 2vw, 1.1rem); }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .gallery { grid-template-columns: 1fr; } }
.shot-tile { margin: 0; }
.shot-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.shot-tile figcaption { margin-top: 0.6rem; font-size: 0.9rem; color: var(--muted); }
.shot-tile figcaption b { color: var(--ink); font-weight: 600; }
.gallery[data-filter="pet"]   .shot-tile:not([data-cat="pet"]),
.gallery[data-filter="small"] .shot-tile:not([data-cat="small"]),
.gallery[data-filter="wood"]  .shot-tile:not([data-cat="wood"]) { display: none; }

/* 条目列表（品牌/笔记/相关文章） */
.entries { display: grid; max-width: 840px; }
.entry { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1.25rem; padding: 1.1rem 0; border-top: 1px solid var(--border); align-items: baseline; }
.entry:last-child { border-bottom: 1px solid var(--border); }
.entry .name { font-weight: 600; font-size: 1.05rem; }
.entry .desc { grid-column: 1 / -1; color: var(--muted); font-size: 0.96rem; }
.entry .go { color: var(--gold-deep); font-weight: 600; font-size: 0.9rem; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; transition: gap 0.18s var(--ease); }
.entry .go:hover { gap: 0.5rem; }
.entry .go svg { width: 15px; height: 15px; }

/* 标签 */
.tags { display: flex; flex-wrap: wrap; gap: 0.65rem; max-width: 840px; }
.tag { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 0.9rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.95rem; }
.tag b { color: var(--gold-deep); font-weight: 600; }

/* 行内大数 */
.stat-line { max-width: var(--prose); font-size: 1.08rem; }
.stat-line b { font-family: var(--font-serif); font-size: 1.7rem; color: var(--gold-deep); font-variant-numeric: tabular-nums; }

/* 文章正文 prose */
.prose { max-width: var(--prose); font-size: 1.06rem; }
.prose p { margin: 1rem 0; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.7rem); margin: 2.25rem 0 0.75rem; }
.prose h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }
.prose ul, .prose ol { margin: 1rem 0 1rem 1.25rem; display: grid; gap: 0.5rem; }
.prose li { padding-left: 0.25rem; }
.prose strong { font-weight: 600; }
.prose blockquote { margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.1rem; border-left: 2px solid var(--gold); color: var(--muted); font-style: normal; }
.prose a.link { color: var(--gold-deep); text-decoration: none; border-bottom: 1px solid var(--border); }
.prose a.link:hover { border-color: var(--gold); }

/* 评分卡（横评/测评用） */
.scorecard { display: grid; gap: 1rem; max-width: 760px; }
.score-row { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 1rem; }
@media (max-width: 560px) { .score-row { grid-template-columns: 96px 1fr 40px; } }
.score-row .lbl { font-weight: 500; font-size: 0.96rem; }
.score-row .meter { height: 8px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.score-row .meter i { display: block; height: 100%; border-radius: 999px; background: var(--gold); transform-origin: left; transform: scaleX(var(--v)); animation: grow 0.9s var(--ease) both; }
.score-row .v { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@keyframes grow { from { transform: scaleX(0); } }

/* 对比表 */
.ctable { width: 100%; max-width: 860px; border-collapse: collapse; font-size: 0.95rem; }
.ctable th, .ctable td { text-align: left; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.ctable thead th { color: var(--muted); font-weight: 600; border-bottom: 2px solid var(--border); }
.ctable tbody th { font-weight: 600; white-space: nowrap; }
.ctable td { font-variant-numeric: tabular-nums; }
.ctable tr:hover td, .ctable tr:hover th { background: var(--surface); }

/* 优缺点两栏 */
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 2.5rem); max-width: 860px; }
@media (max-width: 640px) { .pc { grid-template-columns: 1fr; } }
.pc h3 { font-family: var(--font-sans); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); margin-bottom: 0.9rem; }
.pc ul { list-style: none; display: grid; gap: 0.7rem; }
.pc li { display: grid; grid-template-columns: 18px 1fr; gap: 0.6rem; align-items: start; font-size: 0.97rem; }
.pc li svg { width: 17px; height: 17px; margin-top: 0.25rem; }
.pc .pro svg { color: var(--pos); }
.pc .con svg { color: var(--neg); }

/* CTA 按钮 */
.cta { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--gold-cta); color: #fff; font-weight: 600;
  padding: 0.8rem 1.5rem; border-radius: var(--radius-sm); text-decoration: none;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease); }
.cta:hover { background: #774d05; transform: translateY(-1px); }
.cta svg { width: 18px; height: 18px; }

/* 相关文章卡片行 */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }
.card { display: block; text-decoration: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; transition: border-color 0.15s var(--ease), transform 0.15s var(--ease); }
.card:hover { border-color: #d4d4d8; transform: translateY(-2px); }
.card .kt { font-size: 0.78rem; font-weight: 600; color: var(--gold-deep); }
.card .tt { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; margin: 0.4rem 0 0.3rem; color: var(--ink); }
.card .ds { font-size: 0.92rem; color: var(--muted); }

/* 来源 */
.sources { display: grid; gap: 0.65rem; max-width: 840px; list-style: none; }
.sources li { font-size: 0.95rem; line-height: 1.5; }
.sources a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); }
.sources a:hover { border-color: var(--gold); color: var(--gold-deep); }
.sources .src-tag { color: var(--muted); font-size: 0.84rem; margin-left: 0.45rem; }

/* 页脚 */
footer { border-top: 1px solid var(--border); padding-block: 2.5rem; color: var(--muted); font-size: 0.88rem; margin-top: 1rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .nav a, .entry .go, .tab-btn, .cta, .card, .score-row .meter i { transition: none; animation: none; }
}
