:root{font:16px system-ui,sans-serif;background:#eef3ef;color:#1a3325;--card:white;--border:#c8d9cd;--fg:#20382a;--muted:#536b5a;--accent:#23784c}*{box-sizing:border-box}body{margin:0}header{background:#205b3d;color:white;padding:16px max(16px,calc((100vw - 1080px)/2));display:flex;justify-content:space-between;gap:15px;align-items:center}h1{font-size:1.4rem;margin:0}h1 small{font-size:.7rem;font-weight:normal}header p{margin:5px 0;font-size:.85rem}main{max-width:1100px;margin:15px auto;padding:0 12px;display:grid;gap:12px}section,details{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:15px}summary{cursor:pointer;font-weight:700}#summary{font-weight:normal;font-size:.85rem;margin-left:8px;color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:12px}label{font-size:.84rem;color:var(--muted)}input,select,button{font:inherit;min-height:43px;border-radius:8px}input,select{display:block;width:100%;padding:8px;border:1px solid var(--border);background:var(--card);color:var(--fg);margin-top:5px}button{cursor:pointer;border:1px solid var(--border);padding:7px 12px;background:var(--card);color:var(--fg)}.primary{background:var(--accent);color:white;border-color:var(--accent)}.danger{color:#bc3232}fieldset{border:1px solid var(--border);border-radius:8px;margin-top:12px}.checks,.actions,.bar,.quick{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.checks label{white-space:nowrap}.checks input,.fieldrow input{display:inline;width:auto;min-height:0;margin:0 4px}.fieldrow{display:flex;align-items:center;gap:8px;margin:5px 0}.fieldrow span{min-width:150px}.fieldrow button{min-height:30px;padding:2px 8px}.bar{justify-content:space-between}.bar h2{font-size:1.1rem;margin:0}.quick label{min-width:105px}.qso{grid-template-columns:2fr 1fr 1fr 2.5fr}.qso .call input{font-weight:700;font-size:1.2rem}.extras{display:flex;gap:8px;flex-wrap:wrap}.extras label{min-width:100px;flex:1}.actions{margin-top:12px}.hint{font-size:.83rem;color:var(--muted)}.notice{background:#ffe3ae;color:#653d00;padding:10px;border-radius:8px;margin-top:12px}.scroll{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th,td{padding:8px;text-align:left;border-bottom:1px solid var(--border);font-size:.85rem}td button{min-height:32px;padding:3px 8px}.edited{background:#fff1b0}.dark{background:#131c18;color:#e5eee7;--card:#203027;--border:#415747;--fg:#e5eee7;--muted:#b3c5b7;--accent:#317f54}.dark header{background:#10281b}.dark .edited{background:#675422}@media(max-width:760px){.grid,.qso{grid-template-columns:repeat(2,minmax(0,1fr))}.extras{grid-column:1/-1}}@media(max-width:480px){.grid,.qso{grid-template-columns:1fr}.quick{width:100%}header{padding:12px}}
/* v0.3.1 | 2026-11-05 | Compact single-row QSO input, consistent large typography.
   History: v0.3.1 compact RST, 15-char call, inline ENTER/ESC keys, responsive wrap. */
main{max-width:1520px}
.qso{display:flex;flex-wrap:wrap;align-items:flex-end;gap:9px;margin-top:10px}
.qso>label,.qso .extras label{display:block;flex:0 0 auto;min-width:0}
.qso .call{width:clamp(185px,18vw,255px)}
.qso>label:has(#rsttx),.qso>label:has(#rstrx){width:76px}
.qso .extras{display:contents}
.qso .extras label{width:clamp(108px,10vw,155px)}
.qso input{font-size:1.2rem;font-weight:600;height:46px;min-height:46px;padding:7px 10px}
.qso .call input{font-size:1.2rem}
.qso input::placeholder{font-size:1.02rem;font-weight:600;opacity:.7}
.qso-keys{display:flex;gap:7px;align-items:flex-end;margin-bottom:0}
.qso-keys button{width:49px;height:46px;min-height:46px;padding:0;display:grid;place-items:center;font-weight:800}
.qso-keys .enter-key{font-size:2rem;line-height:1}
.qso-keys .esc-key{font-size:.88rem}
#message:empty{display:none}
#message{font-size:.86rem;color:var(--muted);margin-top:6px}
@media(max-width:760px){.qso{display:flex;gap:8px}.qso .call{width:min(100%,240px)}.qso .extras{display:contents}.qso .extras label{width:115px}}
@media(max-width:480px){.qso{display:flex}.qso .call{width:min(100%,220px)}.qso>label:has(#rsttx),.qso>label:has(#rstrx){width:68px}.qso .extras label{width:110px}}

/* v0.3.2 | 2026-11-05 20:03 CET | History: single-line header; band/mode after ESC; compact log rows. */
.compact-header{max-width:none;padding:9px 22px;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand-line{display:flex;align-items:baseline;gap:12px;min-width:0;flex-wrap:wrap}
.brand-line h1{font-size:1.38rem;white-space:nowrap;line-height:1.25}
.header-subtitle{font-size:.78rem;color:#e0efe4;line-height:1.3}
.header-controls{display:flex;align-items:center;gap:18px;white-space:nowrap;flex-shrink:0;font-variant-numeric:tabular-nums}
.header-controls #theme{width:43px;height:40px;min-height:40px;padding:0;font-size:1.25rem}
.qso .qso-quick{display:flex;align-items:flex-end;gap:8px;flex-wrap:nowrap;margin:0}
.qso .qso-quick label{display:block;min-width:0;width:83px;flex:0 0 83px}
.qso .qso-quick select{height:46px;min-height:46px;margin-top:5px;padding:5px 7px;font-size:1rem}
.qso .qso-quick label[hidden],.qso .qso-quick label[hidden] select{display:none}
.scroll th,.scroll td{padding:4px 8px;font-size:.85rem;line-height:1.3}
.scroll td button{min-height:27px;padding:2px 7px}
@media(max-width:760px){.compact-header{padding:9px 12px;gap:12px}.brand-line{gap:5px 10px}.header-subtitle{font-size:.7rem}.header-controls{gap:10px}.qso .qso-quick label{width:80px;flex-basis:80px}}
@media(max-width:480px){.compact-header{align-items:center;flex-wrap:wrap}.header-controls{margin-left:auto}.brand-line h1{font-size:1.2rem}}

/* QW-PWA 2.0 v0.3.3 | 2026-11-05 21:04 CET
 History: v0.3.3 N1MM-style band column, cyclic configurable modes, DE/EN UI. */
.header-controls{gap:13px}
#language{min-height:32px;height:32px;min-width:42px;padding:3px 7px;font-size:.85rem;font-weight:700}
.operating-area{display:flex;align-items:stretch;gap:14px}
.band-column{flex:0 0 60px;width:60px;display:flex;flex-direction:column;gap:5px;align-self:flex-start}
.band-caption,.mode-caption{font-size:.72rem;text-align:center;color:var(--muted);margin-top:3px}
#mode-cycle{width:100%;height:38px;min-height:38px;padding:2px 1px;font-size:.9rem;font-weight:800;border:1px solid var(--accent);background:var(--accent);color:white}
.band-buttons{display:flex;flex-direction:column;gap:3px}
.band-choice{min-height:31px;height:31px;padding:2px 3px;width:100%;font-size:.83rem;border-radius:5px}
.band-choice.active{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:800}
#qsoform{flex:1;min-width:0}
.qso{margin-top:8px}
.hidden-selects{display:none!important}
#message:empty{display:none}
@media(max-width:620px){.operating-area{gap:8px}.band-column{flex-basis:48px;width:48px}.band-choice{font-size:.75rem}.qso{gap:7px}}

/* QW-PWA 2.0 v0.3.4 | 2026-11-05 21:04 CET
 History: compact horizontal band choices, mode cycle, inline callsign lookup. */
.operating-area{display:block}
.radio-switches{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:5px}
.band-buttons{display:flex;flex-direction:row;align-items:center;gap:4px;flex-wrap:wrap}
.band-choice{width:auto;min-width:44px;height:30px;min-height:30px;padding:3px 7px;font-size:.8rem}
#mode-cycle{width:auto;min-width:57px;height:30px;min-height:30px;padding:3px 8px;font-size:.85rem;margin-left:6px}
.qso{margin-top:6px}
#callinfo{min-height:0;margin-top:5px}
#callinfo:empty{display:none}
.lookup-result{font-size:.88rem;color:var(--muted)}
.lookup-result strong{color:var(--fg)}
@media(max-width:620px){.radio-switches{gap:5px}.band-buttons{gap:3px}.band-choice{min-width:40px;padding:2px 5px}}

/* QW-PWA 2.0 v0.3.5 | 2026-11-05 21:35 CET
 History: fixed lookup row height; upload controls, credentials in preparation. */
#callinfo{min-height:26px!important;height:26px;margin-top:4px;line-height:22px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#callinfo:empty{display:block!important}
.api-settings{margin:10px 0;padding:9px 12px;border:1px solid var(--line,#cbdace);border-radius:9px}
.api-row{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin-top:10px}.api-row label{min-width:160px;flex:1}.api-row input{display:block;width:100%}
.api-row button{align-self:end}#uploadpending:disabled,#reupload:disabled{opacity:.5;cursor:not-allowed}

/* QW-PWA 2.0 v0.3.6 | 2026-11-05 22:05 CET
 History: horizontal band/mode controls, stable lookup height, header status, auto locator option. */
.operating-area{display:block}
.radio-switches{display:flex;flex-direction:row;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 6px}
.band-buttons{display:flex;flex-direction:row;align-items:center;gap:4px;flex-wrap:wrap}
.band-choice{width:auto;min-width:44px;height:32px;min-height:32px;padding:3px 7px;font-size:.82rem}
#mode-cycle{width:auto;min-width:60px;height:32px;min-height:32px;padding:3px 9px;font-size:.85rem;margin:0 0 0 7px}
#qsoform{width:100%}
#callinfo{min-height:26px!important;height:26px;margin-top:4px;line-height:22px;display:block!important;overflow:hidden}
.auto-locator-option{display:flex;align-items:center;gap:9px;margin:12px 0 4px;font-size:.9rem}
.auto-locator-option input{display:inline-block;width:18px;height:18px;min-height:18px;margin:0}
.header-status{display:inline-flex;align-items:center;justify-content:center;font-size:1.1rem;min-width:19px;line-height:1.3}
.header-status.ok{color:#b5f4c5}.header-status.bad{color:#ffc1a6}.header-status.pending{color:#ffe3a1}
@media(max-width:620px){.radio-switches{gap:5px}.band-buttons{gap:3px}.band-choice{min-width:40px;padding:2px 5px}}

/* v0.3.7: status glyph is monochrome and can actually change color. */
#auth-status{font-family:Arial, sans-serif;font-size:1.65rem;font-weight:700;line-height:1;cursor:help}
#net-status,#sync-status{cursor:help}

/* 2026-11-05 v0.3.8 History: plain key emoji, explicit compact online/offline label. */
#auth-status{font-family:system-ui,sans-serif;font-size:1.05rem;font-weight:400;line-height:1.3;filter:none}
#auth-status.bad{filter:grayscale(1);color:#ff7474}
.net-label{font-size:.7rem;font-weight:700;letter-spacing:.02em;min-width:44px}

/* 2026-11-05 v0.3.9: unambiguous credential status, non-emoji SVG. */
#auth-status{font-family:inherit;font-size:inherit;filter:none;line-height:1;min-width:24px}
#auth-status svg{display:block;width:23px;height:23px}
#auth-status.ok{color:#61b5ff}
#auth-status.bad{color:#ff5353;filter:none}
#auth-status.pending{color:#b7bec4}

/* v0.4.0 | 2026-11-05 | History: compact QRB / bearing on the existing lookup line. */
.lookup-direction{font-variant-numeric:tabular-nums;color:var(--fg)}

/* v0.4.1: TX serial shown only when RX serial is enabled. */
.qso #txserial-label{width:clamp(100px,9vw,125px)}
.qso #txserial-label[hidden]{display:none!important}

/* v0.4.2: TX number is a display, not a data-entry control while logging */
#serialtx[readonly]{background:var(--bg,#f6f8f7);cursor:default;outline:none;user-select:none;}

/* QW-PWA 2.0 v0.4.3 | 2026-11-05 | History: dark serial TX and fixed inline DUPE status. */
.dark #serialtx[readonly]{background:var(--card);color:var(--fg);border-color:var(--border);opacity:1;-webkit-text-fill-color:var(--fg)}
#callinfo{display:flex!important;align-items:center;gap:10px;white-space:nowrap;min-height:26px!important;height:26px!important;overflow:hidden}
#callinfo .lookup-result{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#callinfo .dupe-inline{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.88rem}
#callinfo .dupe-alert{color:#cf3030;font-weight:800}
#callinfo .worked-info{color:#111;font-weight:800}
.dark #callinfo .worked-info{color:#f1f4f1}
.dark #callinfo .dupe-alert{color:#ff7474}
#dupe{display:none!important}

/* QW-PWA 2.0 v0.4.5 | 2026-11-05 | History: equal-size language/theme buttons */
.header-controls #language,.header-controls #theme{width:48px;min-width:48px;height:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;flex:0 0 48px}
.header-controls #language{font-size:.88rem;font-weight:700}
.header-controls #theme{font-size:1.25rem}

/* v0.4.8: compact Wi-Fi status, identical labels in DE/EN */
.net-label{display:inline-flex;align-items:center;gap:7px;min-width:unset;font-size:.72rem;font-weight:700;white-space:nowrap}
.net-label svg{flex:none}
.net-label.ok{color:#b5f4c5}
.net-label.bad{color:#ff7777}

/* v0.4.8 | 2026-11-06 | GMA resources: existing apps, separate browser tabs */
.gma-resources{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}.resource-link{display:inline-flex;align-items:center;justify-content:center;min-height:43px;padding:7px 13px;border:1px solid var(--border);border-radius:8px;background:var(--card);color:var(--fg);font:inherit;text-decoration:none}.resource-link:hover,.resource-link:focus-visible{border-color:var(--accent);color:var(--accent);outline-offset:2px}

/* v0.5.2 | 2026-11-06 | Compact GMA resource links in logbook heading */
.logbook-heading{display:flex;align-items:center;gap:15px;flex-wrap:wrap;min-width:0}
.logbook-heading h2{margin:0;white-space:nowrap}
.logbook-heading .gma-resources{display:flex;align-items:center;gap:7px;margin:0}
.logbook-heading .resource-link{min-height:32px;height:32px;padding:3px 11px;font-size:.84rem;font-weight:600;border-radius:7px;background:#e4f0fb;border-color:#b3d1eb;color:#175582;white-space:nowrap}
.logbook-heading .resource-link:hover,.logbook-heading .resource-link:focus-visible{background:#cbe3f7;border-color:#579acb;color:#124568}
.dark .logbook-heading .resource-link{background:#183c55;border-color:#426f8e;color:#d0ebff}
.dark .logbook-heading .resource-link:hover,.dark .logbook-heading .resource-link:focus-visible{background:#245675;border-color:#77b4dd}
@media(max-width:760px){.bar{align-items:flex-start}.logbook-heading{gap:8px}.bar .allrefs{font-size:.8rem}}

/* QW-PWA 2.0 v0.5.3 | 2026-11-06 14:25 CET
 History: 2026-11-06 v0.5.3 compact F1 help modal, header button, resource SVG icons. */
.header-controls #help-button{width:48px;min-width:48px;height:44px;min-height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;flex:0 0 48px;font-size:1.2rem;font-weight:700}
.resource-icon{width:17px;height:17px;vertical-align:-3px;margin-right:3px;flex:none}
#help-dialog{position:fixed;inset:0;margin:auto;max-width:min(620px,calc(100vw - 28px));width:100%;max-height:calc(100dvh - 36px);overflow:auto;padding:22px 25px;border:1px solid var(--border);border-radius:15px;background:var(--card);color:var(--fg);box-shadow:0 22px 70px #0005}
#help-dialog::backdrop{background:rgba(0,0,0,.55)}
.help-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.help-top h2{margin:0;font-size:1.2rem}
#help-close{font-size:1.5rem;line-height:1;width:38px;height:38px;min-width:38px;padding:0}
.help-table{width:100%;border-collapse:collapse;font-size:.92rem}
.help-table th,.help-table td{text-align:left;padding:9px 7px;border-bottom:1px solid var(--border)}
.help-table th{width:39%;white-space:nowrap;font-weight:700}
.help-footer{font-size:.85rem;line-height:1.5;margin:15px 0 0}
@media(max-width:480px){#help-dialog{padding:15px 12px}.help-table{font-size:.8rem}.help-table th{width:37%;white-space:normal}.header-controls #help-button{width:42px;min-width:42px;height:40px;min-height:40px;flex-basis:42px}}

/* v0.5.4: preparation options share a row on wider displays */
.setup-options{display:flex;flex-wrap:wrap;align-items:center;column-gap:24px;row-gap:0}
.setup-options .auto-locator-option{width:auto}
