/* === base.css · 设计令牌与全局基础 === */
:root {
  /* 色彩 · 以"雾白 + 清冷电影感"为基调，全部满足 WCAG AA */
  --bg: #F2F2EF;        /* 雾白底 */
  --bg-2: #E4E4E0;      /* 胶片背面，与 bg 有明显差别 */
  --fg: #1F1F1F;        /* 主文字 · 对 bg 约 14:1 */
  --fg-2: #595956;      /* 次文字 · 对 bg 约 7.5:1（原 #8A8A88 仅 3:1） */
  --fg-3: #8A8A86;      /* 仅用于超大字号或装饰性文字 */
  --line: #BFBFBA;      /* 描边/分隔 · 从 D9 加深为 BF，胶片轮廓明确 */
  --line-soft: #D6D6D2; /* 软分隔 */
  --accent: #6E4F2E;    /* 暖棕·加深后在雾白上 约 6.5:1 */

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "HarmonyOS Sans SC", "Noto Sans SC", "Helvetica Neue", Helvetica, Arial,
    system-ui, sans-serif;

  /* 间距 */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 40px;
  --s-7: 64px;
  --s-8: 96px;

  /* 圆角 / 阴影 */
  --radius-sm: 2px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.06);

  /* 缓动 */
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-1: 200ms;
  --dur-2: 400ms;
  --dur-3: 600ms;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

a {
  color: inherit;
}

/* [hidden] 高优先级隐藏：避免被组件的 display:flex 覆盖 */
[hidden] {
  display: none !important;
}

/* 键盘聚焦可见 */
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 视觉隐藏（仅辅助技术可见） */
.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;
}

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