@font-face {
  font-family: "Digital-7 Mono";
  src: url("fonts/digital-7-mono.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #101419;
  --accent: #ff9d00;
  --text-dim: #7a8590;
  --lcd: #a5c3d7;
  --key-face: linear-gradient(#6a7174 0%, #50565a 32%, #3d4145 70%, #2e3336 100%);
  --key-text: #c9ccce;
}

* { box-sizing: border-box; }

/* The page does not move up and down (no rubber band on the phone): the document itself never scrolls, only main does,
   and only if its content is taller than the screen. */
html { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  justify-content: center;
  align-items: stretch; /* the page is as tall as the window: the scope takes what is left, down to the bottom edge */
  background: var(--bg);
  color: var(--text-dim);
  font-family: system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

main {
  width: 100%;
  max-width: 390px; /* phone width (iPhone 13): the desktop shows the same layout, so the design can be judged there */
  padding: 0.5rem 1rem 5px; /* little room above (the status bar is already clear of the page); 5 px room below the waterfall (above the home indicator) */
  height: 100%; /* of the body, which keeps its lower edge free for the home indicator (safe-area padding): the scope ends above it */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}
.status-row { flex-wrap: nowrap; row-gap: 0.3rem; align-items: flex-end; margin-bottom: 0.9rem; } /* logo and model line share the bottom edge */
.icom-logo { height: 1.25rem; margin-left: 0.4rem; width: auto; color: #8c949b; flex: none; }
.model { display: flex; align-items: flex-end; gap: 0.4rem; white-space: nowrap; cursor: pointer; }
.icon-btn.mic-btn { margin-right: 0.5rem; } /* the microphone sits left of the record key */
.model-name { height: 0.7rem; width: auto; color: #8c949b; flex: none; } /* same scale as the logo: 1.5rem per 17.3 units */
/* connection messages ("Keine Verbindung ...") get their own centred line, empty means nothing is shown */
.status { color: var(--accent); order: 3; flex: 1 0 100%; text-align: center; }
.status:empty { display: none; }

.freq-row { display: flex; align-items: center; justify-content: center; gap: 0.8rem; margin: 0 0 0.8rem; } /* a little space under the digits for the row of marks (freq-flags), between the frequency and the meter */
/* memory function and SCAN are switched off for now (MEMORY_ENABLED in app.js): their keys and the MEM line stay hidden */
.vfo-info[hidden] { display: none; }

.freq {
  font-family: "Digital-7 Mono", monospace;
  /* 11 characters are about 5 em wide; leave room for the BUSY/TX lamps and the page padding */
  font-size: min(4.6rem, calc((min(100vw, 390px) - 6rem) / 5.1)); /* from the page width, not the window: same size on the desktop as on the phone */
  line-height: 1;
  color: var(--lcd);
  text-shadow: 0 0 8px rgba(165, 195, 215, 0.35);
  white-space: nowrap;
}
.freq.off { color: var(--text-dim); text-shadow: none; }
.freq .digit {
  display: inline-block;
  position: relative;
  z-index: 0;
  cursor: ns-resize;
  border-radius: 4px;
}
.freq .digit::before {
  content: "8";
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
  color: rgba(165, 195, 215, 0.05); /* paler than before */
  text-shadow: 0 0 2px rgba(165, 195, 215, 0.08); /* the glow of .freq made these blurry: much smaller now */
}
.freq.off .digit { pointer-events: none; }
.freq .digit:hover { background: rgba(255, 157, 0, 0.18); }

.leds { display: flex; flex-direction: column; gap: 0.3rem; width: 3.4rem; } /* fixed width: BUSY and TX are the same size */
.led {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-align: center;
}
.busy-led { background: #14220f; color: #3f5a35; }
.busy-led.on { background: rgb(128, 218, 72); color: #0b1a06; box-shadow: 0 0 10px rgba(128, 218, 72, 0.6); }
.busy-led.tx { background: rgb(240, 28, 28); color: #fff; box-shadow: 0 0 10px rgba(240, 28, 28, 0.7); } /* the same LED turns red while transmitting */
.vfo-tag { font: inherit; font-size: 0.7rem; padding: 0.15rem 0; width: 100%; border-radius: 4px; text-align: center; color: #a4aba4; background: #101110; border: 1px solid #343834; cursor: pointer; }
/* VFO A / VFO B is a toggle, not a state: it does not light up */

.selects { display: flex; gap: 0.45rem; margin: 0.75rem 0 1.1rem; } /* twice the gap between the meter and the indicators */
.scope-controls select {
  background: #1a1f25; color: var(--key-text); border: 1px solid #000; border-radius: 5px;
  padding: 0.45rem 0.4rem; font: inherit; font-size: 0.9rem;
}

/* Touch keys as on the IC-705 display: mode blue, filter (and band) near-black, large white text */
.lcd-btn {
  position: relative; flex: 1; min-width: 0; height: 2.7rem; padding: 0 0.4rem;
  border: 1px solid; border-radius: 5px; color: #fff; font: inherit; font-size: 1.3rem; letter-spacing: 0.01em;
  cursor: pointer; white-space: nowrap;
}
.selects .lcd-btn { height: 2.2rem; font-size: 1.05rem; } /* the BAND / MODE / FILTER / MEM row: about 20 % smaller */
.lcd-btn.dark { background: linear-gradient(#2a2d2a 0%, #1b1c1b 50%, #0e0e0e 100%); border-color: #3d3f3d; }
.lcd-btn.blue { flex: 1; background: linear-gradient(#2e5175 0%, #22456a 45%, #0e2c49 100%); border-color: #3d6c9c; }
.lcd-btn:active { filter: brightness(1.3); }
.lcd-btn:disabled { opacity: 0.4; cursor: default; filter: none; }

.meter { background: var(--panel); border-radius: 8px; padding: 0.7rem 0.8rem 0.5rem; margin-bottom: 0.8rem; }
/* IC-705 look: segmented LED bar on black, blue up to S9, red above */
.meter { background: #000; }
.bar {
  height: 22px;
  border-radius: 1px;
  background: #000;
  border: 1px solid #2a2f35;
  overflow: hidden;
  position: relative;
}
/* real segments (60, SEGS in app.js): each one is an element that is lit or not; blue up to the red mark of the shown reading, red above it */
.bar i { display: flex; gap: 2px; height: 100%; width: 100%; }
.bar i u { flex: 1 1 0; min-width: 0; background: #15191e; text-decoration: none; }
.bar i u.on, .bar i u.pk { background: #2a6fe0; }
.bar i u.on.r, .bar i u.pk.r { background: #e8262a; }
.scale { position: relative; height: 1rem; font-size: 0.7rem; }
.scale.top { margin-bottom: 0.2rem; color: #e6e9ec; }
.scale.po { margin-top: 0.2rem; color: #8a929a; }
.scale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.scale span.lead { transform: none; }
.scale span.last { transform: translateX(-100%); }
.scale.top span.over { color: #e8262a; }
.scale.top span.tick::after { /* little tick between label and bar */
  content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 3px; background: currentColor;
}
.scale.top span.gray { color: #8a929a; }
/* the dBm value sits on top of the bar at its right end, so the bar keeps its full width */
.bar-wrap { position: relative; }
.smeter-text {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 0.85rem; font-weight: 400; color: rgba(255, 255, 255, 0.55); pointer-events: none;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* the data rate sits in the header, centred between the logo and the model line */
.audio-info { position: relative; font-size: 0.85rem; color: #aab3bc; flex: 1 1 0; text-align: center; min-width: 0; padding: 0 0.4rem; margin-bottom: -0.18rem; margin-right: -0.5rem; white-space: nowrap; } /* takes what is left between logo and model name; the header never wraps; the margin puts the text on the height of the icons */ /* takes what is left between logo and model name; the header never wraps */
.traffic { position: relative; display: inline-block; max-width: 100%; vertical-align: bottom; cursor: default; outline: none; }
.audio-info .traffic { opacity: 0.8; } /* the readout looks the same on the phone and on the desktop (desktop.css has the same two lines) */
.audio-info.show .traffic { opacity: 0.9; }
#traffic-text { display: block; overflow: hidden; text-overflow: ellipsis; }
#traffic-text.hint { color: var(--accent); }
.latency { margin-left: 0.6rem; }
.latency.empty { display: none; }
#latency-text.trim { color: var(--accent); } /* the playback buffer was just cut back */
#latency-text { display: block; }
/* details of the data rate: on hover or focus, and after a tap on touch screens */
.traffic-tip {
  display: none; position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%); z-index: 30;
  grid-template-columns: auto auto; gap: 0.2rem 1rem; padding: 0.55rem 0.7rem; text-align: left; white-space: nowrap;
  background: #1a1f25; border: 1px solid #2c3743; border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); color: #cfd4d9; font-size: 0.85rem;
}
.audio-info.show .traffic-tip { display: grid; }
.tip-lat, .tip-rate { display: contents; }
.tip-lat.off { display: none; }
.tip-clients { grid-column: 1 / -1; display: block; border-top: 1px solid #2c3743; margin-top: 0.3rem; padding-top: 0.35rem; }
.tip-clients:empty { display: none; }
.tip-clients .cl-h { margin-bottom: 0.15rem; }
.tip-clients .cl-row { display: flex; gap: 1rem; white-space: nowrap; }
.tip-clients .cl-time { flex: none; font-variant-numeric: tabular-nums; }
.tip-clients .cl-me { color: #fff; } /* the client list in the connection details (as in open890rc) */
.tip-rate .tt-total { border-top: 0; padding-top: 0; margin-top: 0; } /* the data rate is the first line of the box */
.tip-lat .tt-total { border-top: 0; padding-top: 0; margin-top: 0; border-bottom: 1px solid #2c3743; padding-bottom: 0.3rem; margin-bottom: 0.2rem; } /* the delay total is the second line, the line below separates it from the parts */
.audio-info.standby .traffic-tip { display: none !important; } /* nothing to list while the radio is in standby */
@media (hover: hover) { .audio-info:hover .traffic-tip { display: grid; } } /* hover only where there is a mouse: on a touch screen a tap leaves a hover behind and the details could not be closed again */
.traffic:focus { outline: none; }
.tt-h { grid-column: 1 / -1; color: #b4bbc2; font-size: 0.95rem; margin-bottom: 0.25rem; }
.tt-v { text-align: right; font-variant-numeric: tabular-nums; }
.traffic-tip .warn { color: var(--accent); }
.tt-total { border-top: 1px solid #2c3743; padding-top: 0.25rem; margin-top: 0.1rem; color: #fff; }

.levels { margin: 0 0 1.1rem; display: flex; gap: 1rem; align-items: stretch; }
.level-col { flex: 2 1 0; min-width: 0; display: grid; gap: 0.4rem; }
.tx-btn { flex: 1 1 0; min-width: 0; font: inherit; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.05em; color: #7a4040; background: #000; border: 2px solid #4a2020; border-radius: 6px; cursor: pointer; transition: all 0.1s; } /* the TX key of open890rc: dark with a dark red outline, glows red on air */
.tx-btn { touch-action: none; -webkit-touch-callout: none; transform: scale(0.8); transform-origin: right center; } /* 20 % smaller, flush with the right edge, centred vertically; the sliders keep their width */
.tx-btn:active, .tx-btn.on { background: #000; border-color: #ff2020; color: #ff3030; box-shadow: 0 0 8px 1px rgba(255, 0, 0, 0.7), inset 0 0 6px rgba(255, 0, 0, 0.3); }
.tx-btn:disabled { opacity: 0.5; cursor: default; }
.rs-field input[type="range"] { flex: 1; accent-color: var(--accent); }
.rs-field input[type="range"]:disabled { opacity: 0.4; }
.rs-field output { width: 2.6rem; text-align: right; color: var(--lcd); }
.levels label, .levels .level-row { display: flex; align-items: center; gap: 0.7rem; font-size: 0.85rem; }
.levels label span, .af-toggle { width: 2.2rem; }
/* AF: its label switches the sound on and off; when the sound is not running the whole row is greyed out */
.af-toggle { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.level-row.off input, .level-row.off output { opacity: 0.16; filter: grayscale(0.6); } /* sound off: the AF slider almost disappears */
.level-row.off .af-toggle { color: #ff4d4d; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; } /* sound off (or not running): AF underlined and red */
.levels input[type="range"] { flex: 1; accent-color: var(--accent); }
.levels output { width: 2.4rem; text-align: right; color: var(--lcd); font-variant-numeric: tabular-nums; }
.levels.off { pointer-events: none; }
.levels.off .level-col { opacity: 0.4; } /* the sliders only: the TX key is dimmed by its own rule (20 %), not twice */
/* standby or no connection: everything that needs the radio is dimmed and does nothing (the power key, the wheel and the settings stay) */
body.idle .indicators, body.idle .vfo-tag, body.idle .tx-btn, body.idle .scope-controls { opacity: 0.4; pointer-events: none; }
body.idle .tx-btn, body.txoff .tx-btn { opacity: 0.8; } /* already dark by itself: only 20 % dimmer (standby and TX disabled) */
body.txoff .tx-btn { pointer-events: none; }
body.idle .vfo-info > * { pointer-events: none; } /* the memory line does not open the list in standby */

.scope-controls { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.4rem 0.45rem; margin-bottom: 0.4rem; font-size: 0.8rem; }
.scope-controls select {
  background: #1a1f25; color: var(--key-text); border: 1px solid #000; border-radius: 4px;
  padding: 0.25rem 0.25rem; font: inherit; min-width: 0; flex: 0 1 auto; text-overflow: ellipsis;
}
.scope-controls label { display: flex; align-items: center; gap: 0.4rem; flex: 1; }
.scope-wrap { position: relative; flex: 1 1 auto; min-height: calc((min(100vw, 390px) - 2rem) * 240 / 475 * 0.75); max-height: calc((min(100vw, 390px) - 2rem) * 240 / 475 * 1.3); margin-bottom: 0; border-radius: 8px; overflow: hidden; background: #000; display: grid; grid-template-rows: 1fr 2fr; }
/* Spectrum 1/3, waterfall 2/3, positioned absolutely: iOS Safari resolved height:100% of a canvas in a grid row against the whole scope */
.scope-wrap canvas { display: block; width: 100%; height: 100%; min-height: 0; }
#spectrum, #waterfall { position: absolute; left: 0; width: 100%; }
#spectrum { top: 0; height: 33.3333%; }
#waterfall { top: 33.3333%; height: 66.6667%; }
#overlay { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.scope-off {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #000; color: var(--text-dim); font-size: 0.85rem; pointer-events: none;
}
.scope-wrap.live .scope-off { display: none; }
.scope-wrap.standby .scope-off { display: flex !important; background: #000; } /* standby: black, no old picture, the notice stays */
.scope-controls label.auto { flex: none; gap: 0.25rem; }
.scope-controls input[type="checkbox"] { accent-color: var(--accent); margin: 0; }
/* Auto and Smooth as short switches: a small key that lights up while on (the checkbox stays for the script and the keyboard) */
.scope-controls label.sw { position: relative; cursor: pointer; }
.scope-controls label.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.scope-controls label.sw span {
  display: block; min-width: 1.6rem; text-align: center; padding: 0.25rem 0.3rem; border-radius: 4px;
  font-weight: 600; color: #4b4f4b; background: #101110; border: 1px solid #262826;
}
.scope-controls label.sw input:checked + span { color: #7fd6ff; border-color: #2b6a8c; background: #0c2230; text-shadow: 0 0 6px rgba(80, 190, 255, 0.5); }
.scope-controls label.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Two overlaid range inputs share one track (technique from open890rc): only the thumbs take
   pointer events, a fill div shows the band between the two values. */
.dual-slider { position: relative; flex: 1 1 3rem; min-width: 3rem; height: 20px; } /* the row stays on one line; the slider takes what is left */
.dual-slider-track, .dual-slider-fill {
  position: absolute; top: 50%; height: 6px; transform: translateY(-50%); border-radius: 3px; pointer-events: none;
}
.dual-slider-track { left: 0; right: 0; background: linear-gradient(#0d0d0f, #1c1c20); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9); }
.dual-slider-fill { background: rgba(232, 129, 42, 0.4); }
.dual-slider input[type="range"] {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin: 0;
  background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.dual-slider input[type="range"]::-webkit-slider-runnable-track { height: 20px; background: transparent; }
.dual-slider input[type="range"]::-moz-range-track { background: transparent; }
.dual-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto; -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; margin-top: 3px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 60%),
    conic-gradient(#e9e9e9, #a8a8a8, #f4f4f4, #8c8c8c, #dcdcdc, #b4b4b4, #f6f6f6, #939393, #e2e2e2, #a2a2a2, #f0f0f0, #8e8e8e, #e9e9e9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.35); cursor: pointer;
}
.dual-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 14px; height: 14px; border: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 60%),
    conic-gradient(#e9e9e9, #a8a8a8, #f4f4f4, #8c8c8c, #dcdcdc, #b4b4b4, #f6f6f6, #939393, #e2e2e2, #a2a2a2, #f0f0f0, #8e8e8e, #e9e9e9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.18); cursor: pointer;
}
.dual-slider input[type="range"]:disabled::-webkit-slider-thumb { opacity: 0.45; cursor: default; }
.dual-slider input[type="range"]:disabled::-moz-range-thumb { opacity: 0.45; cursor: default; }
/* horizontal drags on the scope tune; vertical ones still scroll the page */
#overlay { touch-action: pan-y; }

/* Picker screens, modelled on the IC-705 display */
.radio-overlay { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.72); padding: 1rem; }
.radio-overlay[hidden] { display: none; }
.radio-screen {
  width: min(100%, 440px); background: linear-gradient(#10161d, #080b0f); border: 1px solid #2c3743; border-radius: 10px;
  padding: 0.8rem 0.9rem 0.9rem; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
}
/* the settings window has a fixed size: title and tabs stay on top, the back key at the bottom, only the rows in between scroll */
#settings-overlay .radio-screen { display: flex; flex-direction: column; height: min(41rem, calc(100dvh - 2rem)); overflow: hidden; }
#settings-overlay .fl-title, #settings-overlay .rs-tabs, #settings-overlay .rs-foot { flex: none; }
.tm-screen { max-height: calc(100dvh - 2rem); display: flex; flex-direction: column; }
.tm-body { overflow-y: auto; min-height: 0; padding-right: 0.2rem; }
.tm-h { color: #8a929a; font-size: 0.8rem; letter-spacing: 0.08em; margin: 1.1rem 0 0.6rem; border-bottom: 1px solid #2c3743; }
.tm-h:first-child { margin-top: 0; }
.tm-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin: 0.35rem 0; color: #e6e9ec; font-size: 0.95rem; }
.tm-row > span:first-child { flex: none; width: 5.6rem; }
.tm-row .vslider { flex: 1; }
.tm-pair { display: flex; align-items: center; gap: 0.35rem; flex: 1; justify-content: flex-end; }
.tm-pair select { background: #1a1f25; color: var(--key-text); border: 1px solid #000; border-radius: 5px; padding: 0.35rem 0.2rem; font: inherit; font-size: 0.85rem; min-width: 0; flex: 1; }
/* the windows that open from the indicators (and the tone and Max Hold windows): headings one and a half times as big as before */
#settings-overlay .rs-title, #nb-overlay .rs-title, #nr-overlay .rs-title, #comp-overlay .rs-title, #agc-overlay .rs-title, #tbw-overlay .rs-title,
#tone-overlay .rs-title, #dup-overlay .rs-title, #dcs-overlay .rs-title, #hold-overlay .rs-title, #tm-overlay .rs-title, #scopeedge-overlay .rs-title { font-size: 1.2rem; margin-bottom: 0.5rem; }
.rs-title { text-align: center; color: #e6e9ec; font-size: 0.8rem; letter-spacing: 0.08em; margin-bottom: 0.4rem; }
.rs-body { display: flex; gap: 0.6rem; }
.rs-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.rs-side { display: grid; grid-template-rows: repeat(4, 1fr); gap: 0.45rem; width: 28%; }
.rs-btn {
  background: linear-gradient(#6b747a 0%, #50575c 35%, #3b4146 70%, #2f3438 100%);
  color: #fff; border: 1px solid #14171a; border-radius: 8px; font: inherit; font-size: 1.15rem;
  min-height: 3rem; padding: 0.3rem; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.rs-btn:active { filter: brightness(1.25); }
.rs-btn.current { outline: 2px solid #4da3ff; outline-offset: -2px; }
.rs-side .rs-btn { font-size: 0.8rem; line-height: 1.1; min-height: 0; }
.rs-input { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.rs-input[hidden] { display: none; }
.rs-input input {
  flex: 1; min-width: 0; background: #05080c; color: #fff; border: 1px solid #3a4652; border-radius: 6px;
  padding: 0.5rem 0.6rem; font: inherit; font-size: 1rem; -webkit-user-select: text; user-select: text;
}
.rs-input .rs-btn { min-height: 0; padding: 0.4rem 1rem; font-size: 1rem; }
.rs-foot { display: flex; justify-content: flex-end; margin-top: 0.6rem; }
.rs-back { width: 4.2rem; font-size: 1.5rem; }
.back-icon { width: 1.5rem; height: 1.5rem; display: block; margin: 0 auto; } /* drawn, not a character: iOS turns the arrow character into a coloured emoji */
.rs-field select {
  background: #1a1f25; color: var(--key-text); border: 1px solid #000; border-radius: 5px;
  padding: 0.35rem 0.3rem; font: inherit; font-size: 0.9rem;
}

/* settings button (top right) and the settings screen */
.icon-btn { flex: none; align-self: flex-end; width: 1.5rem; height: 1.5rem; padding: 0; margin: 0 0 -0.4rem 0.5rem; /* centred on the line of IC-705, not on the taller logo */ background: none; border: 0; color: #9aa3ab; cursor: pointer; }
.icon-btn:hover, .icon-btn:focus-visible { color: #fff; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.rs-field select:disabled { opacity: 0.4; }
body.txoff .mic-meter-row, body.txoff [data-panel="tx"] .rs-field:not(.rs-txoff-row), body.txoff .tx-key-row { opacity: 0.4; pointer-events: none; } /* TX off: the whole rows are dimmed, label and value included */
body.txoff [data-panel="tx"] select:disabled, body.txoff [data-panel="tx"] input[type="range"]:disabled, body.txoff .tx-key-row select:disabled { opacity: 1; } /* not twice */
.rs-field input[type="checkbox"] { accent-color: var(--accent); width: 1.3rem; height: 1.3rem; margin: 0; }
.rs-text { margin: 0.4rem 0 1rem; color: #fff; text-align: center; font-size: 1.1rem; }
.power-ask { max-width: 18rem; }
.power-ask .rs-foot { justify-content: space-between; gap: 0.6rem; }
.power-ask .rs-btn { flex: 1; width: auto; font-size: 1rem; padding: 0.7rem 0; }
.power-btn { color: #5f666d; } /* grey: no connection to the radio */
.power-btn.up, .power-btn.up:hover { color: #6fd14a; } /* green: on and answering */
.power-btn.standby, .power-btn.standby:hover { color: #e5484d; } /* red: standby */
.power-btn.waking, .power-btn.waking:hover { color: #e5a000; animation: power-wait 0.9s ease-in-out infinite; } /* amber, blinking: switching on, connecting */
@keyframes power-wait { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .power-btn.waking { animation: none; } }
.icon-btn svg { width: 100%; height: 100%; display: block; }
/* the power key sits at the far left, centred on the height of the ICOM logo (1.5rem), not on the line of the model name */
.power-btn { margin: 0 0.5rem -0.2rem 0; width: 1.5rem; height: 1.5rem; display: flex; align-items: center; }
.power-btn svg { width: 100%; height: 100%; }
.rs-field { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #e6e9ec; font-size: 0.95rem; margin: 0.6rem 0 0.4rem; }
.rs-field input[type="text"], .rs-field input[type="password"] {
  flex: 1; min-width: 0; background: #05080c; color: #fff; border: 1px solid #3a4652; border-radius: 6px; padding: 0.4rem 0.5rem; font: inherit; font-size: 0.95rem;
}
.rs-field input[type="text"]:focus, .rs-field input[type="password"]:focus { outline: none; border-color: #4da3ff; }
[data-panel="radio"] .rs-field > span:first-child { flex: none; width: 5.5rem; }
[data-panel="radio"] .rs-field-live { margin-top: 1.4rem; }
[data-panel="radio"] .rs-field-live > span:first-child { width: 9.6rem; white-space: nowrap; } /* the sliders of the live rows start at the same place */ /* the longer label keeps its line */ /* applies at once, not with Save: set apart */ /* the three fields start at the same place */
.rs-key { color: var(--lcd); font-size: 0.9rem; text-align: right; }
#nb-overlay .rs-field > span:first-child, #nr-overlay .rs-field > span:first-child, #hold-overlay .rs-field > span:first-child { flex: none; width: 4.2rem; } /* the sliders start at the same place */
.rs-save { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.9rem; }
.rs-msg { color: #9aa3ab; font-size: 0.9rem; min-width: 0; }
.rs-caption { color: #e6e9ec; font-size: 0.95rem; margin: 0.2rem 0 0.5rem; }
.tm-det { border-bottom: 1px solid #2c3743; margin-top: 0.5rem; }
.tm-det summary { color: #8a929a; font-size: 0.8rem; letter-spacing: 0.08em; padding: 0.4rem 0; cursor: pointer; list-style: none; }
.tm-det summary::-webkit-details-marker { display: none; }
.tm-det summary::before { content: "\25B8  "; }
.tm-det[open] summary::before { content: "\25BE  "; }
.tm-det[open] summary { color: #e6e9ec; }
.rs-steps { padding-left: 1.3rem; margin: 0.3rem 0 0; }
.rs-steps li { margin: 0 0 0.35rem; }
.rs-steps b { color: #e6e9ec; font-weight: 500; }
.rs-hint { margin: 0 0 0.4rem; color: #9aa3ab; font-size: 0.9rem; line-height: 1.4; }
/* too narrow for the small print: keep logo, data rate, model, GPS and the gear */

/* settings tabs (RX / TX) */
.rs-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; }
.rs-tab { flex: 1; padding: 0.6rem 0; background: linear-gradient(#4a5157, #2c3136); color: #fff; border: 1px solid #14171a; border-radius: 6px; font: inherit; font-size: 0.85rem; letter-spacing: 0.08em; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15); } /* keys like BW and DEF in the filter window */
.rs-tab.current { outline: 2px solid #3d8bff; outline-offset: -2px; }
.rs-panel[hidden] { display: none; }
/* settings window: all tabs share one grid cell, so the window always has the size of the tallest tab (hidden tabs keep their space) */
.rs-panels { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 0.15rem; } /* the part that scrolls */

/* microphone level meter in the TX settings: LED segments, green -> yellow -> red, peak hold */
.mic-meter-row { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0 0.4rem; min-height: 1.2rem; } /* the "kein Mikro" note must not change the window height */
.mic-meter { flex: 1; display: flex; gap: 2px; }
.mic-meter span { flex: 1; height: 0.7rem; border-radius: 1px; background: #1c1c20; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.7); }
.mic-meter span.g.on, .mic-meter span.hold.g { background: #6cd44c; }
.mic-meter span.y.on, .mic-meter span.hold.y { background: #f1b72a; }
.mic-meter span.r.on, .mic-meter span.hold.r { background: #e8281e; }
.mic-meter-note { font-size: 0.85rem; color: #9aa3ab; }
.mic-meter-note:empty { display: none; }

/* microphone key in the header: lit while the microphone is kept open */
.mic-btn.on { color: rgb(128, 218, 72); filter: drop-shadow(0 0 4px rgba(128, 218, 72, 0.6)); } /* same green and glow as the busy LED */
.ssl-link { color: var(--accent); }
.rs-panel b { color: #e6e9ec; }

/* sliders with the value on the slider itself: a dark rounded pill behind the number keeps it readable on the bar */
.vslider { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.vslider input[type="range"] { --pc: 0; --tw: 1rem; -webkit-appearance: none; appearance: none; width: 100%; height: 1.6rem; margin: 0; background: transparent; accent-color: var(--accent); }
.vslider input[type="range"]::-webkit-slider-runnable-track { height: 1.6rem; border-radius: 0.5rem; background: linear-gradient(90deg, rgba(232, 129, 42, 0.26) calc(var(--pc) * (100% - var(--tw)) + var(--tw) / 2), #101316 calc(var(--pc) * (100% - var(--tw)) + var(--tw) / 2)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7); }
.vslider input[type="range"]::-moz-range-track { height: 1.6rem; border-radius: 0.5rem; background: linear-gradient(90deg, rgba(232, 129, 42, 0.26) calc(var(--pc) * (100% - var(--tw)) + var(--tw) / 2), #101316 calc(var(--pc) * (100% - var(--tw)) + var(--tw) / 2)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7); }
.vslider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: var(--tw); height: 1.9rem; margin-top: calc((1.6rem - 1.9rem) / 2); border-radius: 4px; border: 0; background: repeating-linear-gradient(180deg, #7a8187 0 2px, #4f555b 2px 3px); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.18); } /* matt aluminium fader cap with fine grooves */
.vslider input[type="range"]::-moz-range-thumb { width: var(--tw); height: 1.9rem; border-radius: 4px; border: 0; box-sizing: border-box; background: repeating-linear-gradient(180deg, #7a8187 0 2px, #4f555b 2px 3px); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.vslider input[type="range"]:disabled { opacity: 0.5; }
#pwr-val { background: transparent; color: rgba(255, 255, 255, 0.55); font-size: 0.72rem; text-shadow: none; } /* the power on the PWR slider: quieter than the other values */
.vslider output { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: auto; padding: 0 0.6rem; border-radius: 0.7rem; background: rgba(0, 0, 0, 0.3); text-shadow: 0 0 3px rgba(0, 0, 0, 0.8); color: #fff; font-size: 0.8rem; line-height: 1.2rem; text-align: center; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.meter { cursor: pointer; }

/* filter window in the style of the radio's own FILTER screen */
.fl-screen { background: #000; border-color: #3a424b; }
.fl-title { text-align: center; color: #fff; font-size: 1.2rem; letter-spacing: 0.04em; background: #2a2f36; margin: -0.8rem -0.9rem 0.6rem; padding: 0.25rem 0; border-radius: 9px 9px 0 0; }
.fl-main { display: grid; grid-template-columns: minmax(0, 1fr) 33%; gap: 0.7rem; }
.fl-boxes { display: flex; gap: 0.4rem; margin-bottom: 0.2rem; }
.fl-box { border: 1px solid #8a929a; border-radius: 3px; color: #fff; font-size: 0.8rem; padding: 0 0.35rem; line-height: 1.3rem; white-space: nowrap; }
.fl-box#fl-sft { flex: none; width: 5.6rem; } /* just wide enough for "SFT +1200" */
#fl-graph { width: 100%; height: auto; display: block; }
#fl-graph text { fill: #5aa0ff; font-size: 14px; font-family: inherit; } /* 17 units of the 320-wide drawing = 11 px on a phone, like the corner frequencies of the spectrum */
#fl-graph text.fl-edge { fill: #e8812a; }
#fl-graph text.fl-mid { fill: #fff; }
.fl-pbtrow { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); align-items: center; gap: 0.3rem; margin-top: 0.25rem; }
.fl-pbtname { color: #fff; font-size: 0.8rem; font-weight: 500; }
.fl-bar { position: relative; height: 1.1rem; border: 2px solid; border-radius: 2px; background: #000; }
.fl-blue { border-color: #3d8bff; }
.fl-red { border-color: #ff4d3d; }
.fl-green { position: absolute; left: 25%; right: 25%; top: 2px; bottom: 2px; background: #9ad300; }
.fl-mark { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.fl-bar input[type="range"] { position: absolute; top: -2px; left: 33.33%; width: 33.34%; height: calc(100% + 4px); margin: 0; opacity: 0; cursor: pointer; } /* the block moves by +-1/6 of the bar: the field to drag it is just as wide, so the block follows the pointer */
.fl-badge { position: absolute; margin: 0.15rem 0 0 0.15rem; width: 1.15rem; height: 1.15rem; line-height: 1.05rem; text-align: center; font-size: 0.8rem; font-weight: 600; color: #fff; border: 2px solid; border-radius: 3px; background: #0b0c0d; z-index: 1; }
.fl-badge[hidden] { display: none; }
#filter-width-row { margin-top: 0.6rem; }
.fl-right { display: grid; grid-template-columns: 1fr; gap: 0.4rem; align-content: start; }
.fl-key { background: linear-gradient(#4a5157, #2c3136); color: #fff; border: 1px solid #14171a; border-radius: 6px; font: inherit; font-size: 1rem; padding: 0.55rem 0; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.fl-key.on { outline: 2px solid #3d8bff; outline-offset: -2px; }
.fl-key:disabled { opacity: 0.4; cursor: default; }
.fl-tile { display: grid; grid-template-rows: auto 1fr; border: 1px solid #aeb5bc; border-radius: 4px; background: #000; color: #fff; font: inherit; padding: 0; cursor: pointer; overflow: hidden; }
.fl-tile b { background: #8d949a; color: #fff; font-weight: 500; font-size: 1rem; padding: 0.2rem 0; text-align: center; }
.fl-tile span { font-size: 1.1rem; text-align: center; padding: 0.6rem 0; }
.fl-shape { display: grid; gap: 0.3rem; }
.fl-shapebtn { display: grid; justify-items: center; gap: 0.1rem; background: #000; color: #8d949a; border: 1px solid #5d646b; border-radius: 4px; font: inherit; font-size: 0.7rem; padding: 0.2rem 0; cursor: pointer; }
.fl-shapebtn svg { width: 70%; height: 1rem; }
.fl-shapebtn.on { color: #fff; border: 2px solid #3d8bff; background: #0a1a33; }

/* memory menu */
/* the memory window has a fixed size like the settings window: title and group choice on top, the back key at the bottom, only the list scrolls; one row per memory */
#mem-overlay .radio-screen { display: flex; flex-direction: column; height: min(41rem, calc(100dvh - 2rem)); overflow: hidden; }
#mem-overlay .mem-head, #mem-overlay .rs-hint, #mem-overlay .rs-foot { flex: none; }
.mem-list { display: flex; flex-direction: column; gap: 0.35rem; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.mem-reload { margin-right: 0.5rem; }
#mem-overlay .rs-foot { justify-content: space-between; } /* VFO>M left, back right */
.vfo-btn { flex: 0.45; }
.lcd-btn.lit { background: linear-gradient(#2e5175 0%, #22456a 45%, #0e2c49 100%); border-color: #3d6c9c; } /* lit like the MODE key */
.mem-key { min-height: 0; font-size: 0.9rem; padding: 0.4rem 0.8rem; margin-right: 0.4rem; }
#mem-overlay .rs-foot { align-items: center; }
.lcd-btn[hidden] { display: none; }

/* VFO / memory info line, like the radio's block right of the frequency: VFO A|B or MEMO, group and channel, name */
/* VFO A|B or MEMO, group/channel and the memory name: own row above the frequency, fixed columns so nothing moves while stepping through the memories */
.vfo-info { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.6rem; align-items: center; height: 1.4rem; margin: -0.46rem 0 0; } /* group | channel name directly under the meter, the function indicators follow; the space above the digits (to the Po text of the meter) and below them (to the indicators) is the same */
.vfo-info > * { pointer-events: auto; cursor: pointer; }
.vi-num { display: inline-flex; align-items: center; gap: 0.3rem; font-family: "Digital-7 Mono", monospace; font-size: 1.4rem; line-height: 1; color: #7fd6ff; letter-spacing: 0.02em; white-space: nowrap; } /* group | channel with a thin vertical divider, so it does not read as one big number */
.vi-sep { display: block; width: 1px; height: 0.95rem; background: #3f7f99; }
.vi-num.hide { visibility: hidden; }
.vi-name { color: #9aa3ab; font-size: 1.2rem; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } /* same size and colour as the VFO/MEMO badge, but tighter letter spacing so the name fits the page width */
.mem-head { display: grid; grid-template-columns: 2.6rem 1fr 2.6rem; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.mem-head .rs-title { margin: 0; }
.mem-g { min-height: 0; padding: 0.2rem 0; font-size: 0.8rem; }
#mode-overlay .rs-foot { align-items: center; }
.rs-btn.mem-key:disabled { opacity: 0.4; cursor: default; }
.rs-btn.mem-key.current { outline: 2px solid #4da3ff; outline-offset: -2px; }
#mode-grid .mem-key { align-self: center; justify-self: center; margin: 0; } /* the DATA key keeps its small size in the grid */

/* VFO wheel (knurled thumbwheel seen from its edge, from open890rc's Easy Mode wheel), directly above the scope */
.tune-wheel { display: block; width: 100%; height: 40px; margin: 0 0 0.9rem; border-radius: 5px; cursor: ew-resize; touch-action: none; user-select: none; -webkit-user-select: none; flex: none; }
#tunewheel-overlay .tune-wheel { margin: 0.3rem 0 0.8rem; }
#tunewheel-overlay .rs-foot { justify-content: space-between; align-items: center; }
main > .levels { margin-top: 1rem; } /* a fixed gap: the page looks the same at every window size (free height is left under the scope, it never opens a gap in the middle) */
main > .tune-wheel { width: 80%; margin: 0 auto 1rem; } /* the same gap above (to the sliders) and below (to the scope settings) */
/* AF, SQL and RFG show no value on the slider (PWR keeps its watt value) */
#volume-val, #sql-val, #rf-val { display: none; }
.rs-field.tx-func { margin-top: 1.2rem; }
.fl-key[hidden], .fl-tile[hidden], .fl-shape[hidden], #filter-pbt[hidden], #filter-width-row[hidden] { display: none; }

/* indicators under the key rows: dim when off, lit cyan like the radio display when active */
.indicators { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.45rem; margin: 0.765rem 0 0; } /* eleven indicators (with SPLIT): six and five, all cells the same size */
.tbw-grid { grid-template-columns: repeat(3, 1fr); }
.ind.tuning { color: #ffb347; border-color: #a86a1a; background: #2a1c08; animation: indblink 0.7s steps(2, jump-none) infinite; }
@keyframes indblink { 50% { opacity: 0.4; } }
.rs-sub { font-size: 0.85rem; color: #8a929a; }
.ind.nofn { color: #4a504a; pointer-events: none; } /* the function is switched off in the settings (AT without a tuner): the frame stays, only the text is dark */
.meter { margin-bottom: 0.35rem; } /* the function indicators sit close under the meter */
.ind { flex: 1 1 0; text-align: center; font-size: 0.78rem; letter-spacing: 0.02em; padding: 0.4rem 0; border-radius: 5px; white-space: nowrap; color: #a4aba4; background: #101110; border: 1px solid #343834; }
.ind.on { color: #7fd6ff; border-color: #2b6a8c; background: #0c2230; text-shadow: 0 0 6px rgba(80, 190, 255, 0.5); }
.ind.click { cursor: pointer; }
.ind.click:active { filter: brightness(1.4); }
.tone-grid { grid-template-columns: repeat(5, 1fr); gap: 0.3rem; }
.tone-grid .rs-btn { font-size: 0.78rem; min-height: 0; padding: 0.45rem 0; }
#tone-cur { color: #7fd6ff; margin-left: 0.5rem; }
.ind.unavail { color: #4a504a; pointer-events: none; } /* not there in this mode / band (ATT above 60 MHz, TONE outside FM ...): the frame stays, only the text is dark */
.dup-grid { grid-template-columns: repeat(3, 1fr); }
#dup-cur { color: #7fd6ff; margin-left: 0.5rem; }
.dcs-grid { grid-template-columns: repeat(6, 1fr); gap: 0.25rem; }
.dcs-grid .rs-btn { font-size: 0.72rem; min-height: 0; padding: 0.4rem 0; }
#dcs-cur { color: #7fd6ff; margin-left: 0.5rem; }
#dcs-overlay .rs-foot .rs-btn { font-size: 0.8rem; }
.meter { padding-top: 0.2rem; } /* the meter stands higher: the room above its scale is the space of the SPLIT mark under the digits (freq-flags), which ends just above the box */
.meter { padding-left: 0.3rem; padding-right: 0.3rem; } /* the bar and its scales use nearly the whole width of the box */

/* Home Screen web app: keep the page clear of the home indicator */
body { padding-bottom: max(0px, calc(env(safe-area-inset-bottom) - 18px)); } /* the home indicator is only a thin bar close to the edge: the page may run down to just above it (the full safe area is 34 px on an iPhone with Face ID) */

/* window of one memory (long press in the list): the editor */
.me-field { display: grid; gap: 0.2rem; margin: 0.6rem 0 0; font-size: 0.8rem; color: #8c949b; }
.me-field input, .me-field select { font: inherit; font-size: 1rem; color: #7fd6ff; background: #050a0e; border: 1px solid #1a3342; border-radius: 6px; padding: 0.5rem 0.6rem; min-width: 0; width: 100%; -webkit-user-select: text; user-select: text; }
.me-field input:focus, .me-field select:focus { outline: none; border-color: #3d8bff; }
.me-field input:disabled, .me-field select:disabled { opacity: 0.5; }
.me-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.me-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.8rem; padding: 0.7rem 0.2rem; border-top: 1px solid #23282d; font-size: 1.1rem; color: #c3c9ce; cursor: pointer; }
.me-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.me-switch i { position: relative; flex: none; width: 3rem; height: 1.6rem; border-radius: 0.8rem; background: #14171a; border: 1px solid #2a2f35; transition: background 0.12s; }
.me-switch i::after { content: ""; position: absolute; top: 0.18rem; left: 0.2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #6f787f; transition: transform 0.12s, background 0.12s; }
.me-switch input:checked + i { background: #22456a; border-color: #3d6c9c; }
.me-switch input:checked + i::after { transform: translateX(1.4rem); background: #e6e9ec; }
.me-msg { min-height: 2.6rem; margin-top: 0.4rem; font-size: 0.9rem; color: #aeb5bc; }
.me-msg.ok { color: #7fd6ff; }
.me-msg.warn { color: #ffb347; }
.me-msg.err { color: #ff6a6a; }
.me-foot { justify-content: space-between; align-items: center; }
.me-foot[hidden] { display: none; }
.me-foot .mem-key { margin-right: 0; }
.me-two[hidden] { display: none; }
.me-field[hidden] { display: none; }
.me-screen { display: flex; flex-direction: column; max-height: calc(100dvh - 2rem); }
.me-screen .rs-title, .me-screen .me-foot { flex: none; }
.me-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 0.15rem; }

/* memory list: green on black, flat rows (no gradients: they made scrolling slow), one line per memory */
#mem-overlay .radio-screen { background: #000; box-shadow: none; }
.mem-list { contain: layout paint; }
.mem-item { flex: none; display: grid; grid-template-columns: 1.9rem 1.4rem 9.4rem auto auto; justify-content: start; align-items: center; column-gap: 0.4rem; text-align: left; background: transparent; color: #7fd6ff; border: 0; border-bottom: 1px solid #0f2330; border-radius: 0; padding: 0.6rem 0.4rem; font: inherit; cursor: pointer; content-visibility: auto; contain-intrinsic-size: auto 2.6rem; }
.mem-item:active { background: #0c2230; }
.mem-item .mi-skip { align-self: stretch; display: flex; align-items: center; justify-content: center; margin: -0.6rem 0 -0.6rem -0.4rem; font-size: 1rem; color: #5aa8cc; cursor: pointer; } /* tap area over the full row height */
.mem-item.skip .mi-skip { color: #ffb347; }
.mem-item .mi-skip svg { width: 1.36rem; height: 1.36rem; display: block; flex: none; }
.vi-skip { color: #ffb347; margin-left: 0.45em; } /* same colour as the skipped mark in the memory list */
.vi-skip svg { width: 1.2rem; height: 1.2rem; display: inline-block; vertical-align: -0.1em; }
.mem-item .mi-ch { font-size: 0.8rem; color: #3f7f99; font-variant-numeric: tabular-nums; }
.mem-item .mi-name { font-size: 0.95rem; color: #7fd6ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-item .mi-hz { font-size: 0.9rem; color: #7fd6ff; font-variant-numeric: tabular-nums; }
.mem-item .mi-mode { font-size: 0.8rem; color: #5aa8cc; }
.mem-item.current { background: #0c2230; box-shadow: inset 3px 0 0 #7fd6ff; } /* the memory selected now */
.mem-item.skip { opacity: 0.5; } /* skipped by the scan */
.mem-head .rs-title { position: relative; }
.mem-spin { display: inline-block; width: 1.1em; margin-left: 0.4em; color: var(--accent); font-size: inherit; line-height: 1; vertical-align: baseline; position: relative; top: 0.05em; text-align: left; } /* right behind "Gruppe xx", same height as the text; the width is reserved so the title does not jump */
.me-danger { color: #ffb347; }
.me-foot[hidden] { display: none; }
.sd { position: relative; display: inline-block; width: 0.4545em; height: 1em; } /* one digit cell of the digit font */
.sd i { font-style: normal; opacity: 0.14; }
.sd b { position: absolute; left: 0; top: 0; font-weight: normal; }

/* Memory list on a phone: the window uses the whole screen width and the name column takes what the other columns leave, so
   channel, name, frequency and mode fit on one row (the fixed 9.4rem name column pushed the mode out of the window). */
@media (max-width: 520px) {
  #mem-overlay { padding: 0.4rem; }
  #mem-overlay .radio-screen { width: 100%; padding: 0.6rem 0.5rem 0.7rem; height: min(41rem, calc(100dvh - 0.8rem)); }
  #mem-overlay .mem-item { grid-template-columns: 1.9rem 1.4rem minmax(0, 10.2rem) auto auto; justify-content: start; column-gap: 0.35rem; padding-left: 0.3rem; padding-right: 0.3rem; }
}

/* record key (ring with a dot) in the header, exactly between the microphone and the wrench at rest: the same gap on both sides.
   While recording the elapsed time stands in front of the symbol: the symbol keeps its place at the wrench, the time takes
   its room from the data rate text on the left. Red and blinking while recording. */
.icon-btn.rec-btn { width: auto; display: flex; align-items: center; gap: 0.3rem; margin-left: 0; margin-right: 0; font: inherit; }
.rec-btn svg { width: 1.5rem; height: 1.5rem; flex: none; }
.rec-btn #record-label { font-size: 0.8rem; font-variant-numeric: tabular-nums; min-width: 2.4em; text-align: right; white-space: nowrap; }
.rec-btn #record-label:empty { display: none; }
.rec-btn.recording { color: #e8262a; filter: drop-shadow(0 0 4px rgba(232, 38, 42, 0.6)); }
.rec-btn.recording svg { animation: rec-blink 1.2s ease-in-out infinite; }
@keyframes rec-blink { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .rec-btn.recording svg { animation: none; } }

/* Desktop view elements (see desktop.css): not on the phone */
.dk-only { display: none; }

/* SPLIT mark under the Hz digits (child of the frequency, shown while the split function is on) */
.freq { position: relative; }
.split-badge { flex: none; display: flex; align-items: center; justify-content: center; box-sizing: border-box; height: 0.95rem; padding: 0 0.7rem 0.5px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.68rem; font-weight: 500; line-height: 1; letter-spacing: 0.03em; color: #f3dcd4; background: linear-gradient(#cf6445, #a14424); border: 1px solid #d98c6c; border-radius: 2px; pointer-events: none; text-shadow: none; } /* the same pill as MAIN in the scope title bar, in the red of the radio display; its place under the middle one of the three Hz digits is set by app.js (placeSplitBadge) */
@supports (text-box: trim-both cap alphabetic) { .split-badge { text-box: trim-both cap alphabetic; padding-bottom: 0; } }
.split-badge { order: 2; padding-left: 0; padding-right: 0; } /* phone: SPLIT stands fixed under the VFO key (as wide as it), the other marks come in front of it on the left */
.split-badge[hidden] { visibility: hidden; } /* it keeps its place while split is off */
.freq-flags { position: absolute; left: auto !important; right: 0; top: calc(100% - 0.35rem); display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; pointer-events: none; } /* at the right end of the digits, partly in the empty space under their ink */
.freq-flag { display: inline; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.05em; line-height: 0.95rem; color: #6b7a85; }
.freq-flag[hidden] { display: none; }

/* the main sliders (AF, SQL, RFG, PWR) like mixing console faders: a deep slot with a scale above it and a dark cap with a glowing orange centre line */
.level-col .vslider { height: 1.95rem; }
.level-col .vslider::before { content: ""; position: absolute; left: 11px; right: 11px; top: 0; height: 5px; pointer-events: none; opacity: 0.9;
  background: linear-gradient(90deg, #5b626a, #5b626a) right / 1px 100% no-repeat, repeating-linear-gradient(90deg, #5b626a 0 1px, transparent 1px 10%); }
.level-col .vslider input[type="range"] { --tw: 22px; height: 30px; }
.level-col .vslider input[type="range"]::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; margin-top: 3px;
  background: linear-gradient(90deg, rgba(214, 116, 36, 0.34) calc(var(--pc) * (100% - var(--tw)) + var(--tw) / 2), transparent calc(var(--pc) * (100% - var(--tw)) + var(--tw) / 2)), linear-gradient(#040505, #15181a);
  box-shadow: inset 0 1px 3px #000, 0 1px 0 #2a2e31; }
.level-col .vslider input[type="range"]::-moz-range-track { height: 14px; border-radius: 7px;
  background: linear-gradient(90deg, rgba(214, 116, 36, 0.34) calc(var(--pc) * (100% - var(--tw)) + var(--tw) / 2), transparent calc(var(--pc) * (100% - var(--tw)) + var(--tw) / 2)), linear-gradient(#040505, #15181a);
  box-shadow: inset 0 1px 3px #000, 0 1px 0 #2a2e31; }
.level-col .vslider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 30px; margin-top: -8px; border-radius: 3px; border: 0;
  background: linear-gradient(90deg, transparent calc(50% - 1px), #ff9a3d calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 100% calc(100% - 7px) no-repeat,
    linear-gradient(90deg, transparent calc(50% - 3px), rgba(255, 154, 61, 0.3) calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)) center / 100% calc(100% - 7px) no-repeat,
    linear-gradient(180deg, #34383c, #1c1e20);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px #000; }
.level-col .vslider input[type="range"]::-moz-range-thumb { width: 22px; height: 30px; border-radius: 3px; border: 0; box-sizing: border-box;
  background: linear-gradient(90deg, transparent calc(50% - 1px), #ff9a3d calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 100% calc(100% - 7px) no-repeat,
    linear-gradient(90deg, transparent calc(50% - 3px), rgba(255, 154, 61, 0.3) calc(50% - 3px) calc(50% + 3px), transparent calc(50% + 3px)) center / 100% calc(100% - 7px) no-repeat,
    linear-gradient(180deg, #34383c, #1c1e20);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 0 0 1px #000; }

/* the value (W, %) stands fixed in the middle of the slider on a quiet dark pill (it does not travel with the cap) */
.level-col .vslider output { left: 50%; top: calc(50% + 3px); background: rgba(6, 8, 10, 0.55); border: 1px solid rgba(255, 255, 255, 0.07); color: rgba(230, 233, 236, 0.62); font-size: 0.6rem; line-height: 0.85rem; padding: 0 0.4rem; text-shadow: none; } /* on the middle line of the slot (the slot sits 3 px below the middle of the box because of the scale above it) */
.level-col #pwr-val { background: rgba(6, 8, 10, 0.55); color: rgba(230, 233, 236, 0.62); font-size: 0.6rem; }

/* RIT / XIT knobs (from open890rc): desktop only */
.rit-knob-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.rit-knob-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.rit-knob-wrap.active .rit-knob-label {
  color: var(--accent);
}
.rit-knob {
  /* Same height as the buttons it sits next to (NR OFF etc., Nutzer-Wunsch
     2026-10-13) — measured live: those render at 28.453px with this app's
     16px/rem base, which 1.78rem matches to a fraction of a pixel. */
  width: 2.67rem; /* 50% bigger than the 1.78rem button height (Nutzer-Wunsch 2026-10-30) */
  height: 2.67rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  cursor: grab;
  touch-action: none; /* dragging adjusts the offset, not the page */
  -webkit-tap-highlight-color: transparent;
}
.rit-knob:active {
  cursor: grabbing;
}
.rit-knob-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.rit-knob-rotating {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
/* Snaps back to the neutral (12 o'clock) position on release — see app.js:
   a free-spinning encoder has no absolute position to hold, the rotation
   during a drag only communicates "how much", like a jog wheel. */
.rit-knob-rotating.rit-knob-returning {
  transition: transform 0.25s ease-out;
}
.rit-knob-activering {
  opacity: 0;
  transition: opacity 0.2s;
}
.rit-knob-wrap.active .rit-knob-activering {
  opacity: 1;
  filter: drop-shadow(0 0 4px var(--accent));
}

/* Window of the fixed scope edges (long press on the CENT/FIX field of the scope title bar) */
.se-line { margin: 0.5rem 0.2rem; font-size: 0.95rem; color: #c3c9ce; text-align: center; }
.se-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 0.5rem 0.8rem; align-items: center; margin: 0.6rem 0.2rem; font-variant-numeric: tabular-nums; }
.se-h { font-size: 0.8rem; color: #8c949b; text-align: right; }
.se-n { font-size: 1rem; color: #c3c9ce; }
.se-v { text-align: right; font-size: 1.05rem; color: #7fd6ff; }
.se-msg { font-size: 0.85rem; color: #ffb347; min-height: 1.2rem; }
.se-c { cursor: pointer; padding: 0.35rem 0.4rem; border-radius: 4px; }
.se-c.act { background: #0c3552; } /* the edge the radio uses in the Fixed mode scope: filled row ... */
.se-grid.has-act .se-c:not(.act) { opacity: 0.55; } /* ... and the other two rows dimmed */
.se-n.act { color: #fff; }
.se-badge { display: inline-block; margin-left: 0.5rem; padding: 0.05rem 0.4rem; font-size: 0.65rem; letter-spacing: 0.05em; line-height: 1; border-radius: 3px; background: #7fd6ff; color: #001018; vertical-align: 0.1em; visibility: hidden; }
.se-badge.on { visibility: visible; } /* hidden, not removed: the row keeps its size */
.se-note { font-size: 0.78rem; color: #8c949b; margin: 0.2rem 0.2rem 0; text-align: center; }
.se-edit { display: grid; grid-template-columns: auto 1fr 1fr; gap: 0.5rem 0.8rem; align-items: center; margin: 0.6rem 0.2rem 0; }
.se-in { min-width: 0; width: 100%; box-sizing: border-box; padding: 0.4rem 0.5rem; text-align: right; font: inherit; font-size: 1rem; color: #7fd6ff; background: #05080b; border: 1px solid #2b3744; border-radius: 4px; font-variant-numeric: tabular-nums; }
.se-in:focus { outline: none; border-color: #3d6c9c; }
/* FIX, no lines (the VFO is outside the fixed range): the frame of the spectrum stays, the notice stands in the area of the waterfall only */
.scope-wrap.fixoor .scope-off { display: flex; inset: 33.3333% 0 0 0; background: transparent; text-align: center; padding: 0 1rem; }
.levels label span.showval { color: var(--lcd); white-space: nowrap; font-variant-numeric: tabular-nums; } /* PWR label while the watt value stands in its place */
#pwr-val { display: none; } /* the watt value shows in place of the PWR label while the slider moves (app.js) */

.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 50; max-width: min(90vw, 28rem); padding: 0.6rem 1rem; border-radius: 6px; background: #3a1d1d; border: 1px solid #a64545; color: #ffd7d7; font-size: 0.85rem; text-align: center; }
.toast[hidden] { display: none; }
.rs-panel[data-panel="tx"] > .rs-field:first-child { margin-bottom: 1rem; } /* "TX deaktivieren" at the top, the other TX settings a little apart below it */
/* AI-NR (RNNoise in the browser): the NR key lights orange instead of blue */
.ind.on.ai { color: #f0c48a; border-color: #343834; background: #101110; box-shadow: inset 0 0 0 1.5px #d98a30; text-shadow: none; } /* AI-NR: the face of an off key with an orange inner frame */

.freq-flag.ai { color: #cf6445; } /* AI-NR under the frequency: the red of the SPLIT mark */

/* the readouts keep their width while the numbers change (digits of equal width, a minimum width): the neighbour does not jump */
.audio-info .traffic { font-variant-numeric: tabular-nums; }
#traffic { min-width: 7.5ch; }
#latency { min-width: 6ch; }
#traffic-text { text-align: right; }
.latency { margin-left: 0.3rem; }

/* SCAN window: choice of the groups to scan (a grid of 100 chips) */
.scan-groups { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.scan-groups .sg { padding: 0.32rem 0; border-radius: 3px; background: #101110; border: 1px solid #343834; color: #7a8590; font: inherit; font-size: 0.7rem; font-variant-numeric: tabular-nums; text-align: center; cursor: pointer; }
.scan-groups .sg.known { color: #a4aba4; }
.scan-groups .sg.empty { opacity: 0.35; }
.scan-groups .sg.sel { background: #22456a; border-color: #3d6c9c; color: #d8f0ff; opacity: 1; }
.scan-g-info { margin: 0.5rem 0.1rem 0; font-size: 0.8rem; color: #8c949b; }
#scan-overlay .rs-title + .rs-field { margin-top: 1rem; } /* a little room between the title and "Scan resume" */
.me-skip { grid-template-columns: 1fr auto; align-items: center; margin-top: 0.9rem; }
.me-skip input[type="checkbox"] { width: 1.3rem; height: 1.3rem; padding: 0; margin: 0; accent-color: var(--accent); }
