-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
249 lines (228 loc) · 6.1 KB
/
Copy pathstyles.css
File metadata and controls
249 lines (228 loc) · 6.1 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
/* Ring Light — styles */
/* Registering --ring-color lets the light's gradient interpolate smoothly
when intensity/color jump (e.g. presets, taps). Unsupported browsers
simply apply changes instantly. */
@property --ring-color {
syntax: "<color>";
inherits: false;
initial-value: #000000;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
height: 100%;
width: 100%;
background: #000000;
overflow: hidden;
overscroll-behavior: none; /* kill pull-to-refresh / rubber-banding */
-webkit-tap-highlight-color: transparent;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
color: #f2f2f2;
-webkit-user-select: none;
user-select: none;
}
/* ---- The light surface ---------------------------------------------------
A ring is an annulus drawn with a radial-gradient: transparent hole,
a band of --ring-color, transparent outside. The body background shows
through the hole and around the ring. Geometry is in vmin units so the
ring stays a true circle in any orientation without JS on resize. */
.light {
position: fixed;
inset: 0;
z-index: 0;
opacity: 0;
touch-action: none; /* drags drive our gesture handler, not browser scroll/zoom */
--max-r: 50vmin; /* edge-touching radius */
--outer: calc(var(--radius) / 100 * var(--max-r));
--band: calc(var(--thick) / 100 * var(--max-r));
--inner: max(0px, calc(var(--outer) - var(--band)));
--feather: calc(var(--soft) / 100 * var(--band) / 2); /* <= band/2, keeps stops ordered */
background: radial-gradient(circle at 50% 50%,
#00000000 0,
#00000000 var(--inner),
var(--ring-color) calc(var(--inner) + var(--feather)),
var(--ring-color) calc(var(--outer) - var(--feather)),
#00000000 var(--outer));
transition: opacity .3s ease, --ring-color .14s linear;
}
.light.ready { opacity: 1; }
.light.flood { background: var(--ring-color); }
/* ---- Drag HUD ------------------------------------------------------------ */
.hud {
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 2;
padding: 14px 22px;
border-radius: 999px;
background: rgba(0, 0, 0, .55);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
font-size: 22px;
font-weight: 600;
font-variant-numeric: tabular-nums;
letter-spacing: .02em;
opacity: 0;
transition: opacity .18s ease;
pointer-events: none;
}
.hud.show { opacity: 1; }
/* ---- Controls panel ------------------------------------------------------ */
.controls {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 3;
margin: 0 auto;
max-width: 460px;
display: flex;
flex-direction: column;
gap: 14px;
padding: 8px 20px calc(18px + env(safe-area-inset-bottom));
max-height: 72vh;
overflow-y: auto;
background: rgba(18, 18, 20, .82);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
border-radius: 20px 20px 0 0;
border-top: 1px solid rgba(255, 255, 255, .08);
transition: opacity .25s ease, transform .25s ease;
}
.controls.hidden {
opacity: 0;
transform: translateY(16px);
pointer-events: none;
}
.grip {
width: 38px;
height: 4px;
border-radius: 2px;
background: rgba(255, 255, 255, .25);
margin: 4px auto 2px;
}
.row { display: flex; flex-direction: column; gap: 8px; }
.row-inline,
.row.footer { flex-direction: row; align-items: center; justify-content: space-between; }
label, .row-label {
font-size: 13px;
font-weight: 600;
letter-spacing: .03em;
text-transform: uppercase;
color: rgba(255, 255, 255, .72);
display: flex;
justify-content: space-between;
}
output {
font-variant-numeric: tabular-nums;
color: #ffffff;
text-transform: none;
letter-spacing: 0;
}
input[type="range"] {
width: 100%;
margin: 0;
accent-color: #f4f4f4;
height: 26px;
cursor: pointer;
}
input[type="color"] {
width: 52px;
height: 32px;
padding: 0;
border: 1px solid rgba(255, 255, 255, .2);
border-radius: 8px;
background: none;
cursor: pointer;
}
/* Segmented toggles */
.seg {
display: flex;
gap: 4px;
padding: 3px;
background: rgba(255, 255, 255, .07);
border-radius: 10px;
}
.seg-btn {
flex: 1;
appearance: none;
border: 0;
padding: 8px 10px;
border-radius: 8px;
background: transparent;
color: rgba(255, 255, 255, .6);
font-size: 14px;
font-weight: 600;
cursor: pointer;
}
.seg-btn[aria-pressed="true"] {
background: #f4f4f4;
color: #111;
}
.text-btn {
appearance: none;
border: 1px solid rgba(255, 255, 255, .18);
background: rgba(255, 255, 255, .06);
color: #f2f2f2;
font-size: 14px;
font-weight: 600;
padding: 9px 16px;
border-radius: 10px;
cursor: pointer;
}
.text-btn:active { background: rgba(255, 255, 255, .14); }
.hidden { display: none !important; }
/* ---- First-run hint ------------------------------------------------------ */
.hint {
position: fixed;
inset: 0;
z-index: 10;
align-items: center;
justify-content: center;
padding: 24px;
background: rgba(0, 0, 0, .72);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
}
/* Only flex when shown — otherwise an author `display` would override the
`hidden` attribute's built-in `display: none` and the modal would never close. */
.hint:not([hidden]) {
display: flex;
}
.hint-card {
max-width: 360px;
background: #1c1c1f;
border: 1px solid rgba(255, 255, 255, .1);
border-radius: 18px;
padding: 24px;
}
.hint-card h1 { margin: 0 0 12px; font-size: 22px; }
.hint-card ul { margin: 0 0 8px; padding-left: 20px; }
.hint-card li { margin: 8px 0; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .85); }
.hint-ios {
font-size: 14px;
line-height: 1.45;
color: rgba(255, 255, 255, .7);
background: rgba(255, 255, 255, .06);
padding: 10px 12px;
border-radius: 10px;
}
.primary-btn {
width: 100%;
margin-top: 16px;
appearance: none;
border: 0;
padding: 13px;
border-radius: 12px;
background: #f4f4f4;
color: #111;
font-size: 16px;
font-weight: 700;
cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
.light, .controls, .hud { transition: none; }
}