main{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr) minmax(0,1fr);min-width:0;max-width:100%;overflow-x:hidden}.panel,.pipeline,.input-panel,.candidates{min-width:0;max-width:100%;box-sizing:border-box}textarea{width:100%;max-width:100%;box-sizing:border-box}.actions button,.actions .file{padding-left:10px;padding-right:10px}#recognized,#decoded,#plaintext,#input,#morseOutput,#carrier,#attemptedPath{display:block;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere;word-break:break-word;white-space:pre-wrap;overflow-x:auto}#decodeProgress{display:block;width:100%;max-width:100%;box-sizing:border-box}#attemptedPath{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media(max-width:1050px){main{grid-template-columns:minmax(0,1fr)}}

.enigma-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:rgba(0,0,0,.72)}.enigma-dialog{width:min(680px,calc(100vw - 32px));padding:24px;background:#0b1213;border:1px solid #d99b1e;box-shadow:0 12px 40px #000;color:#d9e1df}.enigma-dialog h3{margin:0 0 8px;color:#ffb31a}.enigma-dialog p{color:#9aa7a4}.enigma-dialog textarea{width:100%;min-height:120px;box-sizing:border-box;background:#050909;color:#e5ecea;border:1px solid #4b5b58;padding:12px;font:16px monospace}.enigma-dialog>div{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.enigma-dialog button{padding:10px 22px;background:#111b1c;color:#ffb31a;border:1px solid #ffb31a;cursor:pointer}

.prune-control{display:inline-flex;vertical-align:top;min-width:0;width:clamp(280px,30vw,420px);flex-direction:row;align-items:stretch}.prune-control>span{white-space:nowrap;display:flex;align-items:center;padding:0 16px}.prune-control input,.prune-control select{width:100%;min-width:0;box-sizing:border-box;background:#0b1213;color:#d9e1df;border:1px solid #42514f;padding:10px;height:auto}.encrypt-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px}.encrypt-actions>.option-control{min-width:0}.encrypt-actions>.prune-control{flex:1 1 320px;height:auto}
.encrypt-actions{flex-wrap:nowrap;overflow-x:auto}.encrypt-actions>.prune-control{flex:0 0 300px;width:300px}.prune-control input[type=button]{cursor:pointer;text-align:left}
.actions{display:grid!important;grid-template-columns:minmax(0,auto) minmax(0,auto) minmax(0,1fr)!important;flex-wrap:initial!important;align-items:stretch;gap:8px;overflow:visible}.actions>#manualEnigma,.actions>#exactEnigma{width:100%;min-width:0;white-space:nowrap}.actions>.prune-control{width:100%;min-width:0;height:64px}.prune-control>span{color:var(--text);text-transform:none;font-size:16px}.prune-control input{border:0;background:#101617;font:600 16px Consolas;cursor:pointer;white-space:nowrap}.actions>.prune-control input{min-width:0}.actions>button{white-space:nowrap}

.actions>.prune-control{justify-content:center;cursor:pointer}.actions>.prune-control>span{color:var(--text)!important;text-transform:none!important;padding:0!important}.actions>.prune-control input,.actions>.prune-control select{display:none!important}.actions>.prune-control:hover{border-color:var(--amber)}

.actions{grid-auto-rows:84px}.actions>*{height:84px!important;min-height:84px!important;max-height:84px!important;align-self:stretch;box-sizing:border-box}

.actions{grid-auto-rows:56px}.actions>*{height:56px!important;min-height:56px!important;max-height:56px!important;padding-top:8px!important;padding-bottom:8px!important}.actions>.prune-control{height:56px!important}

.actions{grid-auto-rows:48px;align-items:stretch}.actions>*{height:48px!important;min-height:48px!important;max-height:48px!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:6px 12px!important;line-height:1!important}.actions>.prune-control>span{display:block!important;line-height:34px!important}.actions>.prune-control{display:flex!important}
#decodeProgress,#attemptedPath{display:none!important}
#shift{display:none!important}
.pipeline article:nth-of-type(3) small{display:none!important}

/* Keep encryption controls readable on narrow phone screens. */
@media (max-width:600px){
  header{padding:14px 16px;min-height:64px}
  .brand{font-size:22px;letter-spacing:.14em;white-space:nowrap}
  #encryptLab{padding:18px 12px 34px}
  .encrypt-head{display:block;margin-bottom:14px}
  .encrypt-head h1{font-size:20px;margin:0 0 6px;white-space:nowrap}
  .encrypt-head p{font-size:13px;line-height:1.55;margin:0}
  .encrypt-grid{gap:12px}
  .encrypt-input,.encrypt-output{padding:12px;gap:9px}
  .encrypt-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;overflow:visible}
  .encrypt-actions button,.encrypt-actions .option-control{width:100%;min-width:0;white-space:nowrap;writing-mode:horizontal-tb}
  .encrypt-actions .option-control select,.encrypt-actions .option-control input{min-width:0}
  .encrypt-input>textarea{min-height:170px}
  #protocols{max-height:150px;overflow:auto}
  footer{font-size:10px;padding:10px 14px}
}
