BlueGit

projects-timfalken-com allianties

Files

allianties / build / style.css

style.css

style.css 16.2 KiB Download Raw
1:root {
2 --bg: #0c1020;
3 --bg-2: #151a2e;
4 --bg-3: #1c2340;
5 --gold: #e8c547;
6 --gold-dim: #b8942e;
7 --ink: #e8eaf2;
8 --muted: #9aa3bd;
9 --danger: #e85d5d;
10 --ok: #4ecb8d;
11 --cf: #c44b4b;
12 --line: rgba(200, 210, 240, 0.18);
13 --safe-b: max(12px, env(safe-area-inset-bottom, 0px));
14 --safe-t: max(8px, env(safe-area-inset-top, 0px));
15 --safe-r: max(8px, env(safe-area-inset-right, 0px));
16 --safe-l: max(8px, env(safe-area-inset-left, 0px));
17 --radius: 12px;
18 --hit: 44px;
19 --font: "Source Sans 3", "Segoe UI", "Noto Sans", "Hiragino Sans", "Noto Sans CJK JP", "Noto Sans CJK SC", "Noto Sans CJK KR", sans-serif;
20}
21* { box-sizing: border-box; }
22html, body {
23 margin: 0; padding: 0;
24 background: var(--bg);
25 color: var(--ink);
26 font-family: var(--font);
27 font-size: 16px;
28 line-height: 1.45;
29 min-height: 100%;
30 min-height: 100dvh;
31 -webkit-text-size-adjust: 100%;
32 touch-action: manipulation;
33}
34body { padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); }
35button, input, a.button {
36 font: inherit;
37 touch-action: manipulation;
38}
39button, a.button {
40 appearance: none;
41 display: inline-flex;
42 align-items: center;
43 justify-content: center;
44 min-height: var(--hit);
45 min-width: var(--hit);
46 padding: 10px 18px;
47 border: 0;
48 border-radius: 10px;
49 background: var(--gold);
50 color: #1a1404;
51 font-weight: 650;
52 cursor: pointer;
53 text-decoration: none;
54}
55button:disabled { opacity: 0.45; cursor: not-allowed; }
56button:focus-visible, a.button:focus-visible, input:focus-visible {
57 outline: 2px solid var(--gold);
58 outline-offset: 2px;
59}
60.btn-secondary, .btn-secondary:link {
61 background: var(--bg-3);
62 color: var(--ink);
63 border: 1px solid var(--line);
64}
65.btn-danger { background: var(--danger); color: #fff; }
66.btn-danger-outline {
67 background: transparent;
68 color: var(--danger);
69 border: 1px solid var(--danger);
70}
71.btn-back {
72 background: transparent;
73 color: var(--muted);
74 border: 1px solid var(--line);
75 min-width: auto;
76 margin-bottom: 8px;
77}
78input[type="text"], input[type="number"], input[type="time"], textarea {
79 background: var(--bg-2);
80 color: var(--ink);
81 border: 1px solid var(--line);
82 border-radius: 10px;
83 padding: 10px 12px;
84 min-height: var(--hit);
85 width: 100%;
86}
87.sr-only {
88 position: absolute; width: 1px; height: 1px;
89 padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
90}
91h1, h2 { font-weight: 700; letter-spacing: 0.01em; margin: 0 0 0.4em; }
92h1 { font-size: 2.1rem; color: var(--gold); text-align: center; }
93.tagline, .hint, small { color: var(--muted); }
94.tagline { text-align: center; margin: 0 0 1.2rem; }
95.hint, small { font-size: 0.92rem; }
96.error, .notice {
97 padding: 10px 14px;
98 border-radius: 10px;
99 margin: 12px 0;
100}
101.error { background: rgba(80,16,24,0.85); border: 1px solid #e88; color: #ffd6d6; }
102.notice { background: rgba(40,36,16,0.85); border: 1px solid var(--gold-dim); }
103.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.08em; }
104#app { max-width: 720px; margin: 0 auto; padding: 8px 16px 96px; }
105.screen { animation: fade 0.2s ease; }
106@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
107[hidden] { display: none !important; }
108
109.menu-account { text-align: center; margin: 1rem 0; }
110.menu-account a { color: var(--gold); }
111.menu-account a.button { color: #1a1404; }
112#menu-guest { display: flex; flex-direction: column; align-items: center; gap: 10px; }
113#menu-local-login { display: block; max-width: 36rem; line-height: 1.6; }
114.avatar-sm, .avatar {
115 border-radius: 50%;
116 object-fit: cover;
117 background: var(--bg-3);
118 vertical-align: middle;
119}
120.avatar-sm { width: 32px; height: 32px; margin-right: 6px; }
121#menu-actions { display: flex; flex-direction: column; gap: 12px; margin: 1.4rem 0; }
122.join-form { display: flex; gap: 8px; }
123.join-form input { flex: 1; text-transform: uppercase; letter-spacing: 0.12em; text-align: center; }
124
125.games-list, .player-list, .cf-ranges, #jury-list { list-style: none; padding: 0; margin: 0; }
126.games-list li, .player-list li, .game-card {
127 display: flex; align-items: center; gap: 12px;
128 background: var(--bg-2);
129 border: 1px solid var(--line);
130 border-radius: var(--radius);
131 padding: 10px 12px;
132 margin: 8px 0;
133 min-height: var(--hit);
134}
135.games-list button { margin-left: auto; }
136.player-dot {
137 width: 14px; height: 14px; border-radius: 50%;
138 flex-shrink: 0;
139 box-shadow: 0 0 0 2px #0006;
140}
141.invite-row { display: flex; gap: 8px; margin: 8px 0 16px; flex-wrap: wrap; }
142.invite-row input { flex: 1; min-width: 0; font-size: 0.82rem; letter-spacing: 0; }
143.actions { display: flex; flex-direction: column; gap: 10px; margin: 1.2rem 0; }
144
145.toggle {
146 display: flex; gap: 12px; align-items: flex-start;
147 padding: 12px 0;
148 cursor: pointer;
149}
150.toggle input[type="checkbox"] {
151 appearance: none;
152 width: 48px; height: 28px; min-height: 28px;
153 border-radius: 14px;
154 background: #2a3148;
155 border: 1px solid var(--line);
156 position: relative;
157 flex-shrink: 0;
158 margin-top: 2px;
159}
160.toggle input[type="checkbox"]::after {
161 content: "";
162 position: absolute; top: 2px; left: 2px;
163 width: 22px; height: 22px; border-radius: 50%;
164 background: #c8cde0;
165 transition: transform 0.15s ease;
166}
167.toggle input[type="checkbox"]:checked { background: var(--gold-dim); }
168.toggle input[type="checkbox"]:checked::after { transform: translateX(20px); background: #fff8e0; }
169.toggle small { display: block; margin-top: 4px; }
170.field { margin: 0 0 12px 60px; }
171.field input[type="number"] { max-width: 6rem; }
172
173/* Cease-fire clock */
174.cf-clock { display: flex; justify-content: center; margin: 12px 0; touch-action: none; }
175.cf-clock svg { width: min(86vw, 320px); height: auto; touch-action: none; user-select: none; }
176.cf-ranges li {
177 display: flex; gap: 8px; align-items: center;
178 padding: 8px 0;
179}
180.cf-ranges input[type="time"] { max-width: 8rem; min-height: 40px; }
181
182/* Top bar / countdowns */
183#top-bar {
184 position: sticky; top: 0; z-index: 8;
185 background: linear-gradient(180deg, #0c1020 70%, #0c102000);
186 padding: 4px 0 12px;
187 text-align: center;
188}
189#top-title { font-weight: 700; color: var(--gold); letter-spacing: 0.04em; }
190.countdown { margin: 4px 0; }
191.cd-label { display: block; font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
192.cd-hms {
193 font-variant-numeric: tabular-nums;
194 font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
195 font-size: 1.85rem;
196 font-weight: 700;
197 letter-spacing: 0.06em;
198 color: var(--gold);
199}
200#cf-countdown .cd-hms { color: #f0c0c0; font-size: 1.45rem; }
201#cf-countdown.active .cd-hms { color: var(--danger); }
202#top-meta { font-size: 0.9rem; color: var(--muted); min-height: 1.3em; }
203#shrink-banner { color: #ffcc77; margin-left: 8px; }
204
205#game-hud {
206 display: flex; align-items: center; gap: 8px;
207 flex-wrap: wrap;
208 margin-bottom: 8px;
209}
210#you-stats { flex: 1; font-size: 0.95rem; }
211#you-stats strong { color: var(--gold); }
212.banner {
213 background: rgba(40, 36, 16, 0.9);
214 border: 1px solid var(--gold-dim);
215 border-radius: 10px;
216 padding: 8px 12px;
217 text-align: center;
218}
219
220/* Board */
221#board-wrap {
222 display: flex; justify-content: center;
223 margin: 8px 0 16px;
224 touch-action: none;
225}
226#board {
227 display: grid;
228 gap: 3px;
229 width: min(96vw, 560px, calc(100dvh - 290px));
230 aspect-ratio: 1;
231 grid-template-rows: repeat(var(--n, 6), 1fr);
232 touch-action: none;
233 user-select: none;
234 -webkit-user-select: none;
235}
236.cell {
237 position: relative;
238 background: #1a2140;
239 border-radius: 6px;
240 border: 1px solid #2a3358;
241 min-width: 0; min-height: 0;
242 width: auto;
243 height: auto;
244 padding: 0;
245 aspect-ratio: 1;
246 cursor: pointer;
247 display: flex; align-items: center; justify-content: center;
248 touch-action: none;
249 color: inherit;
250}
251button.cell {
252 min-height: 0;
253 min-width: 0;
254 padding: 0;
255 background: #1a2140;
256 border-radius: 6px;
257 font-weight: 400;
258}
259.cell.impassable { background: #0a0c14; border-color: #111; cursor: default; }
260.cell.threat { box-shadow: inset 0 0 0 2px #e8a03a; background: #2a2210; }
261.cell.move-target { box-shadow: inset 0 0 0 3px var(--ok); background: #163226; }
262.cell.selected { box-shadow: inset 0 0 0 3px var(--gold); }
263.cell.in-range { box-shadow: inset 0 0 0 2px #e85d5d88; }
264.piece {
265 width: 82%;
266 height: 82%;
267 max-width: 82%;
268 max-height: 82%;
269 aspect-ratio: 1;
270 border-radius: 50%;
271 border: 3px solid var(--c, #fff);
272 box-shadow: 0 0 0 1px #0008, 0 2px 6px #0006;
273 object-fit: cover;
274 background: #222;
275 pointer-events: none;
276 flex-shrink: 0;
277}
278.piece.dead { filter: grayscale(1) brightness(0.7); opacity: 0.7; border-style: dashed; }
279.avatar-wrap-fixed {
280 display: inline-flex;
281 flex-shrink: 0;
282 align-items: center;
283 justify-content: center;
284 width: var(--sz, 40px);
285 height: var(--sz, 40px);
286}
287.piece-fixed {
288 width: var(--sz, 40px) !important;
289 height: var(--sz, 40px) !important;
290 border-width: 2px;
291 font-size: calc(var(--sz, 40px) * 0.38);
292}
293.piece-initials {
294 display: flex; align-items: center; justify-content: center;
295 font-weight: 700; font-size: 0.7em; color: #fff;
296}
297
298/* Timeline */
299#timeline {
300 position: sticky; bottom: 0;
301 display: flex; align-items: center; gap: 8px;
302 background: #0c1020ee;
303 padding: 8px 0 calc(8px + 48px); /* room for lang picker */
304 z-index: 7;
305 touch-action: none;
306}
307#tl-play, #tl-live { flex-shrink: 0; }
308#tl-play { width: var(--hit); padding: 0; font-size: 1.1rem; }
309#tl-track {
310 position: relative;
311 flex: 1;
312 height: 44px;
313 background: var(--bg-2);
314 border: 1px solid var(--line);
315 border-radius: 8px;
316 touch-action: none;
317 cursor: pointer;
318}
319#tl-ticks { position: absolute; inset: 0; pointer-events: none; }
320.tl-tick {
321 position: absolute; top: 8px; bottom: 8px;
322 width: 2px; background: var(--gold);
323 transform: translateX(-1px);
324}
325#tl-head {
326 position: absolute; top: 4px; bottom: 4px;
327 width: 4px; background: #fff;
328 border-radius: 2px;
329 transform: translateX(-2px);
330 pointer-events: none;
331 box-shadow: 0 0 6px #fff8;
332}
333
334/* Jury */
335#jury-panel {
336 background: var(--bg-2);
337 border: 1px solid var(--line);
338 border-radius: var(--radius);
339 padding: 12px;
340 margin: 8px 0 16px;
341}
342#jury-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
343#jury-list button { margin-left: auto; }
344
345/* Modal / sheet / settings */
346.modal, .sheet, .settings-panel {
347 position: fixed; inset: 0;
348 background: #0008;
349 z-index: 20;
350 display: flex; align-items: flex-end; justify-content: center;
351 padding: 16px 16px var(--safe-b);
352 touch-action: none;
353}
354.modal { align-items: center; }
355.modal-card, .sheet-card, .settings-panel {
356 background: var(--bg-2);
357 border: 1px solid var(--line);
358 border-radius: 16px;
359 padding: 20px 18px 16px;
360 width: min(100%, 440px);
361 max-height: min(88vh, 40rem);
362 overflow-y: auto;
363 -webkit-overflow-scrolling: touch;
364 touch-action: pan-y;
365 position: relative;
366}
367.settings-panel {
368 position: fixed; inset: auto 16px var(--safe-b) 16px;
369 margin: 0 auto;
370 display: flex; flex-direction: column; gap: 10px;
371 top: auto;
372 background: var(--bg-2);
373}
374.modal-close {
375 position: absolute; top: 8px; right: 8px;
376 background: transparent; color: var(--ink);
377 min-width: var(--hit); width: var(--hit);
378}
379.chat-log {
380 max-height: 40vh; overflow-y: auto;
381 touch-action: pan-y;
382 display: flex; flex-direction: column; gap: 8px;
383 margin: 8px 0;
384}
385.chat-bubble {
386 max-width: 85%;
387 padding: 8px 12px;
388 border-radius: 12px;
389 background: var(--bg-3);
390}
391.chat-bubble.mine { align-self: flex-end; background: #3a3420; }
392.chat-compose { display: flex; gap: 8px; }
393.opt-list { display: flex; flex-direction: column; gap: 8px; }
394.opt-list button { width: 100%; }
395
396/* Language picker — same pattern as Meteors */
397.lang-picker {
398 position: fixed;
399 right: var(--safe-r);
400 bottom: var(--safe-b);
401 z-index: 15;
402 display: flex;
403 flex-direction: column-reverse;
404 align-items: flex-end;
405 gap: 8px;
406}
407.lang-current {
408 appearance: none;
409 border: 1px solid rgba(200, 210, 240, 0.35);
410 background: rgba(16, 20, 40, 0.92);
411 border-radius: 8px;
412 padding: 6px 7px;
413 cursor: pointer;
414 line-height: 0;
415 box-shadow: 0 4px 14px rgba(0,0,0,0.4);
416 min-width: 52px;
417 min-height: 40px;
418 color: inherit;
419}
420.lang-current img, .lang-option img {
421 display: block; width: 36px; height: 24px;
422 object-fit: cover; border-radius: 3px;
423 image-rendering: auto;
424 box-shadow: 0 0 0 1px rgba(0,0,0,0.35);
425}
426.lang-current:focus-visible, .lang-option:focus-visible,
427.lang-current[aria-expanded="true"] { border-color: var(--gold); outline: none; }
428.lang-list {
429 display: flex; flex-direction: column; gap: 4px;
430 background: rgba(16, 14, 30, 0.96);
431 border: 1px solid #5a5470;
432 border-radius: 12px;
433 padding: 8px;
434 max-height: min(70vh, 28rem);
435 overflow-y: auto;
436 -webkit-overflow-scrolling: touch;
437 touch-action: pan-y;
438 box-shadow: 0 12px 32px rgba(0,0,0,0.45);
439 min-width: 11.5rem;
440}
441.lang-list[hidden] { display: none !important; }
442.lang-option {
443 appearance: none;
444 display: flex; align-items: center; gap: 10px;
445 width: 100%;
446 border: 1px solid transparent;
447 background: transparent;
448 color: var(--ink);
449 font: inherit; font-size: 0.95rem;
450 padding: 6px 8px;
451 border-radius: 8px;
452 cursor: pointer;
453 text-align: left;
454 min-height: 40px;
455 white-space: nowrap;
456}
457.lang-option.current { border-color: var(--gold); background: rgba(40, 32, 16, 0.7); }
458
459@media (min-width: 700px) {
460 #app { padding-bottom: 80px; }
461 #menu-actions { flex-direction: row; align-items: stretch; }
462 .join-form { flex: 1; }
463 .actions { flex-direction: row; }
464 .modal { align-items: center; }
465}
466@media (prefers-reduced-motion: reduce) {
467 .screen { animation: none; }
468 .toggle input[type="checkbox"]::after { transition: none; }
469}
470
471/* Visibility options */
472.vis-panel { margin: 16px 0 8px; }
473.vis-panel h3 { font-size: 1.05rem; margin: 0 0 6px; }
474.vis-field {
475 border: 1px solid var(--line);
476 border-radius: var(--radius);
477 padding: 8px 12px 10px;
478 margin: 10px 0;
479 background: var(--bg-2);
480}
481.vis-field legend {
482 font-weight: 650;
483 padding: 0 6px;
484 color: var(--ink);
485}
486.vis-opt {
487 display: flex;
488 align-items: center;
489 gap: 10px;
490 min-height: var(--hit);
491 padding: 4px 4px;
492 cursor: pointer;
493 border-radius: 8px;
494 -webkit-tap-highlight-color: transparent;
495}
496.vis-opt:hover, .vis-opt:focus-within { background: #ffffff0c; }
497.vis-opt input[type="radio"] {
498 width: 22px;
499 height: 22px;
500 accent-color: var(--gold);
501 flex-shrink: 0;
502 margin: 0;
503}
504.vis-opt input:disabled { cursor: not-allowed; }
505
506/* Board effects (replay arrows / pulses) */
507#board-wrap { position: relative; }
508#board { position: relative; z-index: 1; overflow: visible; }
509.cell { overflow: visible; }
510.board-fx {
511 position: absolute;
512 inset: 0;
513 width: 100%;
514 height: 100%;
515 pointer-events: none;
516 z-index: 4;
517 overflow: visible;
518}
519.piece.moving {
520 position: relative;
521 z-index: 5;
522 will-change: transform;
523}
524.piece.range-pulse {
525 animation: range-pulse 0.55s ease-out;
526}
527@keyframes range-pulse {
528 0% { box-shadow: 0 0 0 0 rgba(232, 197, 71, 0.95), 0 0 0 1px #0008, 0 2px 6px #0006; }
529 60% { box-shadow: 0 0 0 18px rgba(232, 197, 71, 0), 0 0 0 1px #0008, 0 2px 6px #0006; }
530 100% { box-shadow: 0 0 0 0 rgba(232, 197, 71, 0), 0 0 0 1px #0008, 0 2px 6px #0006; }
531}
532.fx-float {
533 position: absolute;
534 z-index: 6;
535 pointer-events: none;
536 font-weight: 800;
537 font-size: 1.25rem;
538 font-variant-numeric: tabular-nums;
539 color: #4ecb8d;
540 text-shadow: 0 1px 4px #000c;
541 transform: translate(-50%, -50%);
542 animation: fx-rise 0.55s ease-out forwards;
543}
544@keyframes fx-rise {
545 from { opacity: 1; transform: translate(-50%, -40%) scale(1); }
546 to { opacity: 0.15; transform: translate(-50%, -140%) scale(1.25); }
547}
548
549/* Timeline: large touch target, ticks aligned with playhead (idx / n) */
550#timeline { touch-action: none; user-select: none; -webkit-user-select: none; }
551#tl-track {
552 height: var(--hit);
553 min-height: var(--hit);
554 touch-action: none;
555 cursor: pointer;
556}
557
558#tl-back, #tl-fwd { width: var(--hit); padding: 0; font-size: 1.4rem; font-weight: 700; }
559.ap-time-field { margin-left: 0; }
560.ap-time-field input[type="time"] { max-width: 10rem; }
561#ap-time-wrap.field { margin-left: 0; padding: 8px 0 12px; }
562
563.grid-field { margin-left: 0; padding: 8px 0 12px; }
564.grid-size-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
565.grid-size-row input[type="number"] { max-width: 5rem; }
566.grid-times { opacity: 0.7; }
567#grid-use-suggested { margin-top: 6px; }
568
569#lobby-rules.readonly .toggle, #lobby-rules.readonly .field, #lobby-rules.readonly .vis-opt { opacity: 0.75; cursor: default; }
570#lobby-rules.readonly input { cursor: default; }
571#cf-clock svg { touch-action: none; -webkit-user-select: none; user-select: none; }
572#cf-clock svg.dragging { cursor: grabbing; }
573#cf-clock svg.readonly { cursor: default; }
574
575.tz-label { display: block; opacity: 0.65; font-size: 0.8em; }