Files
trx-rs/src/trx-client/trx-frontend/trx-frontend-http/assets/web/style.css
T
sjg 7520796869 [feat](trx-frontend-http): add style picker with Nord, Monokai, Contrast themes
Add a style picker dropdown to the tab bar (right of rig picker) with
four styles — Original, Nord, Monokai, Contrast — each with full
light/dark variants.

CSS: define data-style attribute overrides for all CSS custom properties
(bg, card-bg, borders, text, accents, jog, audio level, filter, spectrum
background) for each of the three new styles × two themes (6 new blocks).

JS: introduce CANVAS_PALETTE lookup table covering spectrum/waveform/
waterfall colors for all style×theme combinations. Add currentStyle(),
canvasPalette(), setStyle() helpers. Persist selection to localStorage.

Replace all isLight ternaries in drawing code with palette lookups:
- drawOverviewWaterfall, drawOverviewSignalHistory, waterfallColor
  signatures changed from isLight flag to pal object
- drawSpectrum uses canvasPalette() for grid lines, labels, fill, line
- spectrumBgColor() now delegates to canvasPalette().bg

Theme toggle also triggers a spectrum redraw so canvas colors update
immediately when switching light/dark.

Also fix light-theme spectrum rendering broken since canvas drawing used
hardcoded dark-only colors (white grid lines invisible on light bg).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
2026-02-28 01:48:45 +01:00

1077 lines
32 KiB
CSS

