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

.smg-intro { text-align: center; color: #4b5563; font-size: .92em; line-height: 1.6; max-width: 640px; margin: 0 auto 22px; }

.smg-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.smg-panel { border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px; background: #fff; min-width: 0; }
.smg-panel h2 { font-size: 1.02em; margin: 0 0 12px; color: #23272f; }

.smg-type-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.smg-type-row label { font-size: .84em; font-weight: 600; color: #374151; }
.smg-type-hint { font-size: .84em; color: #6b7280; margin: 0 0 14px; line-height: 1.5; }
.smg-type-row select { max-width: 100%; }

.smg-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.smg-field label { font-size: .84em; font-weight: 600; color: #374151; }
.smg-input { width: 100%; box-sizing: border-box; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 10px; font: inherit; font-size: .92em; background: #fff; color: #23272f; min-width: 0; }
.smg-input:focus { border-color: var(--site-light); outline: none; }
textarea.smg-input { resize: vertical; }
.smg-hint { font-size: .78em; color: #6b7280; }

.smg-block { border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; margin-bottom: 12px; background: #f7f8fa; }
.smg-block-title { font-size: .86em; font-weight: 700; color: #23272f; margin: 0 0 10px; }
.smg-block-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

.smg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 30px; padding: 9px 18px; font: inherit; font-weight: 600; font-size: .9em; cursor: pointer; transition: background .2s ease; }
.smg-btn:focus-visible, .smg-input:focus-visible { outline: 3px solid #5eead4; outline-offset: 2px; }
.smg-btn:disabled { opacity: .5; cursor: not-allowed; }
.smg-btn-primary { background: var(--site-dark); color: #fff; }
.smg-btn-primary:hover:not(:disabled) { background: var(--site-dark-2); }
.smg-btn-ghost { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.smg-btn-ghost:hover:not(:disabled) { background: #e5e7eb; }
.smg-btn-small { padding: 6px 12px; font-size: .82em; }
.smg-btn-danger { background: #fff; color: #b91c1c; border-color: #fecaca; }
.smg-btn-danger:hover:not(:disabled) { background: #fef2f2; }
.smg-add { margin-top: 2px; }

.smg-output-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.smg-ready { font-size: .86em; font-weight: 700; }
.smg-ready-ok { color: #047857; }
.smg-ready-bad { color: #b91c1c; }
.smg-options { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0 0 10px; font-size: .86em; color: #374151; }
.smg-options label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.smg-output-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.smg-output { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 16px; margin: 0; font-family: Consolas, "Courier New", monospace; font-size: .86em; line-height: 1.55; white-space: pre-wrap; word-break: break-word; min-height: 220px; max-height: 480px; overflow: auto; }
.smg-status { display: block; min-height: 1.2em; font-size: .84em; color: #047857; font-weight: 600; margin-top: 8px; }

.smg-issues { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.smg-issue { font-size: .86em; line-height: 1.5; padding: 9px 12px; border-radius: 8px; border: 1px solid transparent; color: #23272f; }
.smg-issue-error { background: #fef2f2; border-color: #fecaca; }
.smg-issue-warn { background: #fffbeb; border-color: #fde68a; }
.smg-issue-note { background: #eff6ff; border-color: #bfdbfe; }

.smg-disclaimer { margin: 18px 0 0; font-size: .82em; color: #6b7280; text-align: center; }

@media (max-width: 860px) {
    .smg-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .smg-card { padding: 18px 16px; }
    .smg-title-bar { margin: -18px -16px 20px; padding: 14px 16px; }
    .smg-title-bar h1 { font-size: 1.2em; }
    .smg-panel { padding: 14px; }
    .smg-output { font-size: .8em; }
    .smg-output-actions .smg-btn { flex: 1 1 auto; }
    .smg-block-actions .smg-btn { flex: 1 1 auto; }
}
