.beu-card { padding: 28px; }
.beu-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; }
.beu-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; }

.beu-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: 320px; }
.beu-mode-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; background: none; border: none; border-radius: 24px; padding: 9px 16px; font-weight: 600; font-size: .92em; color: #6b7280; cursor: pointer; transition: background .2s ease, color .2s ease; }
.beu-mode-btn:hover { color: var(--site-dark); }
.beu-mode-btn.active { background: var(--site-dark); color: #fff; }

.beu-field { margin-bottom: 16px; }
.beu-field label { display: block; font-weight: 600; margin-bottom: 8px; font-size: .92em; }
.beu-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; }
.beu-field textarea:focus { border-color: var(--site-light); }
.beu-field textarea[readonly] { background: #fafbfc; color: #23272f; }

.beu-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; }
.beu-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; }
.beu-btn-primary { background: var(--site-dark); color: #fff; }
.beu-btn-primary:hover { background: var(--site-dark-2); }
.beu-btn-ghost { background: #f3f4f6; color: #374151; border: 1px solid #ddd; }
.beu-btn-ghost:hover { background: #eceef1; }

.beu-output-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.beu-copy-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; }
.beu-copy-btn:hover { background: #f0fdfa; }
.beu-copied-msg { font-size: .85em; font-weight: 600; color: var(--site-success); display: inline-flex; align-items: center; gap: 5px; }
.beu-copied-msg.hide { display: none; }

.beu-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; }
.beu-error.hide { display: none; }

/* ===== Image <-> Base64 mode ===== */
.beu-image-section { margin-bottom: 18px; }
.beu-dropzone { border: 2px dashed #ddd; border-radius: 10px; padding: 26px; text-align: center; cursor: pointer; transition: border-color .2s ease, background .2s ease; margin-bottom: 14px; }
.beu-dropzone:hover, .beu-dropzone.dragover { border-color: var(--site-light); background: #f0fdfa; }
.beu-dropzone i { font-size: 1.8em; color: var(--site-light); margin-bottom: 8px; display: block; }
.beu-dropzone p { margin: 0 0 4px; color: #374151; font-weight: 600; }
.beu-dropzone small { color: #9aa0aa; }
.beu-dropzone input { display: none; }

.beu-image-preview { display: flex; align-items: center; gap: 16px; background: #f7f8fa; border: 1px solid #eee; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.beu-image-preview img { max-width: 120px; max-height: 120px; border-radius: 8px; border: 1px solid #e5e7eb; background: repeating-conic-gradient(#f0f1f3 0% 25%, #fff 0% 50%) 50% / 16px 16px; object-fit: contain; flex-shrink: 0; }
.beu-image-meta { font-size: .88em; color: #6b7280; font-family: "Courier New", monospace; }

@media (max-width: 600px) {
    .beu-actions { flex-direction: column; }
    .beu-btn { justify-content: center; width: 100%; }
    .beu-mode-toggle { max-width: 100%; padding: 4px; gap: 4px; }
    .beu-mode-btn { padding: 8px 6px; gap: 5px; font-size: .82em; }
    .beu-image-preview { flex-wrap: wrap; }
}
