style.css
⎇
Raw
1/* data-theme on <html> forces a theme. Without it the system setting decides. */
2:root {
3 color-scheme: light dark;
4 --bg: light-dark(#f9fafb, #111827);
5 --surface: light-dark(white, #1f2937);
6 --fg: light-dark(#1f2937, #e5e7eb);
7 --muted: light-dark(#6b7280, #9ca3af);
8 --border: light-dark(#d1d5db, #4b5563);
9 --line: light-dark(#e5e7eb, #374151);
10 --hover: light-dark(#f3f4f6, #374151);
11 --accent-bg: light-dark(#eff6ff, #1e3a8a);
12 --accent-fg: light-dark(#1d4ed8, #bfdbfe);
13 --error: light-dark(#b91c1c, #f87171);
14}
15:root[data-theme="light"] { color-scheme: light; }
16:root[data-theme="dark"] { color-scheme: dark; }
17
18* { box-sizing: border-box; }
19html, body { height: 100%; margin: 0; }
20body {
21 font: 15px/1.4 system-ui, sans-serif;
22 color: var(--fg);
23 background: var(--bg);
24 display: flex;
25 flex-direction: column;
26}
27button, input, select { font: inherit; }
28button {
29 padding: 0.35em 0.9em;
30 border: 1px solid var(--border);
31 border-radius: 6px;
32 background: var(--surface);
33 cursor: pointer;
34}
35button:hover { background: var(--hover); }
36a.button { display: block; padding: 0.35em 0.9em; border-radius: 6px; text-align: center; text-decoration: none; }
37button.primary, a.button.primary { background: #2563eb; border-color: #2563eb; color: white; }
38button:disabled { opacity: 0.5; cursor: default; }
39input, select { padding: 0.35em 0.6em; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--fg); }
40.error { color: var(--error); }
41.hint { color: var(--muted); font-size: 0.9em; }
42code { background: var(--hover); padding: 0.1em 0.3em; border-radius: 4px; }
43
44header {
45 display: flex;
46 align-items: center;
47 gap: 0.75em;
48 padding: 0.5em 1em;
49 background: var(--surface);
50 border-bottom: 1px solid var(--line);
51}
52header .brand { display: block; margin-right: 0.5em; }
53header > * { flex-shrink: 0; }
54header button { white-space: nowrap; }
55header nav { display: flex; gap: 0.25em; flex: 1 1 auto; }
56header nav button { border-color: transparent; }
57header nav button.active { background: var(--accent-bg); color: var(--accent-fg); }
58header .user { color: var(--muted); }
59main { flex: 1; min-height: 0; display: flex; }
60
61.login {
62 margin: 15vh auto;
63 width: min(320px, 90vw);
64 display: flex;
65 flex-direction: column;
66 gap: 0.75em;
67}
68.login label, .settings label { display: flex; flex-direction: column; gap: 0.2em; }
69
70.map-page { flex: 1; display: flex; min-height: 0; }
71.map-page aside {
72 width: 300px;
73 overflow-y: auto;
74 padding: 0.75em;
75 background: var(--surface);
76 border-right: 1px solid var(--line);
77}
78.map-page .map { flex: 1; }
79.people { list-style: none; margin: 0 0 1em; padding: 0; }
80.people li { padding: 0.5em; border-radius: 6px; cursor: pointer; }
81.people li:hover { background: var(--hover); }
82.people li.selected { background: var(--accent-bg); }
83.people .name { font-weight: 600; }
84.people .dot {
85 display: inline-block;
86 width: 0.7em;
87 height: 0.7em;
88 border-radius: 50%;
89 margin-right: 0.4em;
90}
91
92.settings { flex: 1; overflow-y: auto; padding: 1em; }
93.settings section {
94 max-width: 640px;
95 margin: 0 auto 1.5em;
96 padding: 1em;
97 background: var(--surface);
98 border: 1px solid var(--line);
99 border-radius: 8px;
100}
101.settings h2 { margin-top: 0; font-size: 1.1em; }
102.settings h3 { font-size: 1em; margin-bottom: 0.3em; }
103.settings form { display: flex; flex-wrap: wrap; gap: 0.5em; align-items: end; }
104.settings table { width: 100%; border-collapse: collapse; }
105.settings td, .settings th { text-align: left; padding: 0.3em 0.5em 0.3em 0; }
106.settings th { color: var(--muted); font-weight: normal; font-size: 0.9em; }
107
108@media (max-width: 700px) {
109 .map-page { flex-direction: column; }
110 .map-page aside { width: auto; max-height: 35vh; border-right: 0; border-bottom: 1px solid var(--line); }
111 header { gap: 0.5em; padding: 0.5em; }
112 header .user { display: none; }
113 header nav button, header > button:not(.theme) { padding: 0.35em 0.55em; }
114 header .brand { margin-right: 0; }
115}
116
117.settings .tabs {
118 display: flex;
119 flex-wrap: wrap;
120 gap: 0.25em;
121 max-width: 640px;
122 margin: 0 auto 1em;
123}
124.settings .tabs button { border-color: transparent; background: transparent; }
125.settings .tabs button.active { background: var(--accent-bg); color: var(--accent-fg); }
126.settings label.radio { flex-direction: row; align-items: center; gap: 0.4em; margin: 0.3em 0; }
127.settings td.actions { text-align: right; white-space: nowrap; }
128code.copy { word-break: break-all; user-select: all; }
129.map-page aside label { display: flex; flex-direction: column; gap: 0.2em; margin-bottom: 0.5em; }
130
131button.theme { display: flex; align-items: center; padding: 0.4em; }
132
133/* The street maps only have light styles. Inverting them gives a usable dark map. */
134:root[data-theme="dark"] .leaflet-tile-pane .street { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9); }
135@media (prefers-color-scheme: dark) {
136 :root:not([data-theme="light"]) .leaflet-tile-pane .street { filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9); }
137}
138.leaflet-container .leaflet-bar a,
139.leaflet-container .leaflet-control-attribution,
140.leaflet-container .leaflet-control-layers,
141.leaflet-tooltip { background: var(--surface); color: var(--fg); border-color: var(--line); }
142.leaflet-container .leaflet-control-attribution a { color: var(--accent-fg); }
143
144.send-location { border-top: 1px solid var(--line); margin-top: 1em; padding-top: 0.5em; }
145.send-location h3 { font-size: 1em; margin: 0.3em 0 0.6em; }
146.send-location .auto-send { display: flex; align-items: center; gap: 0.4em; margin-top: 0.6em; }
147.send-location .auto-send input[type="number"] { width: 5em; }
148.map-page aside .send-location label.radio { flex-direction: row; align-items: center; gap: 0.4em; margin: 0; }
149.settings fieldset { flex-basis: 100%; border: 1px solid var(--border); border-radius: 6px; margin: 0; padding: 0.3em 0.8em 0.5em; }
150.settings fieldset legend { padding: 0 0.3em; }
151.settings .device-choice { padding-left: 1.6em; }
152.settings .device-choice label:has(input:disabled) { color: var(--muted); }
153.guest-title { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
154/* Leaflet's own icon is an image file we do not ship. */
155.leaflet-container .leaflet-control-layers-toggle {
156 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 8l10 5 10-5z'/%3E%3Cpath d='m2 13 10 5 10-5'/%3E%3C/svg%3E");
157 background-size: 24px 24px;
158}
159