thread-master/apps/web/src/styles/tokens.css

185 lines
7.1 KiB
CSS
Raw Normal View History

2026-07-10 05:10:31 +00:00
/**
2026-07-20 06:33:14 +00:00
* 巡樓 · Lapras Harbor Desk UI
2026-07-30 01:25:34 +00:00
* pale blue 主色 / cream 次色 / burnt orange 點綴Pokémon Palette
* 字體Inter + Taipei Sans TC
*
* 唯一真相顏色字級間距只在這個檔案定義其他 css tsx 一律吃 var()
* 不寫死色碼與 font-size 否則深淺模式會有一半的畫面不跟著切
* `npm run check:tokens` 把關
*
* 命名規則
* X 當填色底色邊框
* X-on 疊在 X 底色上的文字
* X-soft hover淡底
* X-deep 把該色當文字放在頁面或卡片底色上的深一階只有本身對比不足的
* 顏色才有brand / danger / warningsuccess 自己就過 AA
* 主色是淺藍當文字只有 1.9:1所以主色當文字一律走 --hb-brand-deep
* --hb-subtle 只有 3.8:1僅供裝飾與 18px 以上大字勿用於內文
*
* 兩條防髒規則
* 1. 不要把兩個有彩度的顏色互相 color-mix(H187)配橘(H32)是補色
* 混出來一定是濁褐要調淡就跟 surfacelinetransparent 要一深一淺的
* 同一顏色就用 X X-deep
* 2. 中性色bg / surface / line / muted / subtle全部維持 H180-191 的冷青
* ink 與主色同溫palette 原本的 muted H=44 的暖褐疊在偏冷的白底上
* 會整片發黃發濁暖色只出現在刻意的強調上warningaccent方案金標
2026-07-10 05:10:31 +00:00
*/
:root {
color-scheme: light;
2026-07-20 06:33:14 +00:00
--hb-bg: #fcfdfd;
--hb-surface: rgba(255, 255, 255, 0.9);
2026-07-10 05:10:31 +00:00
--hb-surface-solid: #ffffff;
2026-07-30 01:25:34 +00:00
--hb-surface-muted: #f2f6f6;
--hb-ink: #152628;
--hb-text: #152628;
--hb-fg: #152628;
--hb-ink-secondary: #33474a;
--hb-muted: #566869; /* 5.8:1 於 bg、5.4:1 於 surface-muted */
--hb-subtle: #748687; /* 3.8:1 — 裝飾/大字限定 */
--hb-line: color-mix(in srgb, #e0e9eb 88%, transparent);
--hb-line-strong: #e0e9eb;
--hb-scrim: rgb(21 38 40 / 0.55);
--hb-brand: #8bc5cd;
--hb-brand-hover: #76b8c1;
--hb-brand-soft: color-mix(in srgb, #8bc5cd 20%, #ffffff);
--hb-brand-on: #0a0a0a; /* 10.3:1 於 brand */
--hb-brand-deep: #2d5f66; /* 7.0:1 於 bg主色當文字時用 */
--hb-magic: #fee5a1; /* 次色奶油黃:只當淡底與裝飾 */
--hb-magic-glow: rgb(139 197 205 / 0.2);
--hb-focus: #2d5f66;
--hb-success: #2f7d3f; /* 純綠 H=135與 brand-deep 的青藍明顯分開 */
--hb-success-soft: #eaf4ec;
--hb-success-on: #ffffff; /* 5.2:1 */
2026-07-20 06:33:14 +00:00
--hb-danger: #ef4444;
2026-07-30 01:25:34 +00:00
--hb-danger-soft: #fdecec;
--hb-danger-on: #0a0a0a; /* 5.3:1白字只有 3.8:1 */
--hb-danger-deep: #c0392b; /* 5.3:1 於 bg */
--hb-warning: #b96b1c;
--hb-warning-soft: #fbf1e3;
--hb-warning-on: #0a0a0a; /* 4.9:1白字只有 4.1:1 */
--hb-warning-deep: #a35d16; /* 5.1:1 於白卡 */
--hb-accent-warm: #b96b1c; /* 與 warning 同色palette 只有這一個暖點綴 */
/* 畫布極光:主色的暗一階,只用來鋪背景 */
--hb-brand-dim: #6f9ba3;
--hb-aurora-1: color-mix(in srgb, #8bc5cd 20%, transparent);
--hb-aurora-2: color-mix(in srgb, #8bc5cd 11%, transparent);
--hb-aurora-3: color-mix(in srgb, #6f9ba3 12%, transparent);
/* 付費方案的金色字光(裝飾用,不當文字色) */
--hb-gold: #d9a531;
--hb-gold-bright: #fee5a1;
2026-07-20 06:33:14 +00:00
--hb-radius: 0.8rem;
--hb-radius-lg: 1rem;
--hb-radius-xl: 1.15rem;
2026-07-10 05:10:31 +00:00
--hb-radius-pill: 9999px;
--hb-shadow-card:
0 0 0 1px color-mix(in srgb, var(--hb-line-strong) 70%, transparent),
2026-07-30 01:25:34 +00:00
0 1px 2px rgb(21 38 40 / 0.04),
0 9px 28px rgb(21 38 40 / 0.06);
2026-07-10 05:10:31 +00:00
--hb-shadow-soft: 0 4px 18px var(--hb-magic-glow);
2026-07-30 01:25:34 +00:00
--hb-shadow-float: 0 16px 48px rgb(21 38 40 / 0.12);
--hb-shadow-glow: 0 0 24px rgb(139 197 205 / 0.4);
2026-07-10 05:10:31 +00:00
--hb-font-sans: "Inter", "Taipei Sans TC", system-ui, -apple-system, "Segoe UI",
"Noto Sans TC", sans-serif;
--hb-font-en: "Inter", system-ui, -apple-system, sans-serif;
2026-07-30 01:25:34 +00:00
--hb-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
2026-07-10 05:10:31 +00:00
2026-07-30 01:25:34 +00:00
/* 字階只有這 7 之間沒有中間值 0.8 / 0.82 / 0.85 併存看不出差別
只會讓整頁失去節奏輸入框維持 16px 避免 iOS 聚焦時縮放 */
--hb-text-2xs: 0.75rem; /* 12px · badge極小 meta */
2026-07-10 05:10:31 +00:00
--hb-text-xs: 0.8125rem; /* 13px · 次要 meta */
2026-07-20 06:33:14 +00:00
--hb-text-sm: 0.875rem; /* 14px · 按鈕/輔助 */
--hb-text-base: 1rem; /* 16px · 內文 */
--hb-text-lg: 1.125rem; /* 18px · 卡片標題 */
--hb-text-xl: 1.375rem; /* 22px · 頁標題 */
2026-07-30 01:25:34 +00:00
--hb-text-2xl: 1.75rem; /* 28px · 登入/定價大標 */
2026-07-10 05:10:31 +00:00
--hb-text-input: 1rem; /* 16px · 表單 */
--hb-space-1: 0.25rem;
--hb-space-2: 0.5rem;
--hb-space-3: 0.75rem;
--hb-space-4: 1rem;
--hb-space-5: 1.25rem;
--hb-space-6: 1.5rem;
--hb-space-8: 2rem;
--hb-space-10: 2.5rem;
--hb-gap-tight: 0.5rem; /* 列內小元件 */
2026-07-20 06:33:14 +00:00
--hb-gap-inline: 0.625rem; /* 同列按鈕、chip */
--hb-gap-stack: 0.8rem; /* 表單欄位、stack 預設 */
--hb-gap-block: 1.05rem; /* 卡片內大段 */
--hb-gap-section: 1.3rem; /* 頁面區塊與區塊 */
--hb-gap-page: 1.75rem; /* 頁面上下大留白(桌面) */
2026-07-10 05:10:31 +00:00
--hb-touch: 2.75rem;
--hb-sidebar-width: 15rem;
--hb-topbar-height: 3.6rem;
--hb-dock-height: 3.85rem;
}
/**
2026-07-30 01:25:34 +00:00
* Dark冷灰藍畫布暖褐色作為 muted palette --muted 就是暖色
* 深底下亮色本身對比就夠所以 -deep 反而是更亮的一階
2026-07-10 05:10:31 +00:00
*/
[data-theme="dark"] {
color-scheme: dark;
2026-07-30 01:25:34 +00:00
--hb-bg: #141a1a;
--hb-surface: rgba(27, 38, 39, 0.9);
--hb-surface-solid: #1b2627;
--hb-surface-muted: #243132;
--hb-ink: #f4f6f6;
--hb-text: #f4f6f6;
--hb-fg: #f4f6f6;
--hb-ink-secondary: #d3dcdc;
--hb-muted: #a9b7b7; /* 8.5:1 */
--hb-subtle: #8b9a9a; /* 6.0:1 */
--hb-line: color-mix(in srgb, #2d4143 92%, transparent);
--hb-line-strong: #2d4143;
--hb-scrim: rgb(0 0 0 / 0.66);
--hb-brand: #89c5cd;
--hb-brand-hover: #a3d4da;
--hb-brand-soft: color-mix(in srgb, #89c5cd 14%, #1b2627);
--hb-brand-on: #0a0a0a; /* 10.3:1 */
--hb-brand-deep: #b7e3e8;
--hb-magic: #fee59f;
--hb-magic-glow: rgb(137 197 205 / 0.18);
--hb-focus: #89c5cd;
--hb-success: #74d189; /* 9.4:1純綠 */
--hb-success-soft: #16251a;
--hb-success-on: #0a0a0a;
2026-07-20 06:33:14 +00:00
--hb-danger: #dc2626;
--hb-danger-soft: #341919;
2026-07-30 01:25:34 +00:00
--hb-danger-on: #ffffff; /* 4.8:1 —— 深底的紅維持白字 */
--hb-danger-deep: #f87171; /* 5.6:1 於卡片;#ef4444 只有 4.1:1 */
--hb-warning: #e18c37; /* 6.7:1 */
--hb-warning-soft: #2f2416;
--hb-warning-on: #0a0a0a;
--hb-warning-deep: #e18c37; /* 深底不必再加深 */
--hb-accent-warm: #e18c37;
--hb-brand-dim: #7fb0b8;
--hb-aurora-1: color-mix(in srgb, #89c5cd 14%, transparent);
--hb-aurora-2: color-mix(in srgb, #89c5cd 7%, transparent);
--hb-aurora-3: color-mix(in srgb, #7fb0b8 8%, transparent);
--hb-gold: #e1b84f;
--hb-gold-bright: #fee59f;
2026-07-10 05:10:31 +00:00
--hb-shadow-card:
2026-07-30 01:25:34 +00:00
0 0 0 1px color-mix(in srgb, #2d4143 90%, transparent),
2026-07-10 05:10:31 +00:00
0 10px 36px rgb(0 0 0 / 0.45);
--hb-shadow-soft: 0 4px 22px var(--hb-magic-glow);
--hb-shadow-float: 0 20px 56px rgb(0 0 0 / 0.55);
2026-07-30 01:25:34 +00:00
--hb-shadow-glow: 0 0 32px rgb(137 197 205 / 0.28);
2026-07-10 05:10:31 +00:00
}