/* radio.css — radio web móvil. Una mano, a pleno sol: alto contraste, todo lo
   pulsable ≥ 56 px y en la mitad de abajo. */
:root {
  --bg: #08090a; --cell: #141518; --line: #2a2c31; --text: #ffffff; --muted: #a3a7b0;
  --red: #d32f2f; --orange: #ff8a00; --blue: #1e5bff; --green: #22c55e; --amber: #fbbf24;
  --tap: 56px; --gap: 8px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 16px/1.3 -apple-system, system-ui, 'Segoe UI', Roboto, sans-serif; }
body { overscroll-behavior: none; }
#app { max-width: 430px; margin: 0 auto; min-height: 100%;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 12px); }
.view { display: flex; flex-direction: column; gap: 12px; min-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px); }
.view[hidden] { display: none; }
h1 { font-size: 24px; margin: 8px 0 0; }
.muted { color: var(--muted); margin: 0; }
.note { font-size: 13px; }
.form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); letter-spacing: .5px; }
input, select { min-height: var(--tap); font-size: 18px; color: var(--text); background: var(--cell);
  border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
button { min-height: var(--tap); font: inherit; font-weight: 700; border-radius: 12px; border: 0; cursor: pointer;
  touch-action: manipulation; }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .35; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.btn-primary { background: var(--green); color: #000; font-size: 17px; letter-spacing: 1px; }
.btn-link { background: none; color: var(--muted); min-height: var(--tap); }
.err { color: #ff6b6b; min-height: 1.3em; margin: 0; }
.bar { display: flex; align-items: center; gap: 10px; }
.where { flex: 1; font-weight: 700; font-size: 17px; }
.conn::before { content: '●'; margin-right: 4px; }
.conn[data-state="ok"] { color: var(--green); }
.conn[data-state="connecting"] { color: var(--amber); }
.conn[data-state="off"] { color: #ff6b6b; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.pilot { background: var(--cell); color: var(--text); border: 2px solid var(--line); display: flex;
  flex-direction: column; align-items: flex-start; justify-content: center; padding: 8px 12px; text-align: left; }
.pilot.sel { border-color: var(--text); background: #23252b; }
.pilot .name { font-size: 18px; display: flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; }
.pilot .name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pilot { min-width: 0; }
.pilot .dot { width: 10px; height: 10px; border-radius: 50%; background: #555; display: inline-block; }
.pilot .dot.on { background: var(--green); }
.pilot .tag { font-size: 11px; letter-spacing: 1px; color: var(--amber); }
.bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.result { min-height: 1.4em; font-size: 18px; font-weight: 700; margin: 0; }
.result.ok { color: var(--green); } .result.bad { color: #ff6b6b; }
.q { color: #fff; font-size: 17px; letter-spacing: .5px; }
.q.tone-red { background: var(--red); } .q.tone-blue { background: var(--blue); }
.q.tone-orange { background: var(--orange); color: #000; }
.q.cooling { outline: 3px solid #fff; }
.free { display: grid; grid-template-columns: 1fr auto; gap: var(--gap); align-items: center; }
.free input { grid-column: 1 / -1; text-transform: uppercase; }
.count { color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { button:active:not(:disabled) { transform: none; } }
