/* ============================================================
   Like Memo · Apple 风格 — S1 Design Tokens
   基于 Apple HIG + Liquid Glass (WWDC25)
   ============================================================ */

:root {
  /* —— 颜色：语义化 —— */
  --sys-blue: #007AFF;
  --sys-blue-dark: #0A84FF;
  --label: #1D1D1F;
  --label-2: #48484A;
  --label-3: #8E8E93;
  --sys-gray-6: #F2F2F7;
  --sys-gray-5: #E5E5EA;

  /* —— 玻璃材质 —— */
  --glass-fill: rgba(255, 255, 255, 0.42);   /* 30–45% 白 */
  --glass-blur: blur(26px) saturate(170%);
  --glass-blur-sm: blur(14px) saturate(160%);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-edge-hi: inset 0 1px 0 rgba(255, 255, 255, 0.6);  /* 顶部高光 */

  /* —— 圆角：同心系统 —— */
  --r-xl: 22px;   /* 外层容器（Dock/菜单栏） */
  --r-lg: 16px;   /* 卡片 */
  --r-md: 12px;   /* 按钮/小组件 */
  --r-sm: 8px;    /* 胶囊内 */
  --r-pill: 999px;

  /* —— 阴影 —— */
  --shadow-float: 0 10px 30px rgba(40, 70, 120, 0.14);
  --shadow-card: 0 1px 8px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.09);
  --shadow-window: 0 20px 60px rgba(0, 0, 0, 0.18);

  /* —— 陶土质感：分层柔和阴影（暖棕色调，上光下影） —— */
  --shadow-clay-window:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(90, 70, 50, 0.06),
    0 1px 2px rgba(90, 70, 50, 0.06),
    0 12px 32px rgba(90, 70, 50, 0.10),
    0 32px 80px rgba(90, 70, 50, 0.16);
  --shadow-clay-dock:
    inset 0 1px 0 rgba(255, 255, 255, 0.80),
    inset 0 -1px 0 rgba(90, 70, 50, 0.05),
    0 2px 6px rgba(90, 70, 50, 0.08),
    0 16px 40px rgba(90, 70, 50, 0.16);
  --shadow-clay-dot:
    inset 0 2px 3px rgba(255, 255, 255, 0.55),
    inset 0 -2px 4px rgba(0, 0, 0, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.22);

  /* —— 字体：Apple 栈 —— */
  --font-sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "IBM Plex Mono", monospace;

  /* —— 字号层级 —— */
  --fs-hero: clamp(48px, 8vw, 96px);
  --fs-title: 28px;
  --fs-head: 20px;
  --fs-body: 16px;
  --fs-callout: 14px;
  --fs-cap: 12px;

  /* —— 动效曲线 —— */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ios: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur-fast: 0.2s;
  --dur-med: 0.35s;

  /* —— 壁纸 —— */
  --wallpaper: linear-gradient(180deg, #a8c5e8 0%, #d4e4f5 40%, #f0e8dc 100%);
}

/* —— 深色模式 —— */
[data-theme="dark"] {
  --label: #F5F5F7;
  --label-2: #AEAEB2;
  --label-3: #636366;
  --sys-gray-6: #1C1C1E;
  --sys-gray-5: #2C2C2E;
  --glass-fill: rgba(30, 30, 32, 0.5);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-edge-hi: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-clay-window:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.30),
    0 1px 2px rgba(0, 0, 0, 0.30),
    0 12px 32px rgba(0, 0, 0, 0.40),
    0 32px 80px rgba(0, 0, 0, 0.55);
  --shadow-clay-dock:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.30),
    0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-clay-dot:
    inset 0 2px 3px rgba(255, 255, 255, 0.45),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),
    0 1px 3px rgba(0, 0, 0, 0.40);
  --wallpaper: linear-gradient(180deg, #1a2332 0%, #2a3444 40%, #3a3630 100%);
}

/* —— 基础重置 —— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--font-sys);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: light dark;
}

body {
  font-family: var(--font-sys);
  color: var(--label);
  background: var(--wallpaper);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
