Repository navigation
Expand file tree
/
Copy pathstyles.css
More file actions
2713 lines (2684 loc) · 99.3 KB
/
Copy pathstyles.css
File metadata and controls
2713 lines (2684 loc) · 99.3 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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
时间尺 (time-logger)
Copyright © 2026 wowayou — https://github.com/wowayou/time-logger
SPDX-License-Identifier: AGPL-3.0-or-later
Commercial licensing available on request; contact via the repository above.
v33 视觉令牌层(阶段0 提案 D 定稿):
- 双色板:暗=石墨冷(默认)、亮=冷白(v72 起,见下);三个有彩桶色均过 dataviz 六项校验
- v69(D11):亮色底色冷移一档 #f7f5f1→#f6f6f5(仅 --bg;卡面暖令牌保留),对比度重校全部持平或微升
- v72(推翻 D11 折中,SPEC-004):亮色整体回归冷白——--bg/--input/--track/--border/--shadow-1/2/3
全部去暖(`rgba(48,42,30,…)`→`rgba(28,32,44,…)`);--card 与三桶彩色本体/tint、--text/--muted/--faint
不动;WCAG 对比度只升不降(新 bg 更亮)
- 结构令牌全站唯一:圆角 12/16/22、动效 140/280ms、字阶 12/13/15/17(v1.5.2 SPEC-016 A 期扩充,见下方结构令牌块)
- 海拔用阴影(亮)/ 阴影+顶光(暗),描边整体降级为 hairline 或透明占位
- 行为零变更:选择器、布局机制(P13-P16 护栏)与 v32 完全一致
*/
/* === 结构令牌(不随主题变) ===
SPEC-016 A 期(v1.5.2)收敛:令牌块以外的 font-size / border-radius 一律引用令牌
(或 inherit / 0 / 50%);确属例外的裸值必须在同一行附一条以「raw:」开头、
写明理由的注释,project_audit.py 的 audit_css_tokens 按行检查并封顶例外数量。
- 圆角:sm 8 小控件(36px 级按钮、日历格、提示气泡)/ ctl 12 输入与 sheet 内分组 /
card 16 页面卡片 / sheet 22 / pill 胶囊与「高度一半」的条形端。
- 字号:cap 12 / ui 13 / ui-strong 14 / body 15 / input 16 / title 17。
--fs-input 是输入控件的下限(iOS 聚焦放大红线,不得调小),body 基准、sheet
头部文字按钮、FAB 主文案同值共用。展示用大数字(hero、时间分析)按版式单定,
走 raw 例外,不进字阶。
- 间距:4px 刻度 --sp-1…--sp-6(4/8/12/16/24/32),A 期只把恰好落在刻度上的值
换成令牌;2/6/10/14 等半档与奇数值暂保留原值,留待 B 期按组件收敛(见 SPEC-016)。
- 字重:600 / 700 两档为主(A 期把 650 并入 600),500/400 各有零星用处。 */
:root {
--r-sm: 8px;
--r-ctl: 12px;
--r-card: 16px;
--r-sheet: 22px;
--r-pill: 999px;
--fs-cap: 12px;
--fs-ui: 13px;
--fs-ui-strong: 14px;
--fs-body: 15px;
--fs-input: 16px;
--fs-title: 17px;
--sp-1: 4px;
--sp-2: 8px;
--sp-3: 12px;
--sp-4: 16px;
--sp-5: 24px;
--sp-6: 32px;
--t-fast: 140ms ease-out;
--control-h: 44px;
}
/* v84:`color-scheme` 与四处令牌块一一配对(默认暗 / 跟随系统亮 / 显式亮 / 显式暗)。
缺席时(此前一直如此)UA 按 light 画它自己的表面:滚动条与 gutter、原生控件、
文本选中,以及——这条才是真机上看得见的那个——**合成器的基础背景色**;窗口被
系统缩放(Android 退出/进入动效)时未绘制区域用它填充,于是暗色应用退出时露出
白边(维护者 S23 实录,见 docs/v82-v83-device-acceptance.md)。**必须四处都写**:
「跟随系统」时根本没有 data-theme 属性,只挂在 html[data-theme] 上等于对大多数
用户不生效。 */
/* === 暗·石墨(默认) === */
:root {
color-scheme: dark;
--bg: #0e0f13;
--card: #16171e;
--input: #1d1f29;
/* v76:控件表面分层修正——拆「井」(--input,凹陷输入态)与「壳」
(--chrome,view-tabs 未选中态/日期导航按钮的浮起底)。暗色本就
--input(#1d1f29) 亮于 --bg(#0e0f13),没有倒挂问题,--chrome 直接
复用 --input 的暗色值,暗色主题零视觉变化。 */
--chrome: #1d1f29;
--border: rgba(255,255,255,0.09);
--track: #262838;
--accent: #a99fff;
--accent-bg: rgba(139,124,255,0.14);
--maintain: #63c894;
--maintain-bg: rgba(70,168,120,0.14);
--leak: #e19a59;
--leak-bg: rgba(201,128,60,0.16);
--text: #e8e9f1;
--muted: #9fa1b8;
--faint: #898ba2;
--danger: #e0596b;
--shadow-1: 0 1px 2px rgba(0,0,0,0.40);
--shadow-2: 0 4px 16px rgba(0,0,0,0.35);
--shadow-3: 0 16px 48px rgba(0,0,0,0.50);
--top-light: inset 0 1px 0 rgba(255,255,255,0.045);
}
/* === 亮·宣纸(跟随系统) === */
@media (prefers-color-scheme: light) {
:root {
color-scheme: light;
--bg: #eceef3;
--card: #ffffff;
--input: #e2e5ea;
/* v76:亮色下 --input(#e2e5ea) 比 --bg(#eceef3) 更暗,若拿它当 view-tabs/
日期导航的底会让顶部控件带比纯白内容卡更「重」,层级倒挂。--chrome 专门
给这类壳表面,比 --bg 更亮(更浮),--input 本身留给真正凹陷的输入井。 */
--chrome: #f2f3f7;
--border: rgba(28,32,44,0.08);
--track: #e2e5eb;
--accent: #5745c7;
--accent-bg: #efecfc;
--maintain: #237a52;
--maintain-bg: #e9f4ee;
--leak: #9a4f1e;
--leak-bg: #f8ede4;
--text: #33323b;
--muted: #686570;
--faint: #66646d;
--danger: #ae414f;
--shadow-1: 0 1px 2px rgba(28,32,44,0.06), 0 2px 8px rgba(28,32,44,0.05);
--shadow-2: 0 2px 6px rgba(28,32,44,0.07), 0 10px 28px rgba(28,32,44,0.08);
--shadow-3: 0 8px 20px rgba(28,32,44,0.10), 0 28px 64px rgba(28,32,44,0.14);
--top-light: none;
}
}
/* === 手动覆盖(优先级高于 media query) === */
html[data-theme="light"] {
color-scheme: light;
--bg: #eceef3;
--card: #ffffff;
--input: #e2e5ea;
--chrome: #f2f3f7;
--border: rgba(28,32,44,0.08);
--track: #e2e5eb;
--accent: #5745c7;
--accent-bg: #efecfc;
--maintain: #237a52;
--maintain-bg: #e9f4ee;
--leak: #9a4f1e;
--leak-bg: #f8ede4;
--text: #33323b;
--muted: #686570;
--faint: #66646d;
--danger: #ae414f;
--shadow-1: 0 1px 2px rgba(28,32,44,0.06), 0 2px 8px rgba(28,32,44,0.05);
--shadow-2: 0 2px 6px rgba(28,32,44,0.07), 0 10px 28px rgba(28,32,44,0.08);
--shadow-3: 0 8px 20px rgba(28,32,44,0.10), 0 28px 64px rgba(28,32,44,0.14);
--top-light: none;
}
html[data-theme="dark"] {
color-scheme: dark;
--bg: #0e0f13;
--card: #16171e;
--input: #1d1f29;
--chrome: #1d1f29;
--border: rgba(255,255,255,0.09);
--track: #262838;
--accent: #a99fff;
--accent-bg: rgba(139,124,255,0.14);
--maintain: #63c894;
--maintain-bg: rgba(70,168,120,0.14);
--leak: #e19a59;
--leak-bg: rgba(201,128,60,0.16);
--text: #e8e9f1;
--muted: #9fa1b8;
--faint: #898ba2;
--danger: #e0596b;
--shadow-1: 0 1px 2px rgba(0,0,0,0.40);
--shadow-2: 0 4px 16px rgba(0,0,0,0.35);
--shadow-3: 0 16px 48px rgba(0,0,0,0.50);
--top-light: inset 0 1px 0 rgba(255,255,255,0.045);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
/* v86:窄屏隐藏根滚动条。真机录屏逐帧放大后确认,窗口右缘那道「白边」内部有
滚动条滑块——它是**经典滚动条占用的轨道**(S23 上 Chrome 画的是经典滚动条,
不是 overlay),`scrollbar-gutter: stable` 还把它恒定预留,于是通高一条浅色带
贴着窗口右缘,系统缩放动效里尤其显眼。手机上滚动条本就不该占位(iOS/多数
Android 都是 overlay),桌面保留它做滚动位置指示——按宽度断点分流,与本项目
其它响应式判据同源(不按 pointer/设备名)。手法与 .wheel-col 既有做法一致。 */
@media (max-width: 719px) {
html {
scrollbar-gutter: auto;
scrollbar-width: none;
}
html::-webkit-scrollbar { width: 0; height: 0; }
}
body {
background: var(--bg);
color: var(--text);
font-family: -apple-system, 'PingFang SC', 'Helvetica Neue', system-ui, sans-serif;
font-size: var(--fs-input);
line-height: 1.5;
min-height: 100%;
min-height: -webkit-fill-available;
min-height: 100svh;
display: flex;
flex-direction: column;
overflow-x: hidden;
}
/* P15: boot latch narrowed to the JS-rendered regions only. Hiding all of
.app while .footer (outside it) stayed visible painted "a blank page
with two floating buttons" during module load on slow devices — the SE2
refresh flash. Static chrome (header, tabs, date-nav shell, footer) now
paints with the HTML parse; the data regions fade in together after the
first render() (render runs before app-ready, so they reveal already
correct — including add-btn hidden on non-day views). */
body:not(.app-ready):not(.boot-restored) :is(#add-btn, .ruler, .tl-head, #timeline) { opacity: 0; }
:is(#add-btn, .ruler, .tl-head, #timeline) { transition: opacity 0.18s ease; }
@media (prefers-reduced-motion: reduce) {
:is(#add-btn, .ruler, .tl-head, #timeline) { transition: none; }
}
button { touch-action: manipulation; }
:where(button, a, input, textarea, select, [tabindex]):focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.app {
width: 100%;
flex: 1 0 auto;
max-width: 600px;
margin: 0 auto;
padding: env(safe-area-inset-top) clamp(var(--sp-3), 4vw, var(--sp-4)) 18px;
container-type: inline-size;
}
/* Header */
.hdr {
padding: var(--sp-3) 0 10px;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
align-items: center;
gap: var(--sp-2);
min-width: 0;
}
.hdr-brand {
min-width: 0;
display: flex;
align-items: center;
gap: var(--sp-2);
}
.hdr-icon-link,
.hdr-action-btn {
width: 44px;
height: 44px;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 44px;
border-radius: var(--r-ctl);
color: var(--text);
text-decoration: none;
}
.hdr-action-btn {
border: none;
background: transparent;
color: var(--text);
font-size: var(--fs-title);
font-family: inherit;
}
/* header「···」沿用 stroke 图标渲染约定(app.js 注入 iconSvg('more'))。 */
.hdr-action-btn svg {
width: 20px;
height: 20px;
stroke: currentColor;
fill: none;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.hdr-icon-link:active,
.hdr-action-btn:active { background: var(--input); }
.hdr-icon {
display: block;
width: 32px;
height: 32px;
border-radius: var(--r-sm);
}
.hdr-title {
flex: 0 0 auto;
color: var(--text);
font-size: var(--fs-title);
font-weight: 600;
line-height: 1.15;
letter-spacing: 0.01em;
white-space: nowrap;
}
.hdr-brand-copy {
min-width: 0;
display: flex;
align-items: baseline;
gap: var(--sp-2);
}
/* v61:里程碑文案比旧「使用第 N 天」长一倍,且天数会涨到三、四位数。
允许收缩并省略号收尾(`0 1 auto` + `min-width:0`),宁可截断也不撞上
「···」按钮——320px + 三位数时两者已经贴脸。完整文案在 aria-label 里。 */
.usage-day {
flex: 0 1 auto;
min-width: 0;
color: var(--muted);
font-size: var(--fs-cap);
font-variant-numeric: tabular-nums;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* v1.6.0(D32):今天恰好是第 7/30/100… 个记录日时整天换成 accent 浅底胶囊,与周期
标签的「今天」同一强调色;文字不变、不加图标、不加动效。 */
.usage-day.is-milestone {
color: var(--accent);
background: var(--accent-bg);
font-weight: 600;
padding: 0 var(--sp-2);
border-radius: var(--r-pill);
}
body:not(.app-ready):not(.boot-restored) .usage-day { visibility: hidden; }
.hdr-actions {
display: inline-flex;
align-items: center;
gap: 2px;
color: var(--text);
}
.seg {
display: inline-flex;
align-items: center;
background: var(--input);
border: 1px solid transparent;
border-radius: var(--r-ctl);
padding: 2px;
gap: 2px;
flex-shrink: 0;
}
.seg button {
background: transparent;
border: none;
color: var(--muted);
border-radius: calc(var(--r-ctl) - 2px);
font-size: var(--fs-cap);
line-height: 1;
font-family: inherit;
padding: 7px 9px;
cursor: pointer;
white-space: nowrap;
transition: background var(--t-fast), color var(--t-fast);
}
.seg button.active {
background: var(--card);
color: var(--text);
font-weight: 600;
box-shadow: var(--shadow-1);
}
.theme-seg {
flex: 0 0 auto;
min-width: 0;
}
.theme-seg button { padding: 7px var(--sp-2); }
@container (max-width: 390px) {
.hdr-title { display: none; }
}
/* Add button */
/* R2+FAB(v47):右下角悬浮胶囊。fixed 相对视口——宽屏时把右偏移锚到 600px
居中内容列的右边缘内 16px(`50vw-284px`=(100vw-600)/2+16),窄屏回落 16px。 */
.fab {
position: fixed;
right: max(16px, calc(50vw - 284px));
bottom: calc(16px + env(safe-area-inset-bottom));
z-index: 70;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 1px;
min-height: 52px;
padding: 9px 18px;
background: var(--accent);
color: #fff;
border: none;
border-radius: var(--r-pill);
font-family: inherit;
cursor: pointer;
box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 22%, transparent);
transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.fab-main { font-size: var(--fs-input); font-weight: 600; line-height: 1.15; }
.fab-sub {
font-size: var(--fs-cap);
color: rgba(255,255,255,0.78);
font-variant-numeric: tabular-nums;
line-height: 1.1;
}
.fab:active {
transform: scale(0.97);
box-shadow: 0 1px 5px color-mix(in srgb, var(--accent) 18%, transparent);
}
.fab[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .fab { transition: none; } }
/* 列表底部渐隐遮罩 + 避让:FAB 之下、内容之上。 */
.list-fade {
position: fixed;
left: 0;
right: 0;
bottom: 0;
height: 56px;
z-index: 65;
pointer-events: none;
background: linear-gradient(to bottom, transparent, var(--bg));
}
.list-fade[hidden] { display: none; }
/* Unified command tooltip */
button[data-tip] { position: relative; }
button[data-tip]::after {
content: attr(data-tip);
position: absolute;
left: 50%;
bottom: calc(100% + 8px);
transform: translateX(-50%);
z-index: 40;
width: 0;
max-width: 0;
padding: 0;
overflow: hidden;
border-radius: var(--r-sm);
background: var(--text);
color: var(--bg);
font-size: var(--fs-cap);
line-height: 1.35;
font-weight: 500;
white-space: normal;
text-align: left;
box-shadow: var(--shadow-2);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.12s ease, visibility 0s linear 0.12s;
transition-delay: 0s;
}
button[data-tip]::before {
content: "";
position: absolute;
left: 50%;
bottom: calc(100% + 3px);
transform: translateX(-50%);
z-index: 41;
border: 0 solid transparent;
border-top-color: var(--text);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.12s ease, visibility 0s linear 0.12s;
transition-delay: 0s;
}
button[data-tip][data-tip-pos="bottom"]::after {
top: calc(100% + 8px);
bottom: auto;
}
button[data-tip][data-tip-pos="bottom"]::before {
top: calc(100% + 3px);
bottom: auto;
border-top-color: transparent;
border-bottom-color: var(--text);
}
@media (hover: hover) and (pointer: fine) {
button[data-tip]:hover::after,
button[data-tip]:hover::before {
opacity: 1;
visibility: visible;
transition-delay: 800ms, 800ms;
}
button[data-tip]:hover::after {
width: max-content;
max-width: min(260px, calc(100vw - 32px));
padding: 7px 9px;
}
button[data-tip]:hover::before {
border-width: 5px;
}
}
button[data-tip]:focus-visible::after,
button[data-tip]:focus-visible::before {
opacity: 1;
visibility: visible;
transition-delay: 0s, 0s;
}
button[data-tip]:focus-visible::after {
width: max-content;
max-width: min(260px, calc(100vw - 32px));
padding: 7px 9px;
}
button[data-tip]:focus-visible::before {
border-width: 5px;
}
/* View controls */
.view-box {
display: grid;
gap: 10px;
margin-bottom: var(--sp-3);
}
.view-tabs {
width: 100%;
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
/* v76:覆盖 .seg 共享的 --input 底——view-tabs 未选中态是「壳」不是「井」,
用 --chrome(暗色下与 --input 同值,零变化;亮色下比 --bg 更浮)。同优先级
单类选择器,源码顺序在 .seg 之后即生效,不改 .seg 本身(theme-seg/
bucket-seg/record-mode-seg 等其它复用者不受影响)。 */
background: var(--chrome);
}
.view-tabs button {
min-width: 0;
font-size: var(--fs-ui);
}
.date-nav {
width: 100%;
display: grid;
grid-template-columns: 44px minmax(0, 1fr) 44px;
gap: var(--sp-2);
align-items: center;
}
#today-btn {
grid-column: 1 / -1;
width: 100%;
}
@container (min-width: 430px) {
.date-nav {
grid-template-columns: 44px minmax(0, 1fr) 44px minmax(76px, auto);
}
#today-btn {
grid-column: auto;
}
/* R5:显式 grid 轨道即便对应 item 被 [hidden] 也照样保留空间——「回到今天」条件
隐藏后需要 collapse 掉第 4 列,否则右侧留一块死区。 */
.date-nav:has(#today-btn[hidden]) {
grid-template-columns: 44px minmax(0, 1fr) 44px;
}
}
.nav-btn {
min-width: 0;
height: 44px;
/* v76:日期导航按钮(‹ › 回到今天)是壳表面,不是输入井——见 .view-tabs
同批注释。 */
background: var(--chrome);
color: var(--text);
border: 1px solid transparent;
border-radius: var(--r-ctl);
font-size: var(--fs-ui-strong);
font-family: inherit;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
box-shadow: none;
}
.nav-btn:active { opacity: 0.75; }
.period-label {
min-width: 0;
height: 44px;
display: flex;
align-items: center;
justify-content: center;
/* v76:与相邻的 .nav-btn 同一条 .date-nav 行,必须同底色——否则三个元素
一深一浅比只做半条更显眼。period-label 本身不是按钮,但视觉上是同一条
「日期导航」壳的一部分。 */
background: var(--chrome);
border: 1px solid transparent;
border-radius: var(--r-ctl);
color: var(--text);
font-size: var(--fs-ui-strong);
font-variant-numeric: tabular-nums;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: 0 10px;
box-shadow: none;
}
/* R5:当前周期含今天时的常驻高亮字样——即便「回到今天」按钮已隐藏,这里仍
给一个「你在今天」的持续信号。 */
.period-today-badge {
color: var(--accent);
font-weight: 700;
margin-left: 2px;
}
/* Form */
.fl { margin-bottom: 11px; min-width: 0; }
.fl-label { font-size: var(--fs-cap); color: var(--muted); margin-bottom: var(--sp-1); }
.inp {
width: 100%;
background: var(--input);
border: 1px solid transparent;
border-radius: var(--r-ctl);
color: var(--text);
font-size: var(--fs-input);
font-family: inherit;
padding: 10px var(--sp-3);
min-height: var(--control-h);
line-height: 1.25;
outline: none;
transition: border-color var(--t-fast), background var(--t-fast);
}
.inp:focus { border-color: var(--accent); background: var(--card); }
.ta {
resize: none;
overflow: hidden;
min-height: 52px;
line-height: 1.35;
white-space: pre-wrap;
}
/* When a long note would grow the textarea past the viewport cap (esp. iOS
keyboard shrinking visualViewport), autosize adds this so it scrolls
internally instead of pushing the save ✓ off-screen. */
.ta.ta-capped { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.edit-what-input { margin-bottom: var(--sp-2); }
.edit-tag-input { margin-bottom: 10px; }
/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.chip-group { display: grid; gap: var(--sp-1); margin-bottom: var(--sp-2); }
.chip-group-label {
color: var(--muted);
font-size: var(--fs-cap);
}
.chip {
min-height: 44px;
padding: var(--sp-2) 15px;
border-radius: var(--r-pill);
border: 1px solid var(--border);
background: transparent;
color: var(--muted);
font-size: var(--fs-ui);
font-family: inherit;
cursor: pointer;
transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.chip.sel {
background: var(--accent-bg);
border-color: var(--accent);
color: var(--accent);
font-weight: 600;
}
.chip-maintain.sel { background: var(--maintain-bg); border-color: var(--maintain); color: var(--maintain); }
.chip-leak.sel { background: var(--leak-bg); border-color: var(--leak); color: var(--leak); }
.chip-draft { border-style: dashed; cursor: default; }
.form-hint {
margin-top: 5px;
color: var(--muted);
font-size: var(--fs-cap);
line-height: 1.35;
}
.form-inline-error {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
padding: 9px 10px;
border: 1px solid var(--danger);
border-radius: var(--r-ctl);
background: color-mix(in srgb, var(--danger) 12%, transparent);
color: var(--text);
font-size: var(--fs-ui);
line-height: 1.35;
}
.form-inline-error[hidden] { display: none; }
/* v1.5.0:自定义标签撞上别的桶已有的同名标签——醒目的归属提醒,色相=它真正会记入
的桶(与草稿 chip 同色),一键「改选 X」。不拦保存:规则本身没变,只是必须看得见。 */
.tag-owner-warn {
--warn-fg: var(--accent);
--warn-bg: var(--accent-bg);
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 6px var(--sp-3);
margin-top: 6px;
padding: 9px 10px;
border-left: 3px solid var(--warn-fg);
border-radius: var(--r-ctl);
background: var(--warn-bg);
color: var(--text);
font-size: var(--fs-ui);
line-height: 1.4;
}
.tag-owner-warn[data-b="maintain"] { --warn-fg: var(--maintain); --warn-bg: var(--maintain-bg); }
.tag-owner-warn[data-b="leak"] { --warn-fg: var(--leak); --warn-bg: var(--leak-bg); }
.tag-owner-warn[hidden] { display: none; }
.tag-owner-warn .mini-btn { font-size: var(--fs-ui); }
.form-time-row {
display: flex;
align-items: center;
gap: var(--sp-2);
min-height: var(--control-h);
padding: 9px 10px;
border: 1px solid transparent;
border-radius: var(--r-ctl);
background: var(--input);
}
.start-time-trigger {
background: none;
border: none;
padding: 0;
cursor: pointer;
font-family: inherit;
font-size: var(--fs-body);
font-variant-numeric: tabular-nums;
font-weight: 600;
color: var(--accent);
text-decoration: underline;
text-underline-offset: 3px;
border-radius: var(--r-sm);
flex-shrink: 0;
}
.start-time-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.start-time-trigger:focus:not(:focus-visible) { outline: none; }
.start-time-trigger:active { opacity: 0.75; }
.form-time-arrow {
color: var(--muted);
font-size: var(--fs-ui);
font-variant-numeric: tabular-nums;
min-width: 0;
}
.start-time-section[hidden] { display: none; }
/* Wheel picker */
.wheel-picker {
display: flex;
height: 200px;
border-radius: var(--r-ctl);
overflow: hidden;
border: 1px solid var(--border);
background: var(--input);
position: relative;
z-index: 0;
}
.wheel-col {
flex: 1;
/* 必须压在 .wheel-highlight 之上:亮色 --accent-bg 不透明,
高亮带盖在文字上会吞掉选中行(P22)。 */
position: relative;
z-index: 1;
overflow-y: scroll;
scroll-snap-type: y mandatory;
scrollbar-width: none;
-webkit-overflow-scrolling: touch;
outline: none;
-webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 28%, black 72%, transparent 100%);
mask-image: linear-gradient(to bottom, transparent 0%, black 28%, black 72%, transparent 100%);
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-col-date { flex: 1.8; }
.wheel-item {
height: 40px;
display: flex;
align-items: center;
justify-content: center;
scroll-snap-align: center;
font-size: var(--fs-ui-strong);
color: var(--text);
cursor: pointer;
user-select: none;
white-space: nowrap;
padding: 0 var(--sp-1);
}
.wheel-item.is-selected {
color: var(--text);
font-weight: 700;
}
.wheel-col:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.wheel-col-date .wheel-item { font-size: var(--fs-cap); }
.wheel-divider {
width: 1px;
background: var(--border);
flex-shrink: 0;
align-self: stretch;
}
.wheel-highlight {
position: absolute;
left: 0; right: 0;
top: 50%;
height: 40px;
transform: translateY(-50%);
border-top: 1px solid var(--accent);
border-bottom: 1px solid var(--accent);
background: var(--accent-bg);
pointer-events: none;
z-index: 0;
}
.wheel-actions {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 6px;
}
.wheel-now-btn {
background: transparent;
border: none;
color: var(--accent);
font-size: var(--fs-ui);
font-family: inherit;
cursor: pointer;
padding: var(--sp-1) 0;
}
/* Desktop datetime picker */
.dt-picker {
display: grid;
gap: 9px;
position: relative;
}
.dt-trigger {
display: flex;
align-items: center;
gap: var(--sp-2);
height: var(--control-h);
background: var(--input);
color: var(--text);
border: 1px solid transparent;
border-radius: var(--r-ctl);
font-size: var(--fs-body);
font-family: inherit;
cursor: pointer;
padding: 0 var(--sp-3);
width: 100%;
text-align: left;
white-space: nowrap;
}
.dt-trigger:active { opacity: 0.75; }
.dt-cal-ico {
flex-shrink: 0;
margin-left: auto;
color: var(--muted);
width: 16px;
height: 16px;
}
.dt-pop {
position: absolute;
top: calc(100% + 6px);
left: 0;
z-index: 100;
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--r-card);
box-shadow: var(--shadow-2), var(--top-light);
padding: var(--sp-3);
width: 280px;
max-width: calc(100vw - 24px);
}
.dt-pop.dt-pop-up {
top: auto;
bottom: calc(100% + 6px);
}
.dt-cal-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: var(--sp-2);
font-size: var(--fs-ui-strong);
font-weight: 600;
color: var(--text);
}
.dt-nav {
background: transparent;
border: none;
color: var(--text);
font-size: var(--fs-title);
font-family: inherit;
cursor: pointer;
padding: 2px var(--sp-2);
border-radius: var(--r-sm);
}
.dt-nav:hover { background: var(--input); }
.dt-cal-dow {
display: grid;
grid-template-columns: repeat(7, 1fr);
text-align: center;
font-size: var(--fs-cap);
color: var(--muted);
margin-bottom: var(--sp-1);
}
.dt-cal-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 2px;
}
.dt-day {
aspect-ratio: 1;
background: transparent;
border: none;
border-radius: var(--r-sm);
font-size: var(--fs-ui);
font-family: inherit;
cursor: pointer;
color: var(--text);
padding: 0;
display: flex;
align-items: center;
justify-content: center;
}
.dt-day:hover:not(:disabled) { background: var(--input); }
.dt-day.is-today { color: var(--accent); font-weight: 600; }
.dt-day.is-sel { background: var(--accent); color: #fff; }
.dt-day.is-sel:hover { background: var(--accent); }
.dt-blank { pointer-events: none; color: transparent; cursor: default; }
.dt-time {
display: flex;
align-items: center;
justify-content: center;
gap: var(--sp-2);
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid var(--border);
}
.dt-step {
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
}
.dt-step-btn {
background: transparent;
border: 1px solid var(--border);
border-radius: var(--r-sm);
color: var(--text);
font-size: var(--fs-cap);
font-family: inherit;
cursor: pointer;
padding: 2px var(--sp-2);
line-height: 1;
}
.dt-step-btn:hover { background: var(--input); }
.dt-step-inp {
width: 44px;
text-align: center;
font-size: var(--fs-input);
font-family: inherit;
background: var(--input);
color: var(--text);
border: 1px solid transparent;
border-radius: var(--r-sm);
padding: 2px 0;
-moz-appearance: textfield;
}
.dt-step-inp::-webkit-outer-spin-button,
.dt-step-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dt-colon {
font-size: var(--fs-title);
font-weight: 600;
color: var(--text);
padding-bottom: 2px;
}
.dt-now {
margin-left: var(--sp-1);
background: transparent;
border: 1px solid var(--border);
border-radius: var(--r-sm);
color: var(--accent);
font-size: var(--fs-ui);
font-family: inherit;
cursor: pointer;
padding: 3px 10px;
}
.dt-now:hover { background: var(--accent-bg); }
.dt-precise { display: grid; gap: var(--sp-1); }
.dt-precise-label { font-size: var(--fs-cap); color: var(--muted); }
.dt-error {
color: var(--danger);
font-size: var(--fs-cap);
line-height: 1.35;
min-height: 16px;
}
.dt-error[hidden] {
display: none;
}
/* Ruler */
.ruler {
background: var(--card);
border-radius: var(--r-card);
padding: 14px var(--sp-4);
margin-bottom: var(--sp-3);
min-height: 82px;
box-shadow: var(--shadow-1);
}
.ruler-bar {
height: 9px;
border-radius: var(--r-pill);
/* 新发现:分段缝原为 transparent,实际颜色由父级 --card 透出——亮色下 --card
接近白(缝极淡)、暗色下 --card 是深石墨(缝显重),两主题分段视觉重量不一致。
改用已经按主题配平过的 --border(既有 hairline 令牌),缝的视觉重量主题间一致。 */
background: var(--border);
display: flex;
overflow: hidden;
margin-bottom: 9px;
gap: 2px;
}
.ruler-bar div { transition: flex 0.3s; }
.ruler-bar div:first-child { border-radius: var(--r-pill) 0 0 var(--r-pill); }
.ruler-bar div:last-child { border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.ruler-text {
font-size: var(--fs-ui);
color: var(--muted);
display: flex;
gap: 14px;
flex-wrap: wrap;
min-width: 0;
font-variant-numeric: tabular-nums;
}
.ruler-text span {
display: flex;
align-items: center;
gap: 5px;
min-width: 0;