Skip to main content

max / makenotwork

8.7 KB · 418 lines History Blame Raw
1 /* In the `components` cascade layer, declared in _head_assets.html.
2 This sheet loads after style.css and shares its layer, so a tie still
3 resolves in this file's favour by source order, exactly as when both
4 were unlayered. The creator theme block stays unlayered and outranks
5 both. */
6 @layer components {
7 /* Unified media player styles, shared by audio and video player pages. */
8
9 /* Media container */
10 .media-container {
11 max-width: 680px;
12 margin: 0 auto;
13 padding: var(--gap-page) var(--gap-pane) var(--gap-page);
14 }
15
16 /* Author header */
17 .author-header {
18 display: flex;
19 align-items: center;
20 gap: var(--gap-section);
21 margin-bottom: var(--gap-page);
22 }
23
24 .author-avatar {
25 width: 48px;
26 height: 48px;
27 background: var(--surface-sunken);
28 border-radius: var(--radius-round);
29 display: flex;
30 align-items: center;
31 justify-content: center;
32 font-family: var(--font-heading);
33 font-size: var(--text-subhead);
34 color: var(--content);
35 }
36
37 .author-info {
38 flex: 1;
39 }
40
41 .author-name {
42 font-family: var(--font-mono);
43 font-size: var(--text-body);
44 color: var(--content);
45 }
46
47 .author-name a {
48 color: inherit;
49 text-decoration: none;
50 }
51
52 .author-name a:hover {
53 text-decoration: underline;
54 }
55
56 .media-meta {
57 font-family: var(--font-mono);
58 font-size: var(--text-note);
59 color: var(--content-muted);
60 }
61
62 /* Title */
63 .media-title {
64 font-family: var(--font-heading);
65 font-size: var(--text-display);
66 font-weight: normal;
67 line-height: 1.2;
68 margin-bottom: var(--gap-section);
69 color: var(--content);
70 text-align: left;
71 }
72
73 /* Series name */
74 .media-series {
75 font-family: var(--font-mono);
76 font-size: var(--text-note);
77 color: var(--content-muted);
78 margin-bottom: var(--gap-page);
79 }
80
81 .media-series a {
82 color: var(--action);
83 text-decoration: none;
84 }
85
86 .media-series a:hover {
87 text-decoration: underline;
88 }
89
90 /* Cover art (audio) */
91 .cover-art {
92 background: var(--surface-sunken);
93 aspect-ratio: 1;
94 max-width: 400px;
95 margin: 0 auto var(--gap-page);
96 display: flex;
97 align-items: center;
98 justify-content: center;
99 color: var(--content-muted);
100 font-family: var(--font-mono);
101 }
102
103 .cover-art img {
104 width: 100%;
105 height: 100%;
106 object-fit: cover;
107 }
108
109 /* Video display */
110 .video-display {
111 max-width: 100%;
112 margin: 0 auto var(--gap-page);
113 background: var(--content);
114 }
115
116 .video-display video {
117 width: 100%;
118 display: block;
119 }
120
121 /* Only the active element is shown; the standby preloads the next segment
122 off-screen so pre/mid/post-roll transitions are gapless. */
123 .video-display video.is-standby {
124 display: none;
125 }
126
127 /* Player controls */
128 .media-player {
129 background: var(--surface-overlay);
130 padding: var(--gap-pane);
131 margin-bottom: var(--gap-page);
132 }
133
134 .player-controls {
135 display: flex;
136 align-items: center;
137 gap: var(--gap-section);
138 margin-bottom: var(--gap-section);
139 }
140
141 .play-button {
142 width: 56px;
143 height: 56px;
144 background: var(--primary-dark);
145 color: var(--primary-light);
146 border: none;
147 border-radius: var(--radius-round);
148 cursor: pointer;
149 display: flex;
150 align-items: center;
151 justify-content: center;
152 font-size: var(--text-head);
153 transition: opacity 0.2s ease;
154 flex-shrink: 0;
155 }
156
157 .play-button:hover {
158 opacity: 0.8;
159 }
160
161 .progress-container {
162 flex: 1;
163 }
164
165 .progress-bar {
166 height: 6px;
167 background: var(--surface-sunken);
168 border-radius: var(--radius-control);
169 overflow: hidden;
170 cursor: pointer;
171 margin-bottom: var(--gap-peer);
172 position: relative;
173 }
174
175 .progress-fill {
176 height: 100%;
177 /* respec-ok: name collision, not a contest. layout.css styles
178 `.progress > .progress-fill`, and this one is inside .progress-bar, the
179 media scrubber, which is not the generated primitive and never matches
180 that selector. Worth knowing before anything here adopts .progress: the
181 two would then collide for real. */
182 background: var(--action);
183 width: 0%;
184 border-radius: var(--radius-control);
185 transition: width 0.1s linear;
186 }
187
188 .time-display {
189 display: flex;
190 justify-content: space-between;
191 font-family: var(--font-mono);
192 font-size: var(--text-fine);
193 color: var(--content-muted);
194 }
195
196 .player-secondary {
197 display: flex;
198 justify-content: space-between;
199 align-items: center;
200 padding-top: var(--gap-section);
201 border-top: 1px solid var(--border);
202 }
203
204 .speed-control {
205 font-family: var(--font-mono);
206 font-size: var(--text-note);
207 display: flex;
208 align-items: center;
209 gap: var(--gap-peer);
210 }
211
212 .speed-button {
213 background: var(--surface-sunken);
214 border: none;
215 padding: var(--gap-peer) var(--gap-section);
216 font-family: var(--font-mono);
217 font-size: var(--text-fine);
218 cursor: pointer;
219 color: var(--content);
220 }
221
222 .speed-button:hover {
223 background: var(--border);
224 }
225
226 .speed-button.is-selected {
227 background: var(--primary-dark);
228 color: var(--primary-light);
229 }
230
231 .volume-control {
232 display: flex;
233 align-items: center;
234 gap: var(--gap-peer);
235 }
236
237 .volume-icon {
238 color: var(--content-muted);
239 }
240
241 .volume-slider {
242 width: 80px;
243 height: 4px;
244 background: var(--surface-sunken);
245 border-radius: var(--radius-fine);
246 appearance: none;
247 cursor: pointer;
248 }
249
250 .volume-slider::-webkit-slider-thumb {
251 appearance: none;
252 width: 12px;
253 height: 12px;
254 background: var(--content);
255 border-radius: var(--radius-round);
256 cursor: pointer;
257 }
258
259 .volume-slider::-moz-range-thumb {
260 width: 12px;
261 height: 12px;
262 background: var(--content);
263 border-radius: var(--radius-round);
264 cursor: pointer;
265 border: none;
266 }
267
268 /* Description */
269 .media-description {
270 font-family: var(--font-body);
271 font-size: var(--text-lead);
272 line-height: 1.9;
273 margin-bottom: var(--gap-page);
274 }
275
276 .media-description p {
277 margin-bottom: var(--gap-pane);
278 }
279
280 /* Chapters */
281 .chapters {
282 background: var(--surface-overlay);
283 padding: var(--gap-pane);
284 margin-bottom: var(--gap-page);
285 }
286
287 .chapters h3 {
288 font-family: var(--font-mono);
289 font-size: var(--text-body);
290 font-weight: normal;
291 margin-bottom: var(--gap-section);
292 color: var(--content);
293 }
294
295 .chapter-list {
296 list-style: none;
297 }
298
299 .chapter-item {
300 display: flex;
301 justify-content: space-between;
302 padding: var(--gap-section) 0;
303 border-bottom: 1px solid var(--border);
304 cursor: pointer;
305 transition: background 0.2s ease;
306 }
307
308 .chapter-item:last-child {
309 border-bottom: none;
310 }
311
312 .chapter-item:hover {
313 background: var(--surface-sunken);
314 /* The bleed and the inset must stay equal or the row shifts on hover,
315 so both sides read the same token. */
316 margin: 0 calc(var(--gap-pane) * -1);
317 padding-left: var(--gap-pane);
318 padding-right: var(--gap-pane);
319 }
320
321 .chapter-title {
322 font-family: var(--font-body);
323 color: var(--content);
324 }
325
326 .chapter-time {
327 font-family: var(--font-mono);
328 font-size: var(--text-note);
329 color: var(--content-muted);
330 }
331
332 /* Tags */
333 .media-tags {
334 display: flex;
335 gap: var(--gap-peer);
336 flex-wrap: wrap;
337 margin-top: var(--gap-page);
338 padding-top: var(--gap-page);
339 border-top: 1px solid var(--border);
340 }
341
342 .tag {
343 font-family: var(--font-mono);
344 background: var(--surface-sunken);
345 color: var(--content);
346 padding: var(--gap-peer) var(--gap-section);
347 font-size: var(--text-fine);
348 }
349
350 /* Footer */
351 .media-player-footer {
352 font-family: var(--font-mono);
353 text-align: center;
354 padding: var(--gap-page);
355 font-size: var(--text-note);
356 color: var(--content-muted);
357 border-top: 1px solid var(--border);
358 }
359
360 .media-player-footer a {
361 color: var(--content);
362 text-decoration: none;
363 }
364
365 .media-player-footer a:hover {
366 text-decoration: underline;
367 }
368
369 /* Hidden media elements */
370 audio {
371 display: none;
372 }
373
374 /* Skip button for insertion segments */
375 .skip-insertion {
376 font-family: var(--font-mono);
377 font-size: var(--text-fine);
378 background: var(--surface-sunken);
379 border: 1px solid var(--border);
380 padding: var(--gap-peer) var(--gap-section);
381 cursor: pointer;
382 color: var(--content);
383 display: none;
384 margin-top: var(--gap-peer);
385 }
386
387 .skip-insertion:hover {
388 background: var(--border);
389 }
390
391 /* Insertion label shown during playback */
392 .insertion-label {
393 font-family: var(--font-mono);
394 font-size: var(--text-fine);
395 color: var(--content-muted);
396 font-style: italic;
397 display: none;
398 margin-top: var(--gap-bound);
399 }
400
401 /* Responsive */
402 @media (max-width: 599px) {
403 .media-title {
404 font-size: var(--text-title);
405 }
406
407 .cover-art {
408 max-width: 100%;
409 }
410
411 .player-secondary {
412 flex-direction: column;
413 gap: var(--gap-section);
414 align-items: flex-start;
415 }
416 }
417 }
418