File size: 12,322 Bytes
843a4b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4f5e7fd
 
843a4b2
 
 
 
9355f7d
843a4b2
9355f7d
843a4b2
 
 
 
 
 
 
 
 
 
 
 
a33a583
 
 
 
 
 
 
 
 
 
843a4b2
d96c9a7
4f5e7fd
 
843a4b2
4f5e7fd
 
843a4b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4f5e7fd
843a4b2
 
 
 
 
 
 
4f5e7fd
 
843a4b2
 
 
 
4f5e7fd
843a4b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4f5e7fd
843a4b2
 
 
 
 
 
4f5e7fd
 
843a4b2
 
 
 
 
 
 
 
 
4f5e7fd
 
843a4b2
 
 
 
4f5e7fd
843a4b2
 
 
4f5e7fd
 
843a4b2
 
4f5e7fd
843a4b2
d96c9a7
843a4b2
 
d96c9a7
 
843a4b2
 
d96c9a7
 
843a4b2
 
 
 
 
4f5e7fd
843a4b2
 
4f5e7fd
843a4b2
 
 
 
4f5e7fd
843a4b2
 
4f5e7fd
843a4b2
 
4f5e7fd
 
843a4b2
4f5e7fd
 
843a4b2
 
4f5e7fd
843a4b2
 
 
 
 
 
d96c9a7
843a4b2
 
d96c9a7
843a4b2
d96c9a7
 
843a4b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d96c9a7
843a4b2
 
 
 
 
 
 
 
 
a33a583
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
843a4b2
 
 
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
/* Morse Code Β· Reachy Mini β€” mobile-first, dark/light themed. */

:root {
    --bg: #0d1117;
    --bg-soft: #161b22;
    --panel: #1b222c;
    --panel-2: #232c38;
    --text: #e8edf3;
    --muted: #93a1b3;
    --line: #2b3442;
    --accent: #5b8cff;
    --accent-2: #8a6cff;
    --danger: #ff5a78;
    --good: #36d399;
    --scope-fill: rgba(91, 140, 255, 0.45);
    --scope-mark: rgba(255, 90, 120, 0.95);
    --radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
    --bg: #f4f6fb;
    --bg-soft: #ffffff;
    --panel: #ffffff;
    --panel-2: #eef2f9;
    --text: #131923;
    --muted: #5d6b7e;
    --line: #dde3ee;
    --accent: #2f6bff;
    --accent-2: #7a4dff;
    --scope-fill: rgba(47, 107, 255, 0.30);
    --scope-mark: rgba(214, 40, 79, 0.95);
    --shadow: 0 10px 30px rgba(20, 30, 60, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#app {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 720px;
    margin: 0 auto;
}

/* ─── App bar ─────────────────────────────────────────────── */
.appbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    padding-top: max(10px, env(safe-area-inset-top));
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.brand-logo { font-size: 22px; }
.brand-logo-img { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; display: block; }

.icon-btn {
    appearance: none;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--text);
    width: 40px; height: 40px;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
}
.icon-btn:active { transform: scale(0.95); }
.icon-btn.tiny { width: 32px; height: 32px; font-size: 14px; }

