.cmd { padding-bottom: 3rem; }
.cmd [hidden] { display: none !important; }
.cmd-head, .cmd-row, .cmd-editor-head, .cmd-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cmd-head, .cmd-row, .cmd-editor-head { justify-content: space-between; }
.cmd-head { margin: 12px 0 24px; align-items: flex-end; }
.cmd-head h1 { margin: 7px 0; line-height: 1.2; font-size: clamp(1.6rem, 4vw, 2.35rem); }
.cmd-head p, .cmd-note, .cmd small { color: var(--text-2); line-height: 1.6; }
.cmd-back, .cmd-library button[aria-current="true"] { color: var(--accent-text); }
.cmd-back, .cmd-note, .cmd-library h3, .cmd small { font-size: .85rem; }
.cmd-layout { display: grid; grid-template-columns: minmax(172px, 218px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cmd .card { padding: clamp(16px, 2.3vw, 26px); }
.cmd h2 { font-size: 1.13rem; margin: 0; }
.cmd-library h3 { margin: 20px 0 5px; color: var(--text-2); }
.cmd-library button { border: 0; background: transparent; color: inherit; font: inherit; width: 100%; padding: 8px 10px; text-align: left; border-radius: var(--r-md, 8px); cursor: pointer; }
.cmd-library button:hover, .cmd-library button[aria-current="true"] { background: var(--accent-soft); }
.cmd-library button[aria-current="true"] { font-weight: 700; }
#miniLibrary { display: none; }
.cmd-work, .cmd-fields, .cmd-field, .cmd-version { display: grid; gap: 7px; min-width: 0; }
.cmd-work { gap: 16px; }
.cmd-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; margin-top: 20px; }
.cmd-field > span, .cmd-version { font-weight: 600; font-size: .9rem; }
.cmd-field input, .cmd select { width: 100%; min-width: 0; }
.cmd-version { min-width: 155px; }
.cmd-row .select { width: auto; }
.cmd-editor-head code, #draftCount { font-family: var(--font-mono, monospace); font-size: .85rem; color: var(--accent-text); }
.cmd #output { box-sizing: border-box; display: block; width: 100%; resize: vertical; margin: 14px 0 0; min-height: 6rem; padding: 14px 16px; background: #182624; color: #d8f8d7; border: 1px solid #324640; border-radius: var(--r-md, 8px); font: .95rem/1.6 var(--font-mono, monospace); overflow-wrap: anywhere; }
.cmd .cmd-note { margin: 8px 0; }
.cmd .cmd-note:empty { display: none; }
.cmd-actions { margin-top: 14px; }
.cmd button:disabled { opacity: .55; cursor: default; }
.cmd #queue { margin: 0; padding-left: 1.8rem; }
.cmd #queue li { padding: 9px 0; }
.cmd-line { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.cmd-line code { font: .85rem/1.6 var(--font-mono, monospace); white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.cmd-line button { flex: none; }
.cmd #download { margin-top: 12px; }
.cmd #status { min-height: 1.5em; color: var(--text-2); }
@media (max-width: 740px) {
  .cmd-layout { grid-template-columns: minmax(0, 1fr); }
  .cmd-library nav { display: none; }
  #miniLibrary { display: block; margin-top: 10px; }
}
@media (max-width: 520px) {
  .cmd-fields { grid-template-columns: minmax(0, 1fr); }
  .cmd-version { width: 100%; }
}
