/* ============================================================
   GPT-Image-2 Prompt Gallery · 设计令牌（单一真源）
   两个页面共用；各页 CSS 中的 :root 只保留「旧变量名 → 新令牌」映射。
   ============================================================ */
:root {
    /* ── 颜色 ───────────────────────────────────────────── */
    --ink: #0B0B0C;
    --ink-2: #3F4046;
    --muted: #6B6C72;          /* on #fff = 5.23:1，满足 WCAG AA */
    --surface: #FFFFFF;
    --surface-soft: #F5F5F3;
    --canvas: #FAFAFB;
    --line: #E6E3DC;
    --line-strong: #D3CFC6;
    --overlay: rgba(11, 11, 12, .62);

    /* 品牌金：只用于「生成」与高价值强调，避免稀释 */
    --accent: #C9A227;
    --accent-ink: #8A6512;     /* on #fff = 5.32:1，用于文字 */
    --accent-soft: #F7EFDD;

    --success: #0F7B4F;
    --danger: #D92D20;
    --danger-soft: #FEF2F2;
    --link: #1D4ED8;

    /* ── 字体 ───────────────────────────────────────────── */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Cascadia Code", "Courier New", monospace;

    --fs-display: clamp(2rem, 3.6vw, 3.5rem);
    --fs-h2: 1.75rem;
    --fs-h3: 1.25rem;
    --fs-body: .9375rem;
    --fs-meta: .8125rem;

    /* ── 间距（8 点网格）───────────────────────────────── */
    --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
    --s-6: 24px; --s-8: 32px; --s-12: 48px; --s-16: 64px;

    /* ── 形状与高度 ─────────────────────────────────────── */
    --r-control: 8px;
    --r-input: 12px;
    --r-card: 16px;
    --r-panel: 24px;
    --r-pill: 999px;
    --hit: 44px;               /* 最小触控命中区 */

    /* ── 阴影（只用三级）───────────────────────────────── */
    --shadow-1: 0 1px 2px rgba(16, 15, 12, .04);
    --shadow-2: 0 8px 24px rgba(16, 15, 12, .08);
    --shadow-3: 0 24px 60px rgba(16, 15, 12, .16);

    /* ── 动效 ───────────────────────────────────────────── */
    --t-fast: 150ms ease;
    --t-normal: 240ms cubic-bezier(.16, 1, .3, 1);
}

/* 统一焦点环：两页一致 */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

/* 统一降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