/* App / Demo mode toggle in the header */
.mode-seg { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.mode-btn {
    appearance: none; background: transparent; border: 0; color: var(--muted);
    padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.mode-btn.active { background: var(--panel-2); color: var(--text); box-shadow: var(--shadow); }
.page-host { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* ─── Scrolling single page ───────────────────────────────── */
.scroller { flex: 1; padding: 12px 14px 40px; display: flex; flex-direction: column; gap: 12px; }
.divider { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 0; }
.view-host { flex: 1; padding: 16px 16px 96px; }
.view { display: flex; flex-direction: column; gap: 9px; scroll-margin-top: 64px; }
.view h2 { margin: 0; font-size: 17px; letter-spacing: -0.01em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.view h3 { margin: 6px 0; font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.muted { color: var(--muted); }

.tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
}
.tab {
    flex: 1 1 0;
    max-width: 160px;
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.tab-ico { font-size: 20px; }
.tab.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ─── Fields & controls ───────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.send-row { margin-top: 4px; }

.compose-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 17px;
    font-family: inherit;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
}
.compose-input:focus { border-color: var(--accent); }

.btn {
    appearance: none;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; color: #fff; }
.btn.ghost { background: transparent; }
.btn.big { flex: 1; padding: 16px; font-size: 17px; }
.btn.listening { background: linear-gradient(135deg, var(--danger), #ff9a5a); }

.segmented { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg {
    flex: 1;
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--muted);
    padding: 8px 6px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.seg.active { background: var(--panel-2); color: var(--text); box-shadow: var(--shadow); }

.range { width: 100%; accent-color: var(--accent); }
.range-val { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); }

.status { font-size: 13px; min-height: 16px; }
.send-row { margin-top: 0; }
.warn { color: var(--danger); font-size: 14px; font-weight: 600; }

/* ─── Morse chips ─────────────────────────────────────────── */
.morse-out {
    min-height: 34px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 10px;
    padding: 10px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.pattern { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 100%; }
.pattern .dot, .pattern .dash {
    display: inline-block;
    height: 10px;
    border-radius: 5px;
    background: var(--accent);
}
.pattern .dot { width: 10px; }
.pattern .dash { width: 22px; background: var(--accent-2); }
.wordsep { color: var(--muted); font-weight: 800; padding: 0 2px; }

/* ─── Listen ──────────────────────────────────────────────── */
.scope {
    width: 100%;
    height: 84px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: block;
}
.decoded-text {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-height: 26px;
    word-break: break-word;
}
.decoded-morse { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; word-break: break-all; color: var(--muted); }
.transcript { display: flex; flex-direction: column; gap: 6px; max-height: 30vh; overflow-y: auto; }
.line {
    display: flex; flex-direction: column; gap: 1px;
    padding: 7px 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.line-text { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 16px; }
.line-morse { font-family: "JetBrains Mono", monospace; font-size: 12px; }

/* ─── Learn chart ─────────────────────────────────────────── */
.chart-section { display: flex; flex-direction: column; gap: 8px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.chart-cell {
    appearance: none;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
    padding: 12px 8px;
    min-height: 78px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    cursor: pointer;
}
.chart-cell:active { transform: scale(0.96); }
.cell-char { font-size: 22px; font-weight: 800; }
.chart-cell.ping { animation: ping 0.4s ease; border-color: var(--accent); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }

/* ─── Settings sheet / overlay ────────────────────────────── */
.overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(0, 0, 0, 0.5);
    display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
    width: 100%;
    max-width: 720px;
    max-height: 88dvh;
    overflow-y: auto;
    background: var(--bg-soft);
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow);
    padding: 16px 18px calc(28px + env(safe-area-inset-bottom));
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--bg-soft); padding-bottom: 8px; }
.settings-body { display: flex; flex-direction: column; gap: 14px; }
.version { text-align: center; font-size: 12px; margin-top: 6px; }

/* ─── Toast ───────────────────────────────────────────────── */
.toast {
    position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px);
    background: var(--panel-2); color: var(--text);
    border: 1px solid var(--line);
    padding: 12px 18px; border-radius: 12px;
    box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transition: all 0.25s ease;
    z-index: 100; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Demo mode ───────────────────────────────────────────── */
.scope-big { height: 110px; }
.demo-decoded {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    min-height: 50px;
    word-break: break-word;
    color: var(--accent);
}
.demo-status { text-align: center; min-height: 16px; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; flex: 0 0 auto; }

.demo-setup { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.tiny { font-size: 12px; }
.rule-list { display: flex; flex-direction: column; gap: 8px; }
.rule-row { display: flex; align-items: center; gap: 6px; }
.rule-input {
    flex: 1; min-width: 0; padding: 9px 10px; font-size: 14px; font-family: inherit;
    color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; outline: none;
}
.rule-input:focus { border-color: var(--accent); }
.rule-arrow { color: var(--muted); font-weight: 800; }

@media (max-width: 420px) {
    .brand-name { display: none; }
}
@media (min-width: 560px) {
    .tab-label { font-size: 13px; }
}