/* A stable mobile command row: Enter is a key, never a pasted message. */
.terminal,.terminal.keys-on{grid-template-rows:46px minmax(0,1fr) auto auto auto}
.terminal-start-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;background:#282333;border-top:1px solid #ffffff14;color:#dfc9af;font-size:11px;line-height:1.35}
.terminal-start-bar[hidden],.terminal-start-bar button[hidden]{display:none}
.terminal-start-bar button{flex:none;min-height:40px;padding:0 12px;border:1px solid #7eaa92;border-radius:10px;background:#294d3b;color:#e1f4e8;font-size:11px;font-weight:700;touch-action:manipulation}
.terminal-start-bar button:disabled{opacity:.55}
.terminal-id{min-width:0;display:flex;align-items:flex-start;flex-direction:column;gap:3px}
.terminal-id b{font-size:11px}.terminal-id small{max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#879790;font-size:9px}
.term-actions{gap:7px;flex-shrink:0}.term-state{font-size:10px}
#terminalLatency{font:9px ui-monospace,monospace;color:#7e9288}
.control-keys,.terminal.keys-on .control-keys{display:block;padding:3px 8px 5px;overflow:visible}
.primary-keys{display:flex;gap:4px;align-items:center;justify-content:space-between}
.control-keys button{min-height:44px;min-width:34px;padding:0 7px;touch-action:manipulation;transition:background-color .12s}
.control-keys button:disabled{opacity:.4}
.control-keys .confirm-key{background:#294d3b;color:#d4f4df;font-weight:650;min-width:63px}
.control-keys button.sending{background:#45402b;color:#f0d998;opacity:1}
.control-keys button:focus-visible{outline:2px solid #95d5ad;outline-offset:-2px}
.extra-keys{display:flex;gap:8px;border-top:1px solid #ffffff0c;margin-top:2px}
.extra-keys[hidden]{display:none}.extra-keys [data-key="ctrl-c"]{margin-left:auto;color:#dfb3b3}
.key-receipt{display:block;min-height:15px;padding:1px 4px 0;color:#8e9d98;font-size:10px;line-height:1.5;overflow-wrap:anywhere}
.key-receipt[data-state="sending"]{color:#d6bf80}.key-receipt[data-state="ok"]{color:#95d5ad}.key-receipt[data-state="error"]{color:#e5a3a3}
.terminal-connect{bottom:135px}
@media(max-width:350px){.control-keys button{min-width:30px;padding:0 6px}.control-keys .confirm-key{min-width:61px}.primary-keys{gap:2px}#terminalLatency{display:none}.terminal-id small{max-width:125px}}
@media(max-height:520px){.terminal,.terminal.keys-on{grid-template-rows:38px minmax(0,1fr) auto auto auto}.control-keys button{min-height:38px}.terminal-start-bar{padding:3px 8px}}
@media(prefers-reduced-motion:reduce){.control-keys button{transition:none}}
