/* ============================================================
 * Craft Tools · 设计变量
 * ------------------------------------------------------------
 * 视觉身份：暖纸墨黑 + 锻造金。
 * 交互色用墨黑（按钮/激活态），金色只做强调与品牌点缀，
 * 避免上一版那种「到处是苹果蓝」的观感。
 * ============================================================ */

:root {
    color-scheme: light;

    /* 纸与墨 */
    --bg: #f3f0ea;
    --bg-deep: #e8e4db;
    --surface: #ffffff;
    --surface-2: #faf8f4;
    --surface-3: #f0ece4;
    --ink: #16181d;
    --ink-soft: #2b2f36;
    --text: #1a1d22;
    --muted: #6b7079;
    --faint: #9ba0a8;
    --line: #e2dcd1;
    --line-strong: #d2cabb;

    /* 金 */
    --gold: #b8862b;
    --gold-bright: #d4a843;
    --gold-pale: #f0d78c;
    --gold-wash: rgba(184, 134, 43, 0.12);

    /* 功能色 */
    --accent: #16181d;
    --accent-ink: #ffffff;
    --accent-soft: rgba(22, 24, 29, 0.07);
    --danger: #b3372b;
    --danger-soft: rgba(179, 55, 43, 0.09);
    --ok: #1f7a4d;

    /* 阴影（暖调，不用纯黑） */
    --sh-1: 0 1px 2px rgba(60, 45, 20, 0.06);
    --sh-2: 0 6px 20px rgba(60, 45, 20, 0.09);
    --sh-3: 0 22px 60px rgba(40, 30, 10, 0.18);

    /* 形状 */
    --r-xs: 7px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 999px;

    --gap: 12px;
    --pad: 24px;
    --appbar-h: 64px;
    --tabs-h: 44px;

    /* 字号 */
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-md: 1rem;
    --fs-lg: 1.125rem;

    /* 动效 */
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --fast: 0.16s;
    --med: 0.28s;

    --font: "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC",
        "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono",
        Menlo, Consolas, monospace;

    /* ---- 液态玻璃 ---- */
    --glass-a: rgba(255, 255, 255, 0.66);
    --glass-b: rgba(255, 255, 255, 0.28);
    --glass-c: rgba(255, 255, 255, 0.5);
    --glass-edge: rgba(255, 255, 255, 0.75);
    --glass-glow: rgba(255, 255, 255, 0.95);
    --glass-shadow: 0 10px 34px rgba(60, 45, 20, 0.16);
    --fringe-a: rgba(120, 190, 255, 0.32);
    --fringe-b: rgba(255, 170, 120, 0.26);
}

[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0b0c0e;
    --bg-deep: #060708;
    --surface: #14161a;
    --surface-2: #1a1d22;
    --surface-3: #20242b;
    --ink: #ece9e3;
    --ink-soft: #f5f3ee;
    --text: #ece9e3;
    --muted: #9aa0a8;
    --faint: #666c74;
    --line: #262a31;
    --line-strong: #333842;

    --gold: #e0be5a;
    --gold-bright: #f0d78c;
    --gold-pale: #f7e7b8;
    --gold-wash: rgba(224, 190, 90, 0.14);

    --accent: #ece9e3;
    --accent-ink: #0b0c0e;
    --accent-soft: rgba(236, 233, 227, 0.08);
    --danger: #e0685c;
    --danger-soft: rgba(224, 104, 92, 0.14);
    --ok: #4cba82;

    --sh-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --sh-2: 0 8px 24px rgba(0, 0, 0, 0.55);
    --sh-3: 0 24px 60px rgba(0, 0, 0, 0.75);

    --glass-a: rgba(38, 42, 50, 0.62);
    --glass-b: rgba(255, 255, 255, 0.05);
    --glass-c: rgba(90, 98, 110, 0.3);
    --glass-edge: rgba(255, 255, 255, 0.14);
    --glass-glow: rgba(255, 255, 255, 0.28);
    --glass-shadow: 0 10px 34px rgba(0, 0, 0, 0.6);
    --fringe-a: rgba(90, 160, 255, 0.24);
    --fringe-b: rgba(255, 150, 90, 0.2);
}

/* 字号整体缩放 */
html { font-size: var(--fs-base, 16px); }
html[data-font="small"] { --fs-base: 15px; }
html[data-font="medium"] { --fs-base: 16px; }
html[data-font="large"] { --fs-base: 17.5px; }

/* 卡片密度 */
html[data-density="compact"]   { --gap: 8px;  --card-pad: 0.85rem; }
html[data-density="comfortable"] { --gap: 12px; --card-pad: 1.05rem; }
html[data-density="spacious"]  { --gap: 18px; --card-pad: 1.3rem; }
