/* 宫的工具 · 全站语义 Token
   页面只引用语义变量，不在组件中复制品牌色与断点。 */
:root {
  color-scheme: light;
  --color-bg: #f7f5f0;
  --color-bg-deep: #efede6;
  --color-surface: #ffffff;
  --color-surface-soft: #fbfaf7;
  --color-text: #1c2430;
  --color-text-soft: #374454;
  --color-text-muted: #56616d;
  --color-border: #dedfd8;
  --color-border-strong: #c9cdc5;
  --color-brand: #a47120;
  --color-brand-deep: #765114;
  --color-brand-soft: #f1e8d7;
  --color-proof: #277052;
  --color-proof-soft: #e8f2ec;
  --color-action: #182131;
  --color-action-hover: #27344a;
  --color-scan: #2563eb;
  --color-scan-soft: #eaf1ff;
  --color-gemroll: #c65f2c;
  --color-gemroll-soft: #fff0e6;
  --color-focus: #175cd3;
  --color-danger: #b42318;

  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: clamp(1.75rem, 3vw, 2.25rem);
  --text-display: clamp(2rem, 3.2vw, 2.4rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --radius-xs: 0.5rem;
  --radius-sm: 0.75rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.75rem;
  --radius-pill: 999px;
  --shadow-float: 0 2px 6px rgb(28 36 48 / 6%), 0 24px 60px -20px rgb(28 36 48 / 25%);
  --shadow-device: 0 30px 55px -25px rgb(28 36 48 / 38%), 0 8px 20px -10px rgb(28 36 48 / 20%);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 75rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --header-height: 5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 1.5rem); }
body {
  margin: 0;
  min-width: 20rem;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.drawer-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; }
p, h1, h2, h3, h4, ul, ol { margin: 0; }
ul, ol { padding: 0; }
button { border: 0; }
::selection { background: var(--color-brand-soft); color: var(--color-action); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
[hidden] { display: none !important; }

.container { width: min(100%, var(--container)); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 1000; top: 0.75rem; left: 0.75rem;
  padding: 0.65rem 1rem; border-radius: var(--radius-xs);
  background: var(--color-action); color: #fff; transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.button {
  min-height: 2.875rem; display: inline-flex; align-items: center; justify-content: center;
  gap: 0.55rem; padding: 0.72rem 1.2rem; border: 1px solid transparent;
  border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600;
  line-height: 1.35; cursor: pointer; transition: background-color 160ms, border-color 160ms, color 160ms;
}
.button:active { transform: translateY(0); }
.button--primary { background: var(--color-action); color: #fff; }
.button--primary:hover { background: var(--color-action-hover); }
.button--secondary { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); }
.button--secondary:hover { border-color: var(--color-text-muted); background: var(--color-surface-soft); }
.button--small { min-height: 2.75rem; padding: 0.6rem 1rem; }
.button .icon { width: 1.05rem; height: 1.05rem; }
.text-link {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.75rem;
  color: var(--color-text-soft); font-size: var(--text-sm); font-weight: 600;
  text-underline-offset: 0.25rem;
}
.text-link:hover { color: var(--color-brand-deep); text-decoration: underline; }
.text-link .icon { width: 1rem; height: 1rem; }
.eyebrow {
  display: inline-flex; align-items: center; color: var(--color-text-muted);
  font-size: var(--text-xs); font-weight: 600; line-height: 1.5;
}
.section-heading { max-width: 42rem; }
.section-heading h2 { margin-top: 0.85rem; font-size: var(--text-2xl); line-height: 1.25; letter-spacing: -0.035em; }
.section-heading p { margin-top: 0.85rem; color: var(--color-text-muted); line-height: 1.8; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
