forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiB5fcd955Burak Boduroğlu2 months ago730 commits

index.css758 lines, 25.9 KiBHistoryRawDownload
1@import 'tailwindcss';
2
3@plugin 'tailwindcss-animate';
4
5@custom-variant dark (&:is([data-kb-theme="dark"] *));
6
7/* Touch sizing: a phone-width screen or any coarse pointer. Width alone let a
8 phone turned to landscape (or a tablet) fall back to desktop density —
9 13px fields iOS zooms into and 26px buttons. Put `touch:` after the `sm:`
10 compact size it overrides; custom variants sort after the breakpoints. */
11@custom-variant touch {
12 @media (pointer: coarse) {
13 @slot;
14 }
15 @media (width < 40rem) {
16 @slot;
17 }
18}
19
20@utility container {
21 margin-inline: auto;
22 padding-inline: 1.25rem;
23 @media (width >= --theme(--breakpoint-sm)) {
24 max-width: none;
25 }
26 @media (width >= 1280px) {
27 max-width: 1280px;
28 }
29}
30
31@theme {
32 --font-sans:
33 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
34 sans-serif;
35
36 --color-border: hsl(var(--border));
37 --color-input: hsl(var(--input));
38 --color-ring: hsl(var(--ring));
39 --color-background: hsl(var(--background));
40 --color-foreground: hsl(var(--foreground));
41
42 --color-primary: hsl(var(--primary));
43 --color-primary-foreground: hsl(var(--primary-foreground));
44
45 --color-secondary: hsl(var(--secondary));
46 --color-secondary-foreground: hsl(var(--secondary-foreground));
47
48 --color-destructive: hsl(var(--destructive));
49 --color-destructive-foreground: hsl(var(--destructive-foreground));
50
51 --color-muted: hsl(var(--muted));
52 --color-muted-foreground: hsl(var(--muted-foreground));
53
54 --color-accent: hsl(var(--accent));
55 --color-accent-foreground: hsl(var(--accent-foreground));
56
57 --color-popover: hsl(var(--popover));
58 --color-popover-foreground: hsl(var(--popover-foreground));
59
60 --color-card: hsl(var(--card));
61 --color-card-foreground: hsl(var(--card-foreground));
62
63 --color-success: hsl(var(--success));
64 --color-warning: hsl(var(--warning));
65 --color-info: hsl(var(--info));
66 /* Text-on-surface variants: the fills above are for buttons, dots and
67 tints; small colored text uses these, which reach WCAG AA (4.5:1) on the
68 page and card backgrounds in both themes. */
69 --color-primary-text: hsl(var(--primary-text));
70 --color-success-text: hsl(var(--success-text));
71 --color-warning-text: hsl(var(--warning-text));
72 --color-info-text: hsl(var(--info-text));
73 --color-destructive-text: hsl(var(--destructive-text));
74
75 --color-sidebar: hsl(var(--sidebar));
76 --color-sidebar-foreground: hsl(var(--sidebar-foreground));
77
78 /* Hezarfen Figma semantic aliases. Keep page code semantic while matching
79 the shared design vocabulary across light and dark modes. */
80 --color-brand: hsl(var(--brand));
81 --color-brand-accent: hsl(var(--brand-accent));
82 --color-brand-hover: hsl(var(--brand-hover));
83 --color-brand-ink: hsl(var(--brand-ink));
84 --color-brand-wash: hsl(var(--brand-wash));
85 --color-surface-base: hsl(var(--surface-base));
86 --color-surface-overlay: hsl(var(--surface-overlay));
87 --color-surface-tint: hsl(var(--surface-tint));
88 --color-surface-fill: hsl(var(--surface-fill));
89 --color-text-strong: hsl(var(--text-strong));
90 --color-text-default: hsl(var(--text-default));
91 --color-text-subtle: hsl(var(--text-subtle));
92 --color-text-placeholder: hsl(var(--text-placeholder));
93 --color-border-line: hsl(var(--border-line));
94 --color-border-hairline: hsl(var(--border-hairline));
95
96 /* bdash radius scale: base 0.5rem, sm=r-4px, md=r-2px, lg=r, xl=r+4px */
97 --radius-3xl: calc(var(--radius) + 12px);
98 --radius-2xl: calc(var(--radius) + 8px);
99 --radius-xl: calc(var(--radius) + 4px);
100 --radius-lg: var(--radius);
101 --radius-md: calc(var(--radius) - 2px);
102 --radius-sm: calc(var(--radius) - 4px);
103
104 --animate-fade-up: fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
105 --animate-accordion-down: accordion-down 0.25s cubic-bezier(0.16, 1, 0.3, 1);
106 --animate-accordion-up: accordion-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
107
108 @keyframes fade-up {
109 from {
110 opacity: 0;
111 transform: translateY(8px);
112 }
113 to {
114 opacity: 1;
115 transform: translateY(0);
116 }
117 }
118 @keyframes accordion-down {
119 from {
120 height: 0;
121 }
122 to {
123 height: var(--kb-collapsible-content-height);
124 }
125 }
126 @keyframes accordion-up {
127 from {
128 height: var(--kb-collapsible-content-height);
129 }
130 to {
131 height: 0;
132 }
133 }
134}
135
136/*
137 The default border color has changed to `currentcolor` in Tailwind CSS v4,
138 so we've added these compatibility styles to make sure everything still
139 looks the same as it did with Tailwind CSS v3.
140
141 If we ever want to remove these styles, we need to add an explicit border
142 color utility to any element that depends on these defaults.
143*/
144@layer base {
145 button:not(:disabled),
146 [role='button']:not([aria-disabled='true']) {
147 cursor: pointer;
148 }
149
150 *,
151 ::after,
152 ::before,
153 ::backdrop,
154 ::file-selector-button {
155 border-color: var(--color-gray-200, currentcolor);
156 }
157}
158
159@utility topbar-control {
160 @apply border border-border/70 bg-transparent text-muted-foreground transition-colors hover:border-border hover:bg-muted/60 hover:text-foreground;
161}
162
163/* AI action button uses the landing-page brand blue. The border is
164 transparent and the tint is clipped inside it: a brand/20 rim on a
165 brand/10 fill read as one blob that looked bigger than the h-9 icon
166 controls beside it. */
167@utility topbar-ai-control {
168 @apply border border-transparent bg-brand/10 bg-clip-padding text-brand transition-colors hover:bg-brand/16 hover:text-brand;
169}
170
171@utility data-shell {
172 @apply rounded-xl border border-border-line bg-surface-base;
173}
174
175@utility data-table-wrap {
176 /* Scrolls sideways only. A height cap gave the table its own vertical
177 * scroller inside the page, clipping the last rows of a page that fit. */
178 @apply isolate overflow-x-auto overflow-y-hidden rounded-xl border border-border-line bg-surface-base;
179}
180
181@utility data-table {
182 @apply w-full caption-bottom text-sm;
183
184 & thead {
185 @apply sticky top-0 z-20 border-b border-border-hairline text-text-subtle;
186 background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card)));
187 }
188
189 & th {
190 /* No text-align here: `.data-table th` would out-specify the per-column
191 * text-right/center utility on TableHead and force every header left. The
192 * TableHead base class provides the left default; alignment stays utility-driven.
193 * Title Case (no uppercase transform), light weight, muted. */
194 @apply h-11 overflow-hidden text-ellipsis whitespace-nowrap px-3 text-xs font-medium tracking-normal text-text-subtle first:pl-4 last:pr-4;
195 background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card)));
196 }
197
198 & td {
199 /* tabular-nums: vertically aligned digits without a mono font.
200 * One line per cell, cut with an ellipsis: a nowrap value longer than
201 * its fixed-layout column used to run over the next cell's text. */
202 @apply overflow-hidden text-ellipsis whitespace-nowrap px-3 py-3 align-middle text-sm font-normal text-foreground tabular-nums first:pl-4 last:pr-4;
203 }
204
205 & tbody tr {
206 @apply border-b border-border-hairline transition-colors data-[state=selected]:bg-muted;
207 background-color: hsl(var(--card));
208 }
209
210 & tbody tr:hover {
211 background-color: color-mix(in oklab, hsl(var(--muted)) 40%, hsl(var(--card)));
212 }
213
214 & tbody tr[data-state='selected'] {
215 background-color: hsl(var(--muted));
216 }
217}
218
219/*
220 * Yatay kaydırmada sabit kalan (dondurulmuş) kolonlar. Altındaki içerik görünmesin
221 * diye opak olmalı ama zebra/hover satır tonuyla da eşleşmeli: gövde hücresi satır
222 * tonunu `inherit` ile alır, başlık hücresi başlık tonunu kullanır. Kayan içerikle
223 * arasında görsel dikiş için kenara ince çizgi + yumuşak gölge eklenir.
224 */
225@utility table-sticky-left {
226 background-color: inherit;
227 border-right: 1px solid hsl(var(--border));
228 box-shadow: 4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent);
229}
230
231@utility table-sticky-right {
232 background-color: inherit;
233 border-left: 1px solid hsl(var(--border));
234 box-shadow: -4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent);
235}
236
237/* Dondurulmuş başlık hücreleri gövde hücrelerinin üstünde opak kalmalı. */
238@utility table-sticky-head-left {
239 background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card)));
240 border-right: 1px solid hsl(var(--border));
241 box-shadow: 4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent);
242}
243
244@utility table-sticky-head-right {
245 background-color: color-mix(in srgb, hsl(var(--muted)) 55%, hsl(var(--card)));
246 border-left: 1px solid hsl(var(--border));
247 box-shadow: -4px 0 6px -6px color-mix(in srgb, hsl(var(--foreground)) 12%, transparent);
248}
249
250/* Frozen columns only cast their seam when something can slide under them.
251 * On a table that fits, the shadow and heavier rule read as "more content to
252 * the side" and invite a scroll that goes nowhere. */
253.data-table-wrap:not([data-scrollable]) :is(.table-sticky-left, .table-sticky-right, .table-sticky-head-left, .table-sticky-head-right) {
254 box-shadow: none;
255}
256.data-table-wrap:not([data-scrollable]) :is(.table-sticky-right, .table-sticky-head-right) {
257 border-left-color: transparent;
258}
259.data-table-wrap:not([data-scrollable]) :is(.table-sticky-left, .table-sticky-head-left) {
260 border-right-color: var(--color-border-hairline);
261}
262
263/* The header row stays in view while the page scrolls. `overflow-x: auto`
264 * makes the frame its own scroller, which pins a sticky thead inside a box
265 * that never scrolls vertically; a table that fits needs no sideways scroll,
266 * so its frame only clips (rounded corners) and the thead sticks to the
267 * page instead. A table wide enough to scroll sideways keeps its scroller
268 * and a header that scrolls with it. */
269.data-table-wrap:not([data-scrollable]) {
270 overflow: clip;
271}
272/* In the page (not a side panel) the header clears the app's sticky top
273 * bar, which only exists from lg up. */
274#main-content .data-table-wrap:not([data-scrollable]) .data-table thead {
275 top: 0;
276}
277@media (min-width: 64rem) {
278 #main-content .data-table-wrap:not([data-scrollable]) .data-table thead {
279 top: calc(49px + env(safe-area-inset-top));
280 }
281}
282
283/* İşlemler sütunu: sabit 110x45. */
284.data-table td.table-action-cell,
285.data-table th.table-action-cell {
286 width: 110px;
287 min-width: 110px;
288 max-width: 110px;
289 height: 45px;
290 padding-top: 0;
291 padding-bottom: 0;
292}
293
294/* Insight ledgers are intentionally spreadsheet-like: centered metrics and
295 * explicit cell rules make a wide scan easier than a card-style table. */
296.insight-grid-table th,
297.insight-grid-table td {
298 border-right: 1px solid hsl(var(--border));
299 text-align: center;
300}
301
302/* Headers centred, values from the left edge, as on every other table. */
303.insight-grid-table td:not(.table-action-cell) {
304 text-align: left;
305}
306
307.insight-grid-table th:last-child,
308.insight-grid-table td:last-child {
309 border-right: 0;
310}
311
312.insight-grid-table tbody tr:nth-child(even) {
313 background-color: color-mix(in oklab, hsl(var(--muted)) 18%, hsl(var(--card)));
314}
315
316@utility detail-breadcrumb {
317 @apply flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground font-medium;
318
319 & a {
320 @apply transition-colors hover:text-foreground;
321 }
322}
323
324@utility detail-action-group {
325 /* A plain row: the pill buttons inside carry their own borders, and a
326 * boxed frame around them read as one more, squarer control. */
327 @apply flex w-full flex-wrap items-center gap-2 sm:w-auto;
328}
329
330@utility detail-action-divider {
331 @apply flex flex-1 items-center gap-1.5 border-t border-border pt-1.5 sm:ml-1 sm:flex-none sm:border-l sm:border-t-0 sm:pl-1.5 sm:pt-0;
332}
333
334@utility tab-panel-header {
335 @apply flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border/60 bg-muted/20 px-3 py-2;
336}
337
338@utility tab-panel-note {
339 @apply rounded-lg border border-border/60 bg-muted/20 px-3 py-2 text-sm text-muted-foreground;
340}
341
342@utility detail-metric-card {
343 @apply rounded-lg border border-border bg-card px-4 py-4 shadow-sm;
344}
345
346@utility side-panel-body {
347 & form {
348 @apply space-y-4 pb-4;
349 }
350
351 & form > .space-y-3 {
352 @apply rounded-lg border border-border bg-card p-4;
353 }
354
355 & form > .space-y-4 {
356 @apply rounded-lg border border-border bg-card p-4;
357 }
358
359 & form > .space-y-1\.5 {
360 @apply rounded-lg border border-border bg-card p-4;
361 }
362
363 & form > .grid {
364 @apply rounded-lg border border-border bg-card p-4;
365 }
366
367 /* Every field group is its own card, whatever its wrapper: a checkbox row,
368 a picker rendered straight into the form or a space-y-2 block used to
369 sit bare between carded siblings. Alerts, the sticky action bar and
370 blocks that already draw a border keep their own look. */
371 & form > :is(div, fieldset, label, section):not(.flex:last-child, [role="alert"], .sticky, [class*="mt-auto"], [class*="border"]) {
372 @apply rounded-lg border border-border bg-card p-4;
373 }
374
375 /* Read-only panels get the same cards: a block of detail fields. */
376 & :is(div, section):has(> [data-slot="detail-field"]):not([class*="border"]) {
377 @apply rounded-lg border border-border bg-card p-4;
378 }
379
380 & label {
381 @apply text-xs font-semibold text-muted-foreground/90 tracking-tight;
382 }
383
384 & input {
385 @apply h-9 rounded-md;
386 }
387
388 & textarea {
389 @apply rounded-md;
390 }
391
392 & select {
393 @apply h-9 rounded-md;
394 }
395
396 /* The action bar sits flush on the panel's bottom edge: the body and the
397 form drop their bottom padding, which otherwise left an empty strip under
398 Kaydet / Vazgeç on every panel. */
399 &:has(form > .flex:last-child) {
400 @apply pb-0;
401 }
402
403 & form:has(> .flex:last-child) {
404 @apply pb-0;
405 }
406
407 /* A form wrapped in a div (a help line above it) still fills the panel, so
408 its bar lands on the bottom edge instead of just above it. */
409 & > div:has(> form:last-child > .flex:last-child) {
410 @apply flex min-h-full flex-col;
411 }
412
413 & > div > form:last-child:has(> .flex:last-child) {
414 @apply flex-1;
415 }
416
417 /* mb-0 overrides a bar's own -mb-5, which (with bottom-0 here) pulled it
418 over the last field. */
419 & form > .flex:last-child {
420 @apply sticky bottom-0 -mx-5 mb-0 justify-end border-t border-border bg-background px-5 py-3;
421 }
422
423 & form > .flex.flex-wrap:last-child {
424 @apply sticky bottom-0 -mx-5 mb-0 justify-end border-t border-border bg-background px-5 py-3;
425 }
426
427 /* Save / Cancel: touch-sized (h-10) on phones and touch screens, h-9 on
428 a desktop pointer. */
429 & form > .flex:last-child button {
430 @apply h-9 rounded-md px-4 font-medium touch:h-10;
431 }
432
433 & form > .flex.flex-wrap:last-child button {
434 @apply h-9 rounded-md px-4 font-medium touch:h-10;
435 }
436}
437
438@utility tactile-press {
439 @apply active:scale-[0.97] transition-transform duration-150;
440}
441
442@utility animate-pulse-glow {
443 animation: pulse-glow 3s ease-in-out infinite;
444
445 @media (prefers-reduced-motion: reduce) {
446 animation: none;
447 }
448}
449
450@utility num {
451 font-family:
452 SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
453 monospace;
454 font-variant-numeric: tabular-nums;
455}
456
457@utility mono {
458 font-family:
459 SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
460 monospace;
461 font-variant-numeric: tabular-nums;
462}
463
464@layer base {
465 /* Hue-neutral gray scale + Carbon-style semantic colors. */
466 :root {
467 /* Height of the area the user can actually see: the display minus the
468 status bar / camera cutout at the top. Full-height layouts measure this
469 instead of the viewport, which on mobile is taller than the page. */
470 --app-viewport: calc(100dvh - env(safe-area-inset-top));
471
472 /* The UA paints the caret, the text-selection handles, the keyboard and
473 the overscroll canvas from this — and `light dark` in the meta tag makes
474 it follow the OS, not the app. A dark app on a light phone then drew a
475 black caret on a black field, and the strip revealed by overscrolling
476 came back white. Pinning it per theme keeps that chrome in the theme. */
477 color-scheme: light;
478
479 /* --accent-light / --accent-light-fg are set inline by preferences-context
480 when the user picks an accent color. Figma brand blue is only the
481 default; a saved user palette continues to win. */
482 --brand: 191.94 100% 42.35%;
483 --brand-accent: 191.94 100% 42.35%;
484 --brand-hover: 192.06 100% 37.06%;
485 --brand-ink: 192.46 94.2% 27.06%;
486 --brand-wash: 193.33 75% 95.29%;
487 --surface-base: 0 0% 100%;
488 --surface-overlay: 0 0% 97%;
489 --surface-tint: 0 0% 96%;
490 --surface-fill: 0 0% 90%;
491 --text-strong: 0 0% 4%;
492 --text-default: 240 6% 10%;
493 --text-subtle: 0 0% 45%;
494 --text-placeholder: 0 0% 63%;
495 --border-line: 0 0% 4% / 0.1;
496 --border-hairline: 0 0% 91%;
497 --ui-accent: var(--accent-light, var(--brand));
498 --background: var(--surface-overlay);
499 --foreground: var(--text-default);
500 --card: 0 0% 100%;
501 --card-foreground: 0 0% 8%;
502 --popover: 0 0% 100%;
503 --popover-foreground: 0 0% 8%;
504 --primary: var(--ui-accent);
505 --primary-foreground: var(--accent-light-fg, 0 0% 4%);
506 --secondary: var(--surface-fill);
507 --secondary-foreground: 0 0% 16%;
508 --muted: var(--surface-tint);
509 --muted-foreground: var(--text-subtle);
510 --accent: var(--surface-fill);
511 --accent-foreground: 0 0% 13%;
512 --destructive: 356 82% 51%;
513 --destructive-foreground: 0 0% 100%;
514 --border: var(--border-hairline);
515 --input: var(--border-line);
516 --ring: var(--accent-light, var(--brand-ink));
517 --radius: 0.5rem;
518 --success: 137 63% 39%;
519 --warning: 38 92% 50%;
520 --info: 219 98% 53%;
521 --primary-text: var(--accent-light-text, var(--brand-ink));
522 --success-text: 137 63% 30%;
523 --warning-text: 38 92% 31%;
524 --info-text: 219 98% 50%;
525 --destructive-text: 356 82% 46%;
526 --surface-elevated: 0 0% 100%;
527 --sidebar: 0 0% 98%;
528 --sidebar-foreground: 0 0% 8%;
529
530 /* unDraw illustration palette (src/lib/illustrations.ts). */
531 --illu-accent: hsl(var(--primary));
532 --illu-accent-2: hsl(349 100% 70%);
533 --illu-ink: hsl(240 12% 22%);
534 --illu-line: hsl(0 0% 82%);
535 --illu-soft: hsl(0 0% 92%);
536 --illu-paper: hsl(0 0% 100%);
537 }
538
539 [data-kb-theme="dark"] {
540 /* --accent-dark / --accent-dark-fg are set inline by preferences-context —
541 a separate, lighter-lightness variant of the same picked hue so it stays
542 legible against this theme's near-black background. */
543 color-scheme: dark;
544 --surface-base: 0 0% 6%;
545 --surface-overlay: 0 0% 6%;
546 --surface-tint: 0 0% 15%;
547 --surface-fill: 0 0% 15%;
548 --text-strong: 0 0% 98%;
549 --text-default: 0 0% 96%;
550 --text-subtle: 0 0% 63%;
551 --text-placeholder: 0 0% 63%;
552 --border-line: 0 0% 20%;
553 --border-hairline: 0 0% 20%;
554 --ui-accent: var(--accent-dark, var(--brand));
555 --background: var(--surface-overlay);
556 --foreground: var(--text-strong);
557 --card: var(--surface-base);
558 --card-foreground: var(--text-strong);
559 --popover: var(--surface-base);
560 --popover-foreground: var(--text-strong);
561 --primary: var(--ui-accent);
562 --primary-foreground: var(--accent-dark-fg, 0 0% 4%);
563 --secondary: var(--surface-fill);
564 --secondary-foreground: 0 0% 98%;
565 --muted: var(--surface-tint);
566 --muted-foreground: var(--text-subtle);
567 --accent: var(--surface-fill);
568 --accent-foreground: 0 0% 98%;
569 --destructive: 357 94% 64%;
570 --destructive-foreground: 0 0% 100%;
571 --border: var(--border-hairline);
572 --input: var(--border-line);
573 --ring: var(--accent-dark, var(--brand));
574 --success: 137 58% 58%;
575 --warning: 38 92% 54%;
576 --info: 219 98% 60%;
577 --primary-text: var(--primary);
578 --success-text: var(--success);
579 --warning-text: var(--warning);
580 --info-text: var(--info);
581 --destructive-text: var(--destructive);
582 --illu-ink: hsl(240 6% 72%);
583 --illu-line: hsl(0 0% 30%);
584 --illu-soft: hsl(0 0% 19%);
585 --illu-paper: hsl(0 0% 11%);
586 --surface-elevated: var(--surface-fill);
587 --sidebar: var(--surface-base);
588 --sidebar-foreground: 0 0% 98%;
589 }
590
591 * {
592 @apply border-border;
593 }
594
595 html {
596 @apply scroll-smooth bg-background;
597 /* The canvas behind the page — what an overscroll bounce or a keyboard
598 teardown reveals below the last element — is painted from `html`, not
599 from `body`. Without this it falls back to the UA's white. */
600 overscroll-behavior-y: none;
601 /* WCAG 2.4.11: a focused or anchored element must not land under the
602 sticky 45px shell header. */
603 scroll-padding-top: calc(45px + env(safe-area-inset-top) + 0.5rem);
604 /* Phones have no header; the floating action button replaced it. */
605 @media (width < 64rem) {
606 scroll-padding-top: calc(env(safe-area-inset-top) + 0.5rem);
607 }
608 font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
609 -webkit-font-smoothing: antialiased;
610 -moz-osx-font-smoothing: grayscale;
611 }
612
613 body {
614 @apply min-h-screen bg-background font-sans text-foreground antialiased selection:bg-primary/20 selection:text-primary-text;
615 /* The mobile shells (Tauri on Android/iOS) draw the page edge to edge, so
616 the status bar and the camera cutout sit on top of it. This padding is
617 what starts the page below them; border-box keeps the min-height from
618 counting it, so the page does not grow a scrollbar's worth of overflow.
619 Every inset is 0 in a desktop browser, so the web build is unchanged. */
620 box-sizing: border-box;
621 min-height: 100dvh;
622 padding-top: env(safe-area-inset-top);
623 padding-left: env(safe-area-inset-left);
624 padding-right: env(safe-area-inset-right);
625 }
626
627 /* The padding above scrolls away with the page, which would let content slide
628 up under the status bar and the camera. This band does not move: it paints
629 the theme background over that strip at every scroll position, so the
630 cutout area always matches the page instead of showing what is behind it.
631 It sits above every overlay (modals z-70, toasts/date-picker z-80) because
632 the strip must stay clean even while a drawer or dialog is open. */
633 body::before {
634 content: '';
635 position: fixed;
636 top: 0;
637 left: 0;
638 right: 0;
639 height: env(safe-area-inset-top);
640 background: hsl(var(--background));
641 z-index: 90;
642 pointer-events: none;
643 }
644
645 /* Form controls inherit `color` from Tailwind's preflight, but the caret and
646 the selection highlight do not follow it, and a field that overrides its
647 own background (the Çelebi composer is transparent on a card) could end up
648 with a caret the same color as what is behind it. Naming all three keeps a
649 focused field readable in either theme. */
650 input,
651 textarea,
652 select {
653 color: hsl(var(--foreground));
654 caret-color: hsl(var(--primary));
655 -webkit-text-fill-color: currentColor;
656 }
657
658 /* `-webkit-text-fill-color` inherits as a resolved color, so without this the
659 field's own fill would repaint the placeholder in the text color. */
660 input::placeholder,
661 textarea::placeholder {
662 -webkit-text-fill-color: currentColor;
663 }
664
665 input::selection,
666 textarea::selection {
667 background: hsl(var(--primary) / 0.3);
668 color: hsl(var(--foreground));
669 }
670
671 /* Keep scrolling available while removing native scrollbar chrome globally. */
672 * {
673 -ms-overflow-style: none;
674 scrollbar-width: none;
675 }
676
677 ::-webkit-scrollbar {
678 display: none;
679 }
680}
681
682@layer components {
683 @keyframes pulse-glow {
684 0%, 100% { opacity: 0.9; transform: scale(1); filter: drop-shadow(0 0 10px hsl(var(--primary) / 0.25)); }
685 50% { opacity: 1; transform: scale(1.02); filter: drop-shadow(0 0 20px hsl(var(--primary) / 0.45)); }
686 }
687}
688
689/* Profile cover: brand tint under an 8px pixel grid. */
690.profile-cover {
691 background-color: hsl(var(--primary) / 0.12);
692 background-image:
693 linear-gradient(hsl(var(--primary) / 0.1) 1px, transparent 1px),
694 linear-gradient(90deg, hsl(var(--primary) / 0.1) 1px, transparent 1px),
695 linear-gradient(120deg, hsl(var(--primary) / 0.28), transparent 65%);
696 background-size: 8px 8px, 8px 8px, 100% 100%;
697}
698
699/* Note bodies: the stored HTML from the note editor, read or edited. One
700 stylesheet for both keeps what you type identical to what you read. */
701@layer components {
702 .note-prose {
703 color: hsl(var(--foreground));
704 font-size: 0.95rem;
705 line-height: 1.75;
706 overflow-wrap: anywhere;
707 }
708 .note-prose > * + * { margin-top: 0.75em; }
709 .note-prose h2 { margin-top: 1.4em; font-size: 1.4rem; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
710 .note-prose h3 { margin-top: 1.2em; font-size: 1.12rem; font-weight: 650; line-height: 1.35; }
711 .note-prose > :first-child { margin-top: 0; }
712 .note-prose ul { padding-left: 1.4em; list-style: disc; }
713 .note-prose ol { padding-left: 1.4em; list-style: decimal; }
714 .note-prose li + li { margin-top: 0.25em; }
715 .note-prose li::marker { color: hsl(var(--muted-foreground)); }
716 .note-prose blockquote {
717 border-left: 3px solid hsl(var(--primary) / 0.55);
718 padding-left: 1em;
719 color: hsl(var(--muted-foreground));
720 }
721 .note-prose pre {
722 border: 1px solid hsl(var(--border));
723 border-radius: 0.5rem;
724 background: hsl(var(--muted) / 0.6);
725 padding: 0.75em 1em;
726 font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
727 font-size: 0.85rem;
728 line-height: 1.6;
729 white-space: pre-wrap;
730 }
731 .note-prose code {
732 border-radius: 0.3rem;
733 background: hsl(var(--muted) / 0.8);
734 padding: 0.1em 0.35em;
735 font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
736 font-size: 0.85em;
737 }
738 .note-prose pre code { background: transparent; padding: 0; }
739 .note-prose a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 2px; }
740 /* Placeholder for an empty contentEditable body. */
741 .note-prose[data-empty="true"]::before {
742 content: attr(data-placeholder);
743 color: hsl(var(--muted-foreground) / 0.7);
744 pointer-events: none;
745 position: absolute;
746 }
747}
748
749/* iOS Safari zooms the page into any focused field under 16px. Unlayered, so
750 it outranks every text-* utility on a field, shared or one-off, without
751 each form having to remember a phone size. */
752@media (pointer: coarse), (width < 40rem) {
753 input:not([type='checkbox'], [type='radio'], [type='range'], [type='color'], [type='file']),
754 textarea,
755 select {
756 font-size: 16px;
757 }
758}