.cj-card { padding: 28px; }
.cj-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.cj-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; }

.cj-mode-toggle { display: flex; justify-content: center; gap: 8px; background: #f7f8fa; border: 1px solid #e5e7eb; border-radius: 30px; padding: 6px; margin: 0 auto 22px; max-width: 360px; }
.cj-mode-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; background: none; border: none; border-radius: 24px; padding: 9px 14px; font-weight: 600; font-size: .9em; color: #6b7280; cursor: pointer; transition: background .2s ease, color .2s ease; white-space: nowrap; }
.cj-mode-btn:hover { color: var(--site-dark); }
.cj-mode-btn.active { background: var(--site-dark); color: #fff; }

.cj-field { margin-bottom: 16px; }
.cj-field label { display: block; font-weight: 600; margin-bottom: 8px; font-size: .92em; }
.cj-field textarea { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 12px 14px; font-family: "Courier New", monospace; font-size: .92em; resize: vertical; box-sizing: border-box; outline: none; transition: border-color .15s ease; }
.cj-field textarea:focus { border-color: var(--site-light); }
.cj-field textarea[readonly] { background: #fafbfc; color: #23272f; }

.cj-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; }
.cj-btn { display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: 30px; padding: 9px 20px; font-weight: 600; font-size: .92em; cursor: pointer; transition: background .2s ease, opacity .2s ease; }
.cj-btn-primary { background: var(--site-dark); color: #fff; }
.cj-btn-primary:hover { background: var(--site-dark-2); }
.cj-btn-ghost { background: #f3f4f6; color: #374151; border: 1px solid #ddd; }
.cj-btn-ghost:hover { background: #eceef1; }

.cj-output-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cj-copy-btn, .cj-download-btn { background: none; border: 1px solid var(--site-light); border-radius: 20px; padding: 7px 16px; font-size: .85em; font-weight: 600; color: var(--site-dark); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.cj-copy-btn:hover, .cj-download-btn:hover { background: #f0fdfa; }
.cj-copied-msg { font-size: .85em; font-weight: 600; color: var(--site-success); display: inline-flex; align-items: center; gap: 5px; }
.cj-copied-msg.hide { display: none; }

.cj-error { margin-top: 14px; background: var(--site-danger-bg); color: var(--site-danger); border: 1px solid var(--site-danger-border); border-radius: 8px; padding: 10px 14px; font-size: .9em; display: flex; align-items: center; gap: 8px; }
.cj-error.hide { display: none; }

@media (max-width: 600px) {
    .cj-actions { flex-direction: column; }
    .cj-btn { justify-content: center; width: 100%; }
    .cj-mode-toggle { max-width: 100%; }
    .cj-output-row { flex-direction: column; align-items: stretch; }
    .cj-copy-btn, .cj-download-btn { justify-content: center; }
}
