/* 黎墨观隅 设计令牌：色彩取自门店效果图（清水混凝土、亚麻纱帘、胡桃木、赭色夯土墙、纸灯）。
   对比度（WCAG）：墨/纸 13.9:1，赭/纸 5.5:1，石墨/纸 5.9:1，石墨/麻 5.3:1。 */
:root {
  --paper: #F4EFE7;      /* 纸：页面底色 */
  --linen: #EAE2D6;      /* 麻：卡片、分区 */
  --stone: #C3B8A7;      /* 石：边框、占位 */
  --stone-ink: #6B5845;  /* 石墨：次要文字 */
  --ink: #2A2018;        /* 墨：正文、主按钮 */
  --walnut: #4A3421;     /* 胡桃：标题强调 */
  --ochre: #8A5226;      /* 赭：点缀、选中 */
  --lamp: #D9B07E;       /* 灯：极少量高光 */
  --danger: #8E3B2A;
  --ok: #4F5E3A;
  --line: rgba(42, 32, 24, 0.14);

  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;

  --radius: 2px;
  --gap: 16px;
  --fs: 15px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--fs)/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; color: var(--walnut); letter-spacing: 0.04em; }
h1 { font-size: 24px; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0 0 8px; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.muted { color: var(--stone-ink); }
.small { font-size: 13px; }
.price { font-family: var(--serif); color: var(--ink); }
.price s { color: var(--stone-ink); font-size: 0.85em; margin-left: 6px; }

button, .btn {
  font: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 20px;
  border-radius: var(--radius); border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  cursor: pointer; text-decoration: none; letter-spacing: 0.08em;
}
button.ghost, .btn.ghost { background: transparent; color: var(--ink); }
button.quiet, .btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ochre); outline-offset: 2px;
}

input, select, textarea {
  font: inherit; color: var(--ink);
  width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--stone); border-radius: var(--radius); background: #FBF8F3;
}
textarea { min-height: 80px; resize: vertical; }
label { display: block; margin-bottom: 12px; }
label > span { display: block; font-size: 13px; color: var(--stone-ink); margin-bottom: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--stone-ink); }

.tag { display: inline-block; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 12px; line-height: 22px; color: var(--stone-ink); white-space: nowrap; }
.tag.ochre { border-color: var(--ochre); color: var(--ochre); }
.tag.ok { border-color: var(--ok); color: var(--ok); }
.tag.danger { border-color: var(--danger); color: var(--danger); }
.ai-label { position: absolute; left: 8px; bottom: 8px; background: rgba(42,32,24,.72); color: var(--paper); font-size: 12px; padding: 2px 8px; border-radius: var(--radius); }

.toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: var(--radius);
  font-size: 14px; z-index: 100; max-width: calc(100vw - 32px);
}
.empty { text-align: center; padding: 48px 16px; color: var(--stone-ink); font-family: var(--serif); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fade 0.4s ease-out; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