:root {
--bg: #070d1a;
--card-bg: #0f172a;
--input-bg: #0b1324;
--border: #22324a;
--border-light: #304766;
--text: #e7edf9;
--text-muted: #91a3bd;
--text-heading: #c6d5ea;
--btn-bg: #16243a;
--btn-border: #3a5274;
--accent-green: #c24b1a;
--accent-yellow: #f0ad4e;
--accent-red: #e55353;
--control-height: 2.6rem;
--jog-hi: #243a5b;
--jog-lo: #14233a;
--jog-shadow: rgba(0,0,0,0.3);
--jog-inset: rgba(255,255,255,0.05);
--audio-level-bg: #14263f;
--audio-level-border: #304766;
--audio-level-fill-start: #c24b1a;
--audio-level-fill-end: #f0ad4e;
--filter-bg: #13253e;
--filter-fg: #e7edf9;
--filter-border: #385577;
--wavelength-fg: #8da3be;
--spectrum-bg: #0a0f18;
--jog-wheel-size: 83.2px;
--header-waterfall-overlap: 3.8rem;
}
[data-theme="light"] {
--bg: #edf2f7;
--card-bg: #ffffff;
--input-bg: #f7fafc;
--border: #d6deea;
--border-light: #bcc8da;
--text: #1a202c;
--text-muted: #4a5568;
--text-heading: #2d3748;
--btn-bg: #e6edf8;
--btn-border: #a9b8cf;
--accent-green: #b04317;
--accent-yellow: #b57600;
--accent-red: #cf3f3f;
--jog-hi: #e6edf8;
--jog-lo: #cdd9eb;
--jog-shadow: rgba(58, 79, 110, 0.18);
--jog-inset: rgba(255,255,255,0.75);
--audio-level-bg: #edf2fb;
--audio-level-border: #b8c5da;
--audio-level-fill-start: #b04317;
--audio-level-fill-end: #b57600;
--filter-bg: #eef3fb;
--filter-fg: #1f2937;
--filter-border: #b8c5da;
--wavelength-fg: #6b7280;
--spectrum-bg: #eef3fb;
}
body {
font-family: sans-serif;
margin: 0;
min-height: 100vh;
box-sizing: border-box;
display: block;
background: var(--bg);
color: var(--text);
overflow-x: hidden;
overflow-y: auto;
}
.card {
width: min(100%, 1280px);
margin: 0 auto;
padding: 0.85rem 1.25rem 1.5rem;
background: transparent;
box-sizing: border-box;
min-height: 100vh;
display: flex;
flex-direction: column;
overflow: visible;
}
.label { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 6px; display: block; }
#tab-main .label > span {
display: inline-block;
padding: 0.14rem 0.5rem;
border-radius: 999px;
border: 1px solid color-mix(in srgb, var(--border-light) 68%, transparent);
background: color-mix(in srgb, var(--btn-bg) 58%, transparent);
color: var(--text-muted);
font-size: 0.78rem;
font-weight: 700;
letter-spacing: 0.04em;
line-height: 1.2;
}
.status { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.1rem 1rem; }
.controls-tray-shell {
min-width: 0;
}
.controls-tray-scroll {
width: 100%;
min-width: 0;
overflow-x: auto;
overflow-y: hidden;
padding-bottom: 0.2rem;
}
.controls-tray {
display: grid;
gap: 0.95rem;
width: max(100%, 58rem);
min-width: 0;
box-sizing: border-box;
padding: 0.95rem 1rem 1rem;
border: 1px solid color-mix(in srgb, var(--border-light) 85%, transparent);
border-radius: 1rem;
background:
linear-gradient(180deg,
color-mix(in srgb, var(--surface) 88%, transparent),
color-mix(in srgb, var(--btn-bg) 76%, transparent));
box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 12%, transparent);
}
input.status-input, select.status-input { width: 100%; padding: 0.45rem 0.5rem; font-size: 1rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--input-bg); color: var(--text); }
#mode { height: var(--control-height); }
#freq { font-family: 'DSEG14 Classic', monospace; font-size: 2rem; padding: 0.5rem 0.6rem; letter-spacing: 0.05em; text-align: center; }
.controls-row {
display: grid;
grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
gap: 1rem;
align-items: start;
}
.controls-col {
min-width: 0;
display: flex;
flex-direction: column;
justify-content: flex-start;
}
.controls-col.label-below-col {
align-items: stretch;
}
.controls-col.label-below-col .label {
order: 2;
margin-top: 0.3rem;
margin-bottom: 0;
}
.controls-col-power.label-below-col .label {
justify-content: flex-end;
}
.controls-col.label-below-col > :not(.label) {
order: 1;
}
.controls-col.label-below-col .inline,
.controls-col.label-below-col .btn-grid {
align-self: stretch;
width: 100%;
margin-top: calc((var(--jog-wheel-size) - var(--control-height)) / 2);
}
.controls-col-center {
justify-self: center;
width: auto;
align-items: center;
}
.controls-col-wfm.label-below-col .label {
justify-content: flex-start;
}
.wfm-controls-inline {
gap: 0.6rem;
justify-content: flex-start;
}
.wfm-control {
display: flex;
align-items: center;
gap: 0.35rem;
color: var(--text-muted);
font-size: 0.85rem;
white-space: nowrap;
}
.wfm-control .status-input {
min-width: 4.6rem;
width: auto;
font-size: 0.9rem;
}
.controls-col-center::after {
content: "";
display: block;
min-height: 1.2rem;
margin-top: 0.3rem;
}
.controls-row .label {
margin-bottom: 6px;
margin-top: 0;
min-height: 1.2rem;
display: flex;
align-items: center;
white-space: nowrap;
}
.controls-col .inline,
.controls-col .btn-grid {
align-self: stretch;
}
.controls-col .jog-container { align-self: center; }
.btn-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0.5rem;
}
.btn-grid button { width: 100%; height: var(--control-height); }
.jog-container {
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
}
.jog-wheel {
width: var(--jog-wheel-size);
height: var(--jog-wheel-size);
border-radius: 50%;
background: radial-gradient(circle at 40% 35%, var(--jog-hi), var(--jog-lo));
border: 2px solid var(--border-light);
position: relative;
cursor: grab;
flex-shrink: 0;
box-shadow: 0 2px 8px var(--jog-shadow), inset 0 1px 0 var(--jog-inset);
user-select: none;
-webkit-user-select: none;
touch-action: none;
}
.jog-indicator {
position: absolute;
width: 6.4px;
height: 16px;
background: var(--accent-green);
border-radius: 2px;
top: 6.4px;
left: 50%;
transform-origin: 50% 35.2px;
transform: translateX(-50%);
pointer-events: none;
}
.jog-btn {
width: 3.3rem;
height: 3.3rem;
font-size: 1.8rem;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
flex-shrink: 0;
}
.jog-step {
display: flex;
border: 1px solid var(--border-light);
border-radius: 6px;
overflow: hidden;
height: 3.35rem;
flex-shrink: 0;
}
.jog-step button {
border: none;
border-right: 1px solid var(--border-light);
border-radius: 0;
height: 100%;
padding: 0 0.65rem;
font-size: 0.92rem;
background: var(--input-bg);
color: var(--text-muted);
cursor: pointer;
}
.jog-step button:last-child { border-right: none; }
.jog-step button.active {
background: var(--btn-bg);
color: var(--accent-green);
font-weight: 600;
}
.vfo-picker {
display: flex;
border: 1px solid var(--border-light);
border-radius: 6px;
overflow: hidden;
}
.vfo-picker button {
flex: 1;
border: none;
border-right: 1px solid var(--border-light);
border-radius: 0;
height: var(--control-height);
background: var(--input-bg);
color: var(--text-muted);
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 0.85rem;
}
.vfo-picker button:last-child { border-right: none; }
.vfo-picker button.active {
background: var(--btn-bg);
font-weight: 600;
}
.signal-measure {
display: inline-flex;
gap: 0.5rem;
align-items: center;
margin-top: 0.4rem;
}
button { padding: 0.5rem 0.9rem; border-radius: 6px; border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--text); cursor: pointer; height: var(--control-height); }
button:disabled { opacity: 0.6; cursor: not-allowed; }
.hint { color: var(--text-muted); font-size: 0.85rem; }
.inline { display: flex; gap: 0.5rem; align-items: center; }
.freq-inline {
gap: 0.35rem;
align-items: flex-start;
flex-wrap: nowrap;
}
.freq-field {
display: grid;
grid-template-rows: 3.35rem auto;
align-items: start;
}
.freq-field .label {
margin-top: 0.45rem;
margin-bottom: 0;
}
.frequency-col {
flex: 1 1 auto;
min-width: 0;
}
.center-frequency-col {
flex: 0 1 8.75rem;
min-width: 7.75rem;
}
.frequency-col input.status-input {
width: 100%;
height: 3.35rem;
box-sizing: border-box;
}
.wavelength-col {
flex: 0 0 auto;
}
.unit-col {
flex: 0 0 auto;
}
.unit-col .label {
display: flex;
justify-content: flex-end;
}
.label-below-row {
display: flex;
flex-direction: column;
}
#tab-main .label > span {
text-align: center;
}
.label-below-row > .label {
order: 2;
margin-top: 0.45rem;
margin-bottom: 0;
}
.label-below-row > :not(.label) {
order: 1;
}
.wavelength-display {
min-width: 5.2rem;
height: 3.35rem;
padding: 0 0.7rem;
border: 1px solid var(--border-light);
border-radius: 6px;
background: var(--input-bg);
color: var(--wavelength-fg);
display: inline-flex;
align-items: center;
justify-content: center;
font-family: 'DSEG14 Classic', monospace;
font-weight: 600;
font-size: 1.25rem;
letter-spacing: 0.03em;
white-space: nowrap;
flex-shrink: 0;
}
small { color: var(--text-muted); }
.header {
margin-bottom: 0;
padding: 0.25rem 0 0.15rem;
position: relative;
z-index: 3;
}
.header-main {
display: inline-flex;
align-items: center;
gap: 0.9rem;
max-width: min(100%, 46rem);
padding: 0.35rem 0.8rem 0.4rem 0.45rem;
margin-left: -0.3rem;
transform: translateY(-2px);
border-radius: 0.95rem;
background: color-mix(in srgb, var(--card-bg) 56%, transparent);
backdrop-filter: blur(12px) saturate(125%);
-webkit-backdrop-filter: blur(12px) saturate(125%);
box-shadow:
0 8px 20px color-mix(in srgb, #000000 18%, transparent),
inset 0 1px 0 color-mix(in srgb, #ffffff 10%, transparent);
}
.header-text {
width: auto;
min-width: 0;
flex: 0 1 auto;
}
.title { font-size: 1.4rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.35rem; }
.overview-strip {
width: 100%;
margin: calc(-1 * var(--header-waterfall-overlap)) 0 0.95rem;
position: relative;
z-index: 1;
}
.overview-toolbar {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.75rem;
margin-bottom: 0;
position: absolute;
top: calc(var(--header-waterfall-overlap) + 0.2rem);
right: 0.15rem;
z-index: 2;
}
.overview-label {
margin-left: auto;
color: var(--text-heading);
font-size: 0.82rem;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.overview-control {
display: inline-flex;
align-items: center;
gap: 0.4rem;
color: var(--text-muted);
font-size: 0.8rem;
white-space: nowrap;
}
.overview-control .status-input {
width: auto;
min-width: 4.6rem;
padding-top: 0.22rem;
padding-bottom: 0.22rem;
font-size: 0.85rem;
}
#overview-canvas {
width: 100%;
height: calc(clamp(4.2rem, 11vh, 6.25rem) + var(--header-waterfall-overlap));
display: block;
}
.header-left {
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
gap: 0;
flex-shrink: 0;
}
.top-bar-actions {
display: flex;
align-items: center;
gap: 0.6rem;
min-width: 0;
}
.header-rig-switch {
display: flex;
align-items: center;
gap: 0.35rem;
}
.header-rig-switch select {
min-width: 8rem;
height: 2rem;
padding: 0.15rem 0.35rem;
border: 1px solid var(--border-light);
border-radius: 6px;
background: var(--input-bg);
color: var(--text);
font-size: 0.85rem;
}
.header-rig-switch button {
height: 2rem;
padding: 0 0.65rem;
font-size: 0.78rem;
white-space: nowrap;
}
.header-bar-btn {
height: 2rem;
padding: 0 0.65rem;
font-size: 0.78rem;
white-space: nowrap;
}
.header-style-pick {
display: flex;
align-items: center;
}
.header-style-pick select {
height: 2rem;
padding: 0.15rem 0.35rem;
border: 1px solid var(--border-light);
border-radius: 6px;
background: var(--input-bg);
color: var(--text);
font-size: 0.85rem;
}
.header-logo { height: 4.6em; width: auto; flex-shrink: 0; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35)); }
.subtitle { color: var(--text-muted); font-size: 0.95rem; }
.subtitle a { color: var(--accent-green); text-decoration: none; }
.subtitle a:hover { text-decoration: underline; }
.band-tag { display: inline-block; padding: 2px 6px; border-radius: 6px; background: var(--btn-bg); color: var(--text); font-size: 0.82rem; border: 1px solid var(--border-light); margin-left: 6px; }
.signal { display: flex; gap: 0.6rem; align-items: center; }
.signal-bar { flex: 1 1 auto; height: 12px; border-radius: 999px; background: var(--btn-bg); border: 1px solid var(--border-light); overflow: hidden; }
.signal-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow), var(--accent-red)); transition: width 150ms ease; }
.signal-value { font-size: 0.95rem; color: var(--text-heading); min-width: 48px; text-align: right; }
.meter { display: flex; gap: 0.6rem; align-items: center; }
.meter-bar { flex: 1 1 auto; height: 12px; border-radius: 999px; background: var(--btn-bg); border: 1px solid var(--border-light); overflow: hidden; }
.meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow), var(--accent-red)); transition: width 150ms ease; }
.meter-value { font-size: 0.95rem; color: var(--text-heading); min-width: 64px; text-align: right; }
#content { display: flex; flex-direction: column; gap: 1.1rem; min-height: 0; overflow: visible; }
.tab-panel { flex: 1 1 auto; min-height: 0; overflow: visible; }
.tab-bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
margin-bottom: 0.85rem;
padding: 0.45rem 0 0.7rem;
border-bottom: 1px solid color-mix(in srgb, var(--border-light) 55%, transparent);
position: relative;
z-index: 2;
}
.tab-bar-nav {
display: flex;
align-items: center;
gap: 0.2rem;
}
.tab {
background: transparent;
border: none;
border-bottom: 2px solid transparent;
border-radius: 0;
padding: 0.5rem 0.95rem;
color: var(--text-muted);
cursor: pointer;
font-size: 0.95rem;
height: auto;
}
.tab.active { border-bottom-color: var(--accent-green); color: var(--accent-green); font-weight: 600; }
.tab:hover:not(.active) { color: var(--text); }
.about-table { width: 100%; border-collapse: collapse; }
.about-table td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.about-table tr:last-child td { border-bottom: none; }
.about-table td:first-child { color: var(--text-muted); width: 40%; }
.plugin-item { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); color: var(--text); }
.plugin-item:last-child { border-bottom: none; }
.footer { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 1rem; flex-shrink: 0; }
.full-row { grid-column: 1 / -1; }
.copyright { color: var(--text-muted); font-size: 0.75rem; opacity: 0.7; }
.copyright a { color: var(--accent-green); text-decoration: none; }
.copyright a:hover { text-decoration: underline; }
.vol-label {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.15rem;
color: var(--text-muted);
font-size: 0.82rem;
white-space: nowrap;
}
.vol-pct {
font-size: 0.72rem;
color: var(--text-muted);
line-height: 1;
}
.vol-slider {
-webkit-appearance: none;
appearance: none;
width: 80px;
height: 6px;
border-radius: 3px;
background: var(--btn-bg);
border: 1px solid var(--border-light);
outline: none;
cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--accent-green);
border: none;
cursor: pointer;
}
.vol-slider::-moz-range-thumb {
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--accent-green);
border: none;
cursor: pointer;
}
#audio-level {
flex: 1 1 auto;
height: 12px;
border-radius: 999px;
background: var(--audio-level-bg);
border: 1px solid var(--audio-level-border);
overflow: hidden;
min-width: 80px;
}
#audio-level-fill {
height: 100%;
width: 0%;
background: linear-gradient(90deg, var(--audio-level-fill-start), var(--audio-level-fill-end));
transition: width 100ms ease;
}
.sub-tab-bar { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 0.75rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sub-tab { flex-shrink: 0; background: transparent; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: 0.35rem 0.75rem; color: var(--text-muted); cursor: pointer; font-size: 0.85rem; height: auto; }
.sub-tab.active { border-bottom-color: var(--accent-green); color: var(--accent-green); font-weight: 600; }
.sub-tab:hover:not(.active) { color: var(--text); }
#aprs-map { min-height: 150px; border-radius: 6px; }
.aprs-controls { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.75rem; }
#aprs-packets { max-height: 360px; overflow-y: auto; border: 1px solid var(--border-light); border-radius: 6px; background: var(--input-bg); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.aprs-packet { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.82rem; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); line-height: 1.4; }
.aprs-packet:last-child { border-bottom: none; }
.aprs-call { color: var(--accent-green); font-weight: 600; }
.aprs-time { color: var(--text-muted); margin-right: 0.5rem; }
.aprs-symbol { display: inline-block; width: 24px; height: 24px; background-size: 384px 192px; vertical-align: middle; margin-right: 0.3rem; }
.aprs-pos { color: var(--accent-green); text-decoration: none; margin-left: 0.3rem; font-size: 0.8rem; }
.aprs-pos:hover { text-decoration: underline; }
.aprs-byte { color: var(--accent-yellow); background: rgba(255, 214, 0, 0.12); border: 1px solid rgba(255, 214, 0, 0.25); border-radius: 4px; padding: 0 0.2rem; margin: 0 0.1rem; font-size: 0.78em; }
.ft8-controls { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.75rem; }
.ft8-filter {
flex: 1;
min-width: 10rem;
height: var(--control-height);
box-sizing: border-box;
background: var(--filter-bg);
color: var(--filter-fg);
border: 1px solid var(--filter-border);
border-radius: 6px;
padding: 0.45rem 0.55rem;
}
.ft8-filter::placeholder { color: color-mix(in srgb, var(--filter-fg) 55%, transparent); }
.ft8-header { display: flex; gap: 0.6rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border-bottom: 1px solid var(--border); padding: 0 0 0.35rem 0; margin-bottom: 0.35rem; }
#ft8-messages { max-height: 360px; overflow-y: auto; border: 1px solid var(--border-light); border-radius: 6px; background: var(--input-bg); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.85rem; padding: 0.35rem 0.5rem; }
.ft8-row { display: flex; gap: 0.6rem; line-height: 1.4; border-bottom: 1px solid var(--border); padding: 0.25rem 0; }
.ft8-row:last-child { border-bottom: none; }
.ft8-time { color: var(--text-muted); min-width: 4.6rem; }
.ft8-snr { color: var(--accent-yellow); min-width: 3.6rem; text-align: right; }
.ft8-dt { color: var(--text-muted); min-width: 3.6rem; text-align: right; }
.ft8-freq { color: var(--accent-green); min-width: 4.6rem; text-align: right; }
.ft8-msg { flex: 1; }
.ft8-locator { color: var(--accent-green); background: rgba(0, 209, 127, 0.12); border: 1px solid rgba(0, 209, 127, 0.25); border-radius: 4px; padding: 0 0.2rem; margin: 0 0.1rem; font-weight: 600; }
.map-controls { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.6rem; color: var(--text-muted); font-size: 0.82rem; }
.map-controls label {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.25rem 0.45rem;
border-radius: 999px;
border: 1px solid var(--filter-border);
background: var(--filter-bg);
color: var(--filter-fg);
}
.map-controls input[type="checkbox"] { margin-right: 0.3rem; }
.cw-controls { display: flex; gap: 0.6rem; align-items: center; margin-bottom: 0.75rem; }
.cw-config { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.75rem; }
.cw-config label { display: flex; flex-direction: column; gap: 0.2rem; color: var(--text-muted); font-size: 0.82rem; }
.cw-config input[type="number"] { width: 5rem; padding: 0.3rem 0.4rem; font-size: 0.9rem; border: 1px solid var(--border-light); border-radius: 6px; background: var(--input-bg); color: var(--text); }
#cw-output { max-height: 360px; overflow-y: auto; border: 1px solid var(--border-light); border-radius: 6px; background: var(--input-bg); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.85rem; padding: 0.4rem 0.5rem; min-height: 60px; white-space: pre-wrap; word-break: break-all; }
.cw-line { line-height: 1.5; }
.cw-signal-on { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); flex-shrink: 0; }
.cw-signal-off { width: 10px; height: 10px; border-radius: 50%; background: var(--border-light); flex-shrink: 0; }
.cw-config .cw-auto-label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: var(--text-muted); cursor: pointer; flex-direction: row; }
.cw-auto-label input[type="checkbox"] { margin: 0; cursor: pointer; }
.cw-config input[type="number"][readonly] { opacity: 0.6; }
button:focus-visible, input:focus-visible, select:focus-visible {
outline: 2px solid var(--accent-green);
outline-offset: 2px;
}
@media (max-width: 900px) {
.card { width: 100%; padding-left: 0.9rem; padding-right: 0.9rem; }
}
@media (max-width: 760px) {
.card { padding: 0.7rem 0.7rem 1rem; }
button { min-height: 2.8rem; font-size: 0.95rem; }
input.status-input, select.status-input { font-size: 1.1rem; }
:root { --header-waterfall-overlap: 2.6rem; }
.controls-tray { width: max(100%, 52rem); padding-left: 0.85rem; padding-right: 0.85rem; }
.freq-inline { gap: 0.5rem; }
.freq-inline { flex-wrap: wrap; }
.header-text { width: auto; min-width: 0; flex: 0 1 auto; }
.header-main {
max-width: 100%;
padding-right: 0.65rem;
margin-left: -0.15rem;
transform: translateY(-1px);
}
.header-left { justify-content: flex-end; }
.tab-bar { flex-wrap: wrap; }
.top-bar-actions { width: 100%; justify-content: space-between; }
.header-rig-switch { width: auto; justify-content: flex-end; }
.header-rig-switch select { min-width: 6.5rem; }
.overview-toolbar { top: calc(var(--header-waterfall-overlap) + 0.15rem); }
.controls-row { grid-template-columns: 1fr auto; }
.controls-col-wfm { grid-column: 1 / -1; }
.controls-col-power { grid-column: 1 / -1; }
.controls-col.label-below-col .inline,
.controls-col.label-below-col .btn-grid { margin-top: 0; }
.wfm-controls-inline { flex-wrap: wrap; }
.ft8-controls { flex-wrap: wrap; }
#ft8-decode-toggle-btn, #wspr-decode-toggle-btn { white-space: nowrap; }
.jog-container { flex-wrap: wrap; }
.vfo-picker { flex-direction: column; }
.vfo-picker button { border-right: none; border-bottom: 1px solid var(--border-light); }
.vfo-picker button:last-child { border-bottom: none; }
}
/* ── Spectrum display ─────────────────────────────────────────────────── */
#spectrum-panel {
margin-bottom: 0.9rem;
}
.spectrum-wrap {
position: relative;
width: 100%;
user-select: none;
}
#spectrum-canvas {
display: block;
width: 100%;
height: 160px;
background: var(--spectrum-bg);
border-radius: 6px 6px 0 0;
cursor: crosshair;
touch-action: none;
}
#spectrum-freq-axis {
position: relative;
height: 18px;
width: 100%;
font-size: 0.7rem;
color: var(--text-muted);
background: var(--bg-secondary);
border-radius: 0 0 6px 6px;
border: 1px solid var(--border);
border-top: none;
}
#spectrum-freq-axis span {
position: absolute;
transform: translateX(-50%);
white-space: nowrap;
top: 2px;
}
#spectrum-tooltip {
display: none;
position: absolute;
pointer-events: none;
background: rgba(10,15,24,0.85);
color: #00e676;
font-size: 0.75rem;
font-family: monospace;
padding: 2px 6px;
border-radius: 4px;
border: 1px solid rgba(0,230,118,0.3);
white-space: nowrap;
z-index: 10;
}
#spectrum-controls {
display: flex;
align-items: center;
justify-content: space-between;
padding: 3px 4px 0;
gap: 0.6rem;
font-size: 0.78rem;
color: var(--text-muted);
}
#spectrum-bw-row {
display: flex;
align-items: center;
gap: 0.4rem;
}
#spectrum-bw-label {
display: flex;
align-items: center;
gap: 0.3rem;
font-size: 0.75rem;
color: var(--text-muted);
min-width: 0;
}
#spectrum-bw-input {
width: 4.5rem;
padding: 1px 4px;
font-size: 0.75rem;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--input-bg);
color: var(--text);
text-align: right;
height: 1.5rem;
}
#spectrum-bw-set-btn {
height: 1.5rem;
min-height: 0;
padding: 0 8px;
font-size: 0.73rem;
}
#spectrum-level-row {
display: flex;
align-items: center;
gap: 0.4rem;
}
#spectrum-floor-label {
display: flex;
align-items: center;
gap: 0.3rem;
font-size: 0.75rem;
color: var(--text-muted);
}
#spectrum-floor-input {
width: 3.4rem;
padding: 1px 4px;
font-size: 0.75rem;
border: 1px solid var(--border);
border-radius: 4px;
background: var(--input-bg);
color: var(--text);
text-align: right;
height: 1.5rem;
}
#spectrum-auto-btn {
height: 1.5rem;
min-height: 0;
padding: 0 8px;
font-size: 0.73rem;
}
.spectrum-hint-mouse,
.spectrum-hint-touch {
font-size: 0.68rem;
color: var(--text-muted);
text-align: right;
margin-top: 2px;
opacity: 0.6;
}
/* Show correct hint based on input device */
.spectrum-hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
.spectrum-hint-mouse { display: none; }
.spectrum-hint-touch { display: block; }
}
/* ── Phone layout (≤ 520px) ───────────────────────────────────────────── */
@media (max-width: 520px) {
/* Remove forced min-width — no horizontal scroll on phones */
.controls-tray {
width: 100%;
}
/* Single-column controls: jog first, then mode, then power */
.controls-row {
grid-template-columns: 1fr;
}
.controls-col-center {
order: -1;
justify-self: center;
width: auto;
}
.controls-col-center::after { display: none; }
.controls-col.label-below-col .inline,
.controls-col.label-below-col .btn-grid { margin-top: 0; }
/* Scale frequency display to fit narrow screens */
#freq { font-size: clamp(1.3rem, 6vw, 2rem); }
/* Wider volume sliders for touch */
.vol-slider { width: clamp(80px, 35vw, 140px); }
.vol-slider::-webkit-slider-thumb { width: 20px; height: 20px; }
.vol-slider::-moz-range-thumb { width: 20px; height: 20px; }
/* Spectrum control inputs and buttons: meet minimum tap-target size */
#spectrum-bw-input,
#spectrum-floor-input {
height: 2.2rem;
font-size: 0.82rem;
}
#spectrum-bw-set-btn,
#spectrum-auto-btn {
height: 2.2rem;
min-height: 0;
padding: 0 10px;
font-size: 0.82rem;
}
}
/* ── Nord style ───────────────────────────────────────────────────────── */
[data-style="nord"] {
--bg: #242933;
--card-bg: #2e3440;
--input-bg: #242933;
--border: #3b4252;
--border-light: #4c566a;
--text: #d8dee9;
--text-muted: #8a9ab0;
--text-heading: #eceff4;
--btn-bg: #3b4252;
--btn-border: #5e6f88;
--accent-green: #88c0d0;
--accent-yellow: #ebcb8b;
--accent-red: #bf616a;
--jog-hi: #434c5e;
--jog-lo: #3b4252;
--jog-shadow: rgba(0,0,0,0.40);
--jog-inset: rgba(255,255,255,0.06);
--audio-level-bg: #2e3440;
--audio-level-border: #4c566a;
--audio-level-fill-start: #88c0d0;
--audio-level-fill-end: #ebcb8b;
--filter-bg: #3b4252;
--filter-fg: #d8dee9;
--filter-border: #5e6f88;
--wavelength-fg: #7a8ea8;
--spectrum-bg: #1e2530;
}
[data-style="nord"][data-theme="light"] {
--bg: #e5e9f0;
--card-bg: #eceff4;
--input-bg: #d8dee9;
--border: #c5ccd8;
--border-light: #a8b2c0;
--text: #2e3440;
--text-muted: #4c566a;
--text-heading: #2e3440;
--btn-bg: #d8dee9;
--btn-border: #8fa3b8;
--accent-green: #5e81ac;
--accent-yellow: #c07a22;
--accent-red: #bf616a;
--jog-hi: #d8dee9;
--jog-lo: #c2cbd8;
--jog-shadow: rgba(46,52,64,0.18);
--jog-inset: rgba(255,255,255,0.70);
--audio-level-bg: #d0d6e0;
--audio-level-border: #a8b2c0;
--audio-level-fill-start: #5e81ac;
--audio-level-fill-end: #c07a22;
--filter-bg: #d8dee9;
--filter-fg: #2e3440;
--filter-border: #8fa3b8;
--wavelength-fg: #5a6a80;
--spectrum-bg: #dde1e9;
}
/* ── Monokai style ────────────────────────────────────────────────────── */
[data-style="monokai"] {
--bg: #1c1c17;
--card-bg: #272822;
--input-bg: #1c1c17;
--border: #3e3d32;
--border-light: #5c5c45;
--text: #f8f8f2;
--text-muted: #908980;
--text-heading: #f8f8f2;
--btn-bg: #3e3d32;
--btn-border: #75715e;
--accent-green: #a6e22e;
--accent-yellow: #e6db74;
--accent-red: #f92672;
--jog-hi: #49483e;
--jog-lo: #3e3d32;
--jog-shadow: rgba(0,0,0,0.45);
--jog-inset: rgba(255,255,255,0.05);
--audio-level-bg: #272822;
--audio-level-border: #5c5c45;
--audio-level-fill-start: #a6e22e;
--audio-level-fill-end: #e6db74;
--filter-bg: #3e3d32;
--filter-fg: #f8f8f2;
--filter-border: #75715e;
--wavelength-fg: #9c8f78;
--spectrum-bg: #181815;
}
[data-style="monokai"][data-theme="light"] {
--bg: #f5f0e4;
--card-bg: #fdf9f2;
--input-bg: #ede8d8;
--border: #d8d0bb;
--border-light: #c0b89e;
--text: #272822;
--text-muted: #6e6a56;
--text-heading: #272822;
--btn-bg: #ede8d8;
--btn-border: #b0a888;
--accent-green: #5f8700;
--accent-yellow: #9a7200;
--accent-red: #c60052;
--jog-hi: #ede8d8;
--jog-lo: #ddd8c8;
--jog-shadow: rgba(39,40,34,0.18);
--jog-inset: rgba(255,255,255,0.75);
--audio-level-bg: #ede8d8;
--audio-level-border: #c0b89e;
--audio-level-fill-start: #5f8700;
--audio-level-fill-end: #9a7200;
--filter-bg: #ede8d8;
--filter-fg: #272822;
--filter-border: #b0a888;
--wavelength-fg: #7a7260;
--spectrum-bg: #ede8d8;
}
/* ── Contrast style ───────────────────────────────────────────────────── */
[data-style="contrast"] {
--bg: #000000;
--card-bg: #0a0a0a;
--input-bg: #111111;
--border: #333333;
--border-light: #555555;
--text: #ffffff;
--text-muted: #bbbbbb;
--text-heading: #ffffff;
--btn-bg: #1a1a1a;
--btn-border: #666666;
--accent-green: #00ff88;
--accent-yellow: #ffcc00;
--accent-red: #ff3344;
--jog-hi: #2a2a2a;
--jog-lo: #1a1a1a;
--jog-shadow: rgba(0,0,0,0.60);
--jog-inset: rgba(255,255,255,0.08);
--audio-level-bg: #111111;
--audio-level-border: #555555;
--audio-level-fill-start: #00ff88;
--audio-level-fill-end: #ffcc00;
--filter-bg: #1a1a1a;
--filter-fg: #ffffff;
--filter-border: #666666;
--wavelength-fg: #aaaaaa;
--spectrum-bg: #000000;
}
[data-style="contrast"][data-theme="light"] {
--bg: #ffffff;
--card-bg: #f4f4f4;
--input-bg: #e8e8e8;
--border: #cccccc;
--border-light: #999999;
--text: #000000;
--text-muted: #333333;
--text-heading: #000000;
--btn-bg: #e0e0e0;
--btn-border: #777777;
--accent-green: #005cc5;
--accent-yellow: #cc5500;
--accent-red: #cc0000;
--jog-hi: #e0e0e0;
--jog-lo: #cccccc;
--jog-shadow: rgba(0,0,0,0.25);
--jog-inset: rgba(255,255,255,0.80);
--audio-level-bg: #e8e8e8;
--audio-level-border: #999999;
--audio-level-fill-start: #005cc5;
--audio-level-fill-end: #cc5500;
--filter-bg: #e8e8e8;
--filter-fg: #000000;
--filter-border: #999999;
--wavelength-fg: #444444;
--spectrum-bg: #f4f4f4;
}