#setup-panel-codes { display: block; overflow: auto; }
#setup-panel-codes .panel-heading { height: auto; min-height: 3rem; flex-wrap: wrap; gap: .75rem; margin-bottom: .7rem; }
#setup-panel-codes .panel-heading h2 { line-height: 1.3; }
#setup-panel-codes > p { max-width: 65rem; line-height: 1.5; }
#codes-refresh { width: auto; margin-bottom: .6rem; background: white; color: var(--purple); border: 1px solid var(--line); }
#setup-panel-codes .table-wrap { max-height: 24rem; }
#codes-rows td { vertical-align: top; padding: .55rem; }
#codes-rows td:nth-child(2) { min-width: 16rem; max-width: 40rem; overflow-wrap: anywhere; line-height: 1.45; }
#code-editor { display: block; max-width: 48rem; margin-top: 1.4rem; padding: 1rem; border: 1px solid var(--line); border-radius: .35rem; background: var(--canvas); }
#code-editor h3 { margin-bottom: .9rem; }
#code-editor label { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; margin: 0 0 .9rem; }
#code-editor input:not([type=checkbox]), #code-editor textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: .3rem; padding: .5rem; color: var(--ink); background: white; }
#code-editor textarea { resize: vertical; min-height: 6rem; line-height: 1.5; }
#code-editor input[name=sortOrder] { width: 8rem; }
#code-editor label.code-active { flex-direction: row; align-items: center; gap: .55rem; }
#code-editor input[type=checkbox] { width: 1rem; height: 1rem; min-height: 1rem; margin: 0; }
#code-behavior { color: var(--muted); line-height: 1.5; }
#code-cancel { color: var(--purple); background: white; border: 1px solid var(--line); }
@media(max-width:600px) {
  #setup-panel-codes .panel-heading { align-items: flex-start; }
  #code-editor { padding: .65rem; }
}
