-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththeme.css
More file actions
302 lines (258 loc) Β· 9.13 KB
/
Copy paththeme.css
File metadata and controls
302 lines (258 loc) Β· 9.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
/* ----------------------------------------------------------------------------
Typed Korean Playground β global theme Β· "Dancheong" (λ¨μ² / δΊζΉθ²)
Korean obangsaek polychrome: warm hanji paper, dark ink, a ζ±δΈΉ vermilion accent.
Tailwind v4 is the styling system. The design tokens stay as CSS custom
properties (the source of truth, light in :root and dark in
:root[data-theme="dark"]) and are mapped into Tailwind's theme with
`@theme inline`, so utilities like `bg-sakura-500` / `text-ink-900` resolve to
those vars and dark mode works with no `dark:` variants.
---------------------------------------------------------------------------- */
@import "tailwindcss";
/* Dark mode is driven by <html data-theme="dark"> (set by the no-flash script in
index.html), not by the OS β so register a custom `dark` variant for it. */
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
/* ---- raw design tokens ---------------------------------------------------- */
:root {
color-scheme: light;
/* sakura β now a ζ±δΈΉ vermilion ramp, scaled from a faint wash (50) to deep (600) */
--sakura-50: #fbf1ee;
--sakura-100: #f7e2dd;
--sakura-200: #efc2bb;
--sakura-300: #e3978d;
--sakura-400: #d66a5f;
--sakura-500: #c8443c; /* accent β buttons, active state */
--sakura-600: #a8322c; /* deeper β links, hover, headings */
/* ink β primary text down to faint hairlines */
--ink-900: #241f1c;
--ink-700: #4a423b;
--ink-500: #837a6e;
--ink-300: #b0a594;
/* hanji surfaces */
--paper: #f7f4ee;
--surface: #fffdf8;
--surface-2: #f0ebe0;
--border: #e6ddcd;
--border-strong: #d8ccb5;
/* semantic */
--ok: #2f8f5f;
--err: #b51e2b;
--ok-soft: #e7f4ec;
--err-soft: #fbeaec;
--accent: var(--sakura-500);
--on-accent: #ffffff; /* text/icon on a vermilion-filled surface */
--ring: var(--sakura-100); /* focus halo */
--code-bg: #f3ece0; /* code / editor chrome backdrop */
/* grammar-category accents (composition tree) β obangsaek-flavored */
--cat-phrase: #c8443c;
--cat-conjugation: #9b59b6;
--cat-verb: #2f6f9f;
--cat-adjective: #3f8f5f;
--cat-noun: #c08a1f;
--cat-adverb: #2f8f8f;
--cat-particle: #7b5bd6;
--cat-form: #0f8a8a;
--cat-demonstrative: #5a7a2f;
--cat-interrogative: #d8602a;
--cat-adnominal: #4a7a8a;
--cat-numeral: #b07a2f;
--cat-literal: #837a6e;
--cat-other: #837a6e;
--radius: 14px;
--radius-sm: 9px;
--shadow-sm: 0 1px 2px rgba(36, 31, 28, 0.06);
--shadow-md: 0 8px 28px rgba(200, 68, 60, 0.12);
--shadow-drawer: -12px 0 40px rgba(200, 68, 60, 0.14);
--scrim: rgba(36, 31, 28, 0.30);
/* page backdrop β soft glows drifting off two corners of the hanji */
--bg-glow-1: rgba(247, 226, 221, 0.9);
--bg-glow-2: rgba(216, 165, 47, 0.18);
/* Textbook type. Korean text uses a Korean serif (Gowun Batang / Nanum
Myeongjo); the UI keeps LXGW WenKai (ιιΉζζ₯·, ζ₯·δ½) for Chinese coverage
with a Korean serif fallback. Loaded in index.html. */
--font-jp: "Gowun Batang", "Nanum Myeongjo", "Noto Serif KR", serif;
--font-ui: "LXGW WenKai Screen", "Noto Serif KR", "Noto Serif SC", serif;
--font-heading: "LXGW WenKai Screen", "Noto Serif KR", "Noto Serif SC", serif;
--font-mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}
:root[data-theme="dark"] {
color-scheme: dark;
/* sakura in dark β the scale inverts: 50 is the deepest fill, 600 the
brightest. 500 stays the accent, now light enough to read on dark ink. */
--sakura-50: #2a1a17;
--sakura-100: #3a221e;
--sakura-200: #5e342e;
--sakura-300: #8a4a42;
--sakura-400: #d66a5f;
--sakura-500: #e07a6f; /* accent */
--sakura-600: #e89488; /* lighter hover / links / headings */
--ink-900: #f2ece0;
--ink-700: #d8cfc0;
--ink-500: #a89e8c;
--ink-300: #7a7160;
--paper: #1a1714; /* ink night */
--surface: #232019;
--surface-2: #2d2920;
--border: #3a342a;
--border-strong: #4d4636;
--ok: #4cc08c;
--err: #f0788a;
--ok-soft: #18302a;
--err-soft: #34201f;
--on-accent: #241f1c; /* dark ink on a light vermilion fill */
--ring: #5e342e;
--code-bg: #1f1c16;
/* category accents β lightened / desaturated to stay legible on #1a1714 */
--cat-phrase: #ec8a82;
--cat-conjugation: #c79bd8;
--cat-verb: #7aa9ec;
--cat-adjective: #5cc79a;
--cat-noun: #e0b857;
--cat-adverb: #5fb5b5;
--cat-particle: #a48ce8;
--cat-form: #4fb5b5;
--cat-demonstrative: #a3bd6f;
--cat-interrogative: #ec9a6a;
--cat-adnominal: #7fb0c2;
--cat-numeral: #d8a85f;
--cat-literal: #a89e8c;
--cat-other: #a89e8c;
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
--shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
--shadow-drawer: -12px 0 40px rgba(0, 0, 0, 0.5);
--scrim: rgba(0, 0, 0, 0.55);
--bg-glow-1: rgba(224, 122, 111, 0.08);
--bg-glow-2: rgba(216, 165, 47, 0.07);
}
/* ---- map tokens into Tailwind's theme (dark-aware via the vars above) ----- */
@theme inline {
--color-sakura-50: var(--sakura-50);
--color-sakura-100: var(--sakura-100);
--color-sakura-200: var(--sakura-200);
--color-sakura-300: var(--sakura-300);
--color-sakura-400: var(--sakura-400);
--color-sakura-500: var(--sakura-500);
--color-sakura-600: var(--sakura-600);
--color-ink-900: var(--ink-900);
--color-ink-700: var(--ink-700);
--color-ink-500: var(--ink-500);
--color-ink-300: var(--ink-300);
--color-paper: var(--paper);
--color-surface: var(--surface);
--color-surface-2: var(--surface-2);
--color-border: var(--border);
--color-border-strong: var(--border-strong);
--color-code-bg: var(--code-bg);
--color-ok: var(--ok);
--color-err: var(--err);
--color-ok-soft: var(--ok-soft);
--color-err-soft: var(--err-soft);
--color-accent: var(--accent);
--color-on-accent: var(--on-accent);
--color-ring: var(--ring);
--color-scrim: var(--scrim);
--color-cat-phrase: var(--cat-phrase);
--color-cat-conjugation: var(--cat-conjugation);
--color-cat-verb: var(--cat-verb);
--color-cat-adjective: var(--cat-adjective);
--color-cat-noun: var(--cat-noun);
--color-cat-adverb: var(--cat-adverb);
--color-cat-particle: var(--cat-particle);
--color-cat-form: var(--cat-form);
--color-cat-demonstrative: var(--cat-demonstrative);
--color-cat-interrogative: var(--cat-interrogative);
--color-cat-adnominal: var(--cat-adnominal);
--color-cat-numeral: var(--cat-numeral);
--color-cat-literal: var(--cat-literal);
--color-cat-other: var(--cat-other);
--font-jp: var(--font-jp);
--font-ui: var(--font-ui);
--font-heading: var(--font-heading);
--font-mono: var(--font-mono);
--font-sans: var(--font-ui);
--radius-card: var(--radius);
--radius-field: var(--radius-sm);
--shadow-card: var(--shadow-sm);
--shadow-pop: var(--shadow-md);
--shadow-drawer: var(--shadow-drawer);
}
/* ---- base ----------------------------------------------------------------- */
@layer base {
html,
body,
#root {
height: 100%;
margin: 0;
}
body {
font-family: var(--font-ui);
color: var(--ink-900);
background:
radial-gradient(1200px 500px at 100% -10%, var(--bg-glow-1), transparent 60%),
radial-gradient(900px 500px at -10% 110%, var(--bg-glow-2), transparent 55%),
var(--paper);
/* Anchor the glows to the viewport so they don't tile into a visible seam
every screen-height as the page scrolls. */
background-repeat: no-repeat;
background-attachment: fixed;
-webkit-font-smoothing: antialiased;
transition: background-color 0.2s ease, color 0.2s ease;
}
:lang(ko),
.jp {
font-family: var(--font-jp);
}
}
/* ---- shared component primitives (used across feature components) --------- */
@layer components {
.tj-card {
@apply bg-surface border border-border rounded-card shadow-card;
}
.tj-panel-title {
@apply m-0 mb-1 text-[1.05rem] font-bold text-ink-900;
}
.tj-subtle {
@apply text-ink-500 text-[0.86rem];
}
.tj-label {
@apply block text-[0.72rem] font-bold uppercase text-ink-500 mb-1.5;
letter-spacing: 0.04em;
}
.tj-select,
.tj-input {
@apply w-full px-3 py-[9px] text-[0.95rem] text-ink-900 bg-surface
border border-border-strong rounded-field outline-none;
font-family: inherit;
transition: border-color 0.15s, box-shadow 0.15s;
}
.tj-select:focus,
.tj-input:focus {
@apply border-sakura-400;
box-shadow: 0 0 0 3px var(--ring);
}
.tj-btn {
@apply inline-flex items-center gap-1.5 px-[14px] py-2 text-[0.9rem]
font-semibold text-ink-700 bg-surface border border-border-strong
rounded-full cursor-pointer;
transition: all 0.15s;
}
.tj-btn:hover {
@apply border-sakura-400 text-sakura-600;
}
.tj-btn--primary {
@apply text-on-accent bg-sakura-500 border-sakura-500;
}
.tj-btn--primary:hover {
@apply bg-sakura-600 border-sakura-600 text-on-accent;
}
.tj-chip {
@apply inline-flex items-center gap-1.5 px-2.5 py-1 text-[0.78rem]
font-semibold rounded-full bg-surface-2 text-sakura-600 border border-border;
}
.tj-result {
@apply font-jp text-[1.6rem] font-bold text-sakura-600;
}
.tj-code {
@apply font-mono text-[0.85rem] bg-surface-2 border border-border
rounded-field px-[7px] py-0.5 text-ink-700;
}
}