.mp-card { padding: 28px; }
.mp-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; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mp-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; }
.mp-copy-html-btn { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 8px 16px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: .88em; transition: background .15s ease; }
.mp-copy-html-btn:hover { background: rgba(255,255,255,.26); }
.mp-copy-html-btn.mp-copied { background: #d1fae5; color: var(--site-success); border-color: var(--site-success); }

.mp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mp-pane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mp-pane label { font-weight: 600; font-size: .9em; display: flex; align-items: center; gap: 8px; }
.mp-pane label i { color: var(--site-light); }

#mpSource { width: 100%; min-height: 480px; border: 1px solid #ddd; border-radius: 8px; padding: 14px 16px; font-family: "Courier New", monospace; font-size: .92em; line-height: 1.6; resize: vertical; box-sizing: border-box; }
#mpSource:focus { outline: none; border-color: var(--site-light); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }

.mp-preview { border: 1px solid #eee; border-radius: 8px; padding: 16px 20px; min-height: 480px; max-height: 720px; overflow-y: auto; background: #fff; box-sizing: border-box; }

/* ===== Rendered markdown content styling (scoped to preview pane) ===== */
.mp-preview h1, .mp-preview h2, .mp-preview h3, .mp-preview h4, .mp-preview h5, .mp-preview h6 { margin: 1.1em 0 .5em; line-height: 1.3; color: var(--site-dark); }
.mp-preview h1:first-child, .mp-preview h2:first-child, .mp-preview h3:first-child { margin-top: 0; }
.mp-preview h1 { font-size: 1.8em; border-bottom: 1px solid #eee; padding-bottom: .25em; }
.mp-preview h2 { font-size: 1.5em; border-bottom: 1px solid #eee; padding-bottom: .2em; }
.mp-preview h3 { font-size: 1.25em; }
.mp-preview h4 { font-size: 1.1em; }
.mp-preview h5 { font-size: 1em; }
.mp-preview h6 { font-size: .9em; color: #6b7280; }
.mp-preview p { margin: 0 0 1em; line-height: 1.7; }
.mp-preview a { color: var(--site-light); text-decoration: underline; }
.mp-preview strong { font-weight: 700; }
.mp-preview em { font-style: italic; }
.mp-preview img { max-width: 100%; border-radius: 6px; margin: 8px 0; }
.mp-preview ul, .mp-preview ol { padding-left: 24px; margin: 0 0 1em; }
.mp-preview li { margin-bottom: 4px; line-height: 1.6; }
.mp-preview blockquote { border-left: 4px solid var(--site-light); background: #f7f8fa; margin: 0 0 1em; padding: 10px 16px; color: #4b5563; }
.mp-preview blockquote p:last-child { margin-bottom: 0; }
.mp-preview hr { border: none; border-top: 2px solid #eee; margin: 1.5em 0; }
.mp-preview code { font-family: "Courier New", monospace; background: #f1f2f4; border-radius: 4px; padding: 2px 6px; font-size: .88em; color: var(--site-danger); }
.mp-preview pre { background: #1e293b; color: #e2e8f0; border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 1em; }
.mp-preview pre code { background: none; padding: 0; color: inherit; font-size: .88em; }
.mp-preview table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: .92em; }
.mp-preview table th, .mp-preview table td { border: 1px solid #e0e2e6; padding: 8px 12px; text-align: left; }
.mp-preview table th { background: #f1f2f4; font-weight: 700; }
.mp-preview table tr:nth-child(even) td { background: #f7f8fa; }
.mp-empty-hint { color: #9aa0aa; font-style: italic; }

@media (max-width: 900px) {
    .mp-split { grid-template-columns: 1fr; }
    #mpSource, .mp-preview { min-height: 320px; }
}

@media (max-width: 600px) {
    .mp-title-bar { margin: -20px -20px 20px; padding: 16px 18px; flex-direction: column; align-items: flex-start; }
}
