/* JS8 uses the same fixed messenger surface and colours as FT8 Studio. */
.js8-page.studio-messenger .js8-workbench{width:100%;grid-template-columns:minmax(0,1fr);height:var(--studio-room);min-height:0;padding:0;overflow:hidden;}
.js8-page.studio-messenger .ft8-center-stack{grid-column:1;grid-row:1;display:block;height:100%;min-width:0;min-height:0;padding-bottom:62px;}
.js8-page.studio-messenger .ft8-terminal-panel{display:flex;flex-direction:column;height:100%;min-height:0;padding:0;}
.js8-page.studio-messenger .ft8-console-head{flex:none;padding:6px 4px;margin:0;min-height:38px;}
.js8-page.studio-messenger .ft8-view-controls{flex:none;justify-content:flex-start;}
.js8-page #js8Count{margin-left:auto;font-size:11px;color:var(--studio-muted);}
.js8-page.studio-messenger .ft8-message-frame{height:0;flex:1 1 0;min-height:0;max-height:none;}
.js8-page.studio-messenger .ft8-message-table{table-layout:fixed;width:100%;}
.js8-page .ft8-message-table td:last-child{white-space:pre-wrap;overflow-wrap:anywhere;}
.js8-page .ft8-message-table td small{display:block;color:#b5c5af;font-size:10px;}
.js8-page.studio-messenger .ft8-message-table tr.js8-addressed td{background:#412522e8;color:#fff2e9;}
.js8-empty{color:#b4c5b1;text-align:center;padding:40px 16px;font-size:12px;}
.js8-page.studio-messenger .js8-settings-drawer{left:0;right:auto;transform:translateX(-105%);box-shadow:12px 0 32px #0005;}
.js8-page.studio-messenger .studio-radio-open .js8-settings-drawer{transform:translateX(0);}
.js8-page.studio-messenger .studio-radio-pinned{grid-template-columns:300px minmax(0,1fr);column-gap:12px;}
.js8-page.studio-messenger .studio-radio-pinned>.ft8-center-stack{grid-column:2;}
.js8-page.studio-messenger .studio-radio-pinned .js8-settings-drawer{grid-column:1;position:relative;transform:none;box-shadow:none;}
.js8-panel-tools{justify-content:flex-start;gap:12px;}
.js8-panel-tools b{color:var(--studio-yellow);font-size:12px;}
.js8-panel-tools [data-studio-radio]{background:#203c28;border:1px solid #547047;color:#edf3e9;border-radius:8px;padding:5px 12px;}
.js8-panel-tools [data-studio-radio][aria-expanded=true]{background:#345128;border-color:#9cb653;color:#ffda32;}
.js8-help nav{display:flex;gap:8px;margin:12px 0;}.js8-help nav [aria-pressed=true]{background:#ffda32;color:#122009;}.js8-help [data-help-body] section{margin:16px 0;}.js8-help [data-help-body] h3{margin-top:0;}
.js8-panel-tools a{margin-left:auto;color:var(--studio-muted);font-size:11px;padding:5px;}
.js8-page .ft8-panel-heading h1{font-size:16px;color:var(--studio-yellow);margin:0;}
.js8-page .ft8-panel-heading p,.js8-note{font-size:11px;line-height:1.5;color:var(--studio-muted);margin:8px 0;}
.js8-page .js8-compose-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
.js8-text-label{display:block;}.js8-text-label textarea{display:block;width:100%;}
.js8-page.studio-messenger .studio-qso-quick .ft8-transport-panel{display:flex;gap:8px;flex:1;}
.js8-page.studio-messenger .studio-qso-quick button:not(.studio-qso-handle){min-height:38px;white-space:normal;}
.js8-page #js8StartRx{background:#abd93b;color:#102009;border:0;}
.js8-page #js8StopRx,.js8-page #js8StopTx{background:transparent;border:1px solid #547047;color:#e6eddf;}
.js8-page #js8Send{background:#ffda32;color:#182009;border:0;}
.js8-page .studio-quick-band{margin-left:auto;max-width:190px;}
.js8-page .ft8-terminal-actions a{color:var(--studio-yellow);font-size:11px;padding:6px;}
.js8-stations{list-style:none;margin:0;padding:0;max-height:240px;overflow:auto;}
.js8-stations li{padding:8px 0;border-bottom:1px solid var(--studio-line);font-size:12px;}
.js8-stations button{background:none;border:0;color:#b5e9be;font:inherit;cursor:pointer;text-align:left;}
.js8-stations small{display:block;color:var(--studio-muted);font-size:10px;}
.js8-guide{padding:10px 0;border-top:1px solid var(--studio-line);margin-top:12px;font-size:11px;line-height:1.6;}
.js8-guide p{margin:8px 0;}.js8-guide a{color:var(--studio-yellow);}
.js8-import{margin-top:12px;font-size:11px;}.js8-import input{width:100%;margin-top:8px;}
.js8-page .ft8-terminal-meta{display:flex;flex-wrap:wrap;gap:10px;padding:8px;}
.js8-page button:disabled{opacity:.45;cursor:default;}
body.js8-page select,body.js8-page select option,body.js8-page dialog.studio-setup select,body.js8-page dialog.studio-setup select option{color-scheme:dark;background:#0d2117;color:#edf3e9;border-color:#4a6742;}
body.js8-page dialog.studio-setup select:disabled{opacity:1;background:#14291c;color:#adbcab;}
.js8-page input:focus-visible,.js8-page select:focus-visible,.js8-page textarea:focus-visible{outline:2px solid #ffda32;outline-offset:2px;}
@media(max-width:900px){
 .js8-page.studio-messenger .ft8-center-stack{padding-bottom:144px;}
 .js8-page.studio-messenger .studio-radio-pinned{grid-template-columns:minmax(0,1fr);}
 .js8-page.studio-messenger .studio-radio-pinned>.ft8-center-stack{grid-column:1;}
 .js8-page.studio-messenger .studio-radio-pinned .js8-settings-drawer{position:absolute;left:0;right:auto;width:300px;max-width:calc(100% - 18px);}
 .js8-page.studio-messenger .studio-qso-quick .ft8-transport-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:44px 44px;gap:5px;}
 .js8-page.studio-messenger .studio-qso-quick button:not(.studio-qso-handle){min-height:44px;font-size:10px;}
 .js8-page .studio-quick-band{max-width:none;margin-left:0;grid-column:span 2;}
 .js8-page .js8-compose-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .js8-page .ft8-view-controls{flex-wrap:wrap;}
 .js8-page .ft8-console-head{flex-wrap:wrap;}
}
/* Pinned Message | Live Decode | Heard | optional pinned Audio / Radio. */
.js8-page.studio-messenger .js8-workbench{grid-template-columns:280px minmax(0,1fr) 160px;gap:8px;}
.js8-page.studio-messenger .js8-workbench.studio-radio-pinned{grid-template-columns:280px minmax(0,1fr) 160px 280px;gap:8px;}
.js8-page.studio-messenger .js8-workbench>.ft8-center-stack,.js8-page.studio-messenger .js8-workbench.studio-radio-pinned>.ft8-center-stack{grid-column:2;padding-bottom:100px;}
.js8-message-pane{grid-column:1;grid-row:1;min-width:0;min-height:0;overflow:auto;background:#10261a;scrollbar-width:thin;}
.js8-compose-body{padding:8px 10px;}
.js8-message-pane [data-message-close]{display:none;}
.js8-message-pane .js8-compose-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
.js8-message-pane .js8-text-label textarea{height:120px;min-height:80px;resize:vertical;}
.js8-message-pane .ft8-terminal-actions{justify-content:flex-start;}
.js8-heard-column{grid-column:3;grid-row:1;min-width:0;min-height:0;overflow:auto;padding:8px;background:#10261a;scrollbar-width:thin;}
.js8-heard-column .ft8-panel-heading{margin-bottom:6px;}.js8-heard-column h2{font-size:12px;}
.js8-heard-column .js8-stations{max-height:none;}.js8-heard-column .js8-stations button{overflow-wrap:anywhere;}
.js8-page.studio-messenger .js8-settings-drawer{left:auto;right:0;transform:translateX(105%);width:280px;}
.js8-page.studio-messenger .studio-radio-open .js8-settings-drawer{transform:translateX(0);}
.js8-page.studio-messenger .js8-workbench.studio-radio-pinned .js8-settings-drawer{grid-column:4;left:auto;right:0;transform:none;}
.js8-page.studio-messenger .studio-qso-quick{height:100px;padding:6px;}
.js8-page.studio-messenger .studio-qso-quick .studio-qso-handle{display:none;}
.js8-page.studio-messenger .studio-qso-quick .ft8-transport-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:40px 40px;gap:5px;}
.js8-page .studio-quick-band{grid-column:span 2;margin:0;max-width:none;}.js8-page .studio-quick-band select{width:100%;}
.js8-direction{display:inline-block;margin-right:6px;padding:2px 5px;border-radius:4px;font-size:10px;background:#314e28;color:#ecf2df;}
.js8-page.studio-messenger .ft8-message-table tr.js8-tx-row td{background:#4b2326;color:#ffe3e1;}
.js8-tx-row .js8-direction{background:#9d2429;color:white;}
.js8-qso-station button{color:#ffda32;font-weight:700;}
dialog.js8-qso-chat{position:fixed;inset:auto 20px 112px auto;margin:0;width:min(440px,calc(100vw - 24px));max-height:70dvh;z-index:3000;padding:12px;border:1px solid #78944c;border-radius:12px;background:#10261a;color:#edf3e9;box-shadow:0 10px 45px #000a;font:12px/1.5 system-ui;}
.js8-chat-head{display:flex;align-items:center;justify-content:space-between;gap:10px;}.js8-chat-head h2{margin:0;color:#ffda32;font-size:15px;}
.js8-qso-chat [data-chat-note]{font-size:10px;color:#b6c6b0;margin:8px 0;}
.js8-qso-chat [data-chat-log]{max-height:32dvh;overflow:auto;scrollbar-width:thin;}
.js8-qso-chat article{padding:8px;border-radius:8px;margin:6px 0;background:#193c29;}.js8-qso-chat article.js8-chat-tx{background:#4b2326;}
.js8-qso-chat article p{white-space:pre-wrap;overflow-wrap:anywhere;margin:4px 0;}.js8-qso-chat article small{color:#c8d4bd;}
.js8-qso-chat form{margin:8px 0 0;max-width:none;padding:0;background:none;border:0;}.js8-qso-chat form label{display:block;}
.js8-qso-chat textarea{width:100%;background:#091b10;color:#edf3e9;border:1px solid #527047;border-radius:6px;padding:8px;font:inherit;}
.js8-qso-chat button{border:1px solid #6c884e;background:#213e25;color:#ffda32;border-radius:6px;padding:6px 10px;}
@media(max-width:1100px){
 .js8-page.studio-messenger .js8-workbench,.js8-page.studio-messenger .js8-workbench.studio-radio-pinned{grid-template-columns:250px minmax(0,1fr) 140px;}
 .js8-page.studio-messenger .js8-workbench.studio-radio-pinned .js8-settings-drawer{position:absolute;grid-column:auto;left:auto;right:0;width:280px;}
}
@media(max-width:900px){
 .js8-page.studio-messenger .js8-workbench,.js8-page.studio-messenger .js8-workbench.studio-radio-pinned{grid-template-columns:minmax(0,1fr) 104px;gap:5px;}
 .js8-page.studio-messenger .js8-workbench>.ft8-center-stack,.js8-page.studio-messenger .js8-workbench.studio-radio-pinned>.ft8-center-stack{grid-column:1;padding-bottom:144px;}
 .js8-heard-column{grid-column:2;padding:5px;}.js8-heard-column .ft8-panel-heading span{display:none;}.js8-heard-column small{font-size:9px;}
 .js8-message-pane{position:absolute;inset:0 auto 0 0;width:290px;max-width:calc(100% - 10px);z-index:20;display:none;box-shadow:12px 0 30px #0007;}
 .js8-message-open .js8-message-pane{display:block;}.js8-message-pane [data-message-close]{display:block;}
 .js8-page.studio-messenger .studio-qso-quick{height:144px;}.js8-page.studio-messenger .studio-qso-quick .studio-qso-handle{display:block;}
 .js8-page.studio-messenger .studio-qso-quick .ft8-transport-panel{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:44px 44px;}
 dialog.js8-qso-chat{right:12px;bottom:155px;max-height:65dvh;}
}

/* Compact monitor above Heard; templates open upward without growing Message. */
.js8-panel-tools{flex-direction:row-reverse;justify-content:space-between;}
.js8-heard-column .ft8-audio-monitor{margin:0 0 12px;padding:0;min-width:0;}
.js8-heard-column .ft8-audio-monitor h3{font-size:11px;margin:0 0 5px;}
.js8-heard-column #js8Spectrum{display:block;width:100%;height:74px;}
.js8-heard-column .ft8-meter{margin-top:4px;}
.js8-template-picker{position:relative;font-size:11px;}
.js8-template-picker>summary{list-style:none;cursor:pointer;padding:7px 10px;border:1px solid #547047;border-radius:6px;background:#203c28;color:#edf3e9;}
.js8-template-picker>summary::-webkit-details-marker{display:none;}
.js8-template-picker[open]>summary{color:#ffda32;border-color:#9cb653;}
.js8-template-menu{position:absolute;bottom:calc(100% + 6px);right:0;left:auto;width:224px;max-width:calc(100vw - 50px);max-height:260px;overflow:auto;z-index:30;display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:7px;background:#10261a;border:1px solid #78944c;border-radius:8px;box-shadow:0 -8px 24px #0008;}
.js8-page .js8-template-menu button{white-space:normal;text-align:left;font-size:11px;padding:7px;min-height:36px;color:#edf3e9;background:#203c28;border:1px solid #547047;border-radius:5px;}
.js8-template-picker>summary:focus-visible,.js8-template-menu button:focus-visible{outline:2px solid #ffda32;outline-offset:2px;}
@media(max-width:900px){.js8-heard-column #js8Spectrum{height:55px;}}

.js8-message-pane .js8-compose-grid label{min-width:0;}
.js8-message-pane .js8-compose-grid input,.js8-message-pane .js8-compose-grid select{box-sizing:border-box;display:block;width:100%;min-width:0;height:36px;min-height:36px;margin:0;padding:6px 8px;font-size:12px;}

/* Wider activity column gives spectrum and independent RX/TX handles room. */
.js8-page.studio-messenger .js8-workbench{grid-template-columns:280px minmax(0,1fr) 240px;}
.js8-page.studio-messenger .js8-workbench.studio-radio-pinned{grid-template-columns:280px minmax(0,1fr) 240px 280px;}
.js8-heard-column #js8Spectrum{height:118px;}
.js8-tone-scope{position:relative;padding-top:42px;}
.js8-tone-track{position:absolute;inset:0 0 auto;height:42px;background:#091b10;border-radius:5px 5px 0 0;}
.js8-tone-track button{position:absolute;top:0;padding:0;width:3px;height:40px;border:0;border-radius:0;background:#96d760;cursor:ew-resize;touch-action:none;}
.js8-tone-track #js8TxMarker{top:21px;height:20px;background:#ff7777;}
.js8-tone-track button span{position:absolute;left:0;top:0;transform:translateX(-50%);font:9px/17px system-ui;white-space:nowrap;color:#d6f8a1;background:#193c29;border-radius:3px;padding:0 3px;}
.js8-tone-track #js8TxMarker span{color:#ffc3c3;background:#4b2326;}
.js8-tone-note{font-size:9px;color:#afc1a9;margin:4px 0;}.js8-split{font-size:10px;margin:5px 0;}
.js8-page .ft8-message-table th:nth-child(-n+5),.js8-page .ft8-message-table td:nth-child(-n+5){width:48px;font-size:10px;}
.js8-page .ft8-message-table th:first-child,.js8-page .ft8-message-table td:first-child{width:64px;}
.js8-page .ft8-message-table th:last-child,.js8-page .ft8-message-table td:last-child{width:auto;}
.js8-page .ft8-message-table tr:focus-visible{outline:2px solid #ffda32;outline-offset:-2px;}
dialog.js8-log-dialog{width:min(480px,calc(100vw - 24px));max-height:85dvh;overflow:auto;border:1px solid #78944c;border-radius:12px;background:#10261a;color:#edf3e9;padding:16px;box-shadow:0 12px 45px #000a;}
.js8-log-dialog::backdrop{background:#0009;}.js8-log-dialog form{margin:10px 0 0;padding:0;max-width:none;border:0;background:none;}
.js8-log-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;}.js8-log-fields label{display:block;min-width:0;font-size:11px;}.js8-log-fields span{display:block;margin-bottom:4px;}.js8-log-fields input{width:100%;min-width:0;box-sizing:border-box;background:#091b10;color:#edf3e9;border:1px solid #527047;border-radius:6px;padding:8px;}.js8-log-fields label:last-child{grid-column:1/-1;}.js8-log-dialog p{font-size:11px;color:#c3d2bb;}.js8-log-dialog button{padding:7px 10px;border:1px solid #78944c;border-radius:6px;background:#213e25;color:#ffda32;}
@media(max-width:1100px){.js8-page.studio-messenger .js8-workbench,.js8-page.studio-messenger .js8-workbench.studio-radio-pinned{grid-template-columns:250px minmax(0,1fr) 190px;}}
@media(max-width:900px){.js8-page.studio-messenger .js8-workbench,.js8-page.studio-messenger .js8-workbench.studio-radio-pinned{grid-template-columns:minmax(0,1fr) 140px;}.js8-heard-column #js8Spectrum{height:90px;}.js8-page .ft8-message-table th:nth-child(-n+5),.js8-page .ft8-message-table td:nth-child(-n+5){width:35px;font-size:9px;}.js8-page .ft8-message-table th:first-child,.js8-page .ft8-message-table td:first-child{width:50px;}}
@media(max-width:600px){
 .js8-page.studio-messenger .ft8-message-table,.js8-page.studio-messenger .ft8-message-table tbody{display:block;}
 .js8-page.studio-messenger .ft8-message-table thead{display:none;}
 .js8-page.studio-messenger .ft8-message-table tr{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:6px;border-radius:8px;overflow:hidden;}
 .js8-page.studio-messenger .ft8-message-table td:nth-child(n){display:block;width:auto;font-size:9px;white-space:normal;overflow-wrap:anywhere;padding:5px 3px;}
 .js8-page.studio-messenger .ft8-message-table td:last-child{grid-column:1/-1;font-size:11px;padding:6px;white-space:pre-wrap;}
 .js8-page .ft8-message-table td:nth-child(-n+5)::before{display:block;color:#b6c6b0;font:8px system-ui;margin-bottom:3px;}
 .js8-page .ft8-message-table td:nth-child(1)::before{content:'UTC';}.js8-page .ft8-message-table td:nth-child(2)::before{content:'dB';}.js8-page .ft8-message-table td:nth-child(3)::before{content:'DT · s';}.js8-page .ft8-message-table td:nth-child(4)::before{content:'Hz';}.js8-page .ft8-message-table td:nth-child(5)::before{content:'Speed';}
}
@media(max-width:600px){.js8-page.studio-messenger .ft8-message-table tr{grid-template-columns:minmax(46px,1.4fr) repeat(4,minmax(0,1fr));}.js8-page.studio-messenger .ft8-message-table td:first-child{white-space:nowrap;font-size:8px;}}

.js8-heard-column .ft8-panel-heading{display:flex;flex-wrap:wrap;align-items:center;gap:6px;}.js8-heard-column .ft8-panel-heading>span{flex-basis:100%;}.js8-heard-column .ft8-panel-heading h2{margin:0;}.js8-psk-toggle{margin-left:auto;font-size:10px;white-space:nowrap;}.js8-heard-column #js8PskState{flex-basis:100%;font-size:9px;line-height:1.4;margin:0 0 4px;overflow-wrap:anywhere;}
