/* pm-lite editor minimal CSS (no Tailwind) */
:root { --pm-editor-max-h: 480px; }

.pm-editor{border:1px solid #e5e7eb;border-radius:12px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.04);overflow:hidden}
.pm-toolbar{display:flex;align-items:center;gap:12px;padding:10px 12px;border-bottom:1px solid #e5e7eb;background:#f7f7f9;flex-wrap:wrap;row-gap:8px}
.pm-group{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.pm-sep{width:1px;height:28px;background:#d1d5db;margin:0 3px}
.pm-spacer{margin-left:auto;display:flex;align-items:center;gap:10px}
.pm-select{height:40px;border:1px solid #d1d5db;border-radius:8px;background:#fff;padding:0 10px;font-size:14px;flex:0 0 auto;min-width:110px}
.pm-btn{height:40px;min-width:40px;padding:0 10px;border:0;background:transparent;border-radius:8px;color:#374151;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:0 0 auto;}
.pm-btn:hover{background:#e5e7eb}
.pm-btn:active{transform:scale(.98)}
.pm-btn svg{width:18px;height:18px;display:block}
.pm-body{max-height: var(--pm-editor-max-h);overflow: auto;-webkit-overflow-scrolling: touch}
.pm-editor.pm-fullscreen .pm-body{height: calc(100vh - var(--pm-toolbar-h, 64px));max-height: none}
.pm-content{min-height:360px;padding:16px;font-size:16px;line-height:1.7;outline:none}
.pm-content:focus{box-shadow:inset 0 0 0 2px #c7d2fe}
.pm-source{display:none;width:100%;min-height:360px;padding:16px;border:0;outline:none;font:12px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}
.pm-editor.pm-show-source .pm-content{display:none}
.pm-editor.pm-show-source .pm-source{display:block}
/* Fullscreen */
.pm-editor.pm-fullscreen{position:fixed;inset:0;margin:0;border-radius:0 !important;z-index:9999}
.pm-editor.pm-fullscreen .pm-content{min-height:calc(100vh - 60px)}
body.pm-noscroll{overflow:hidden}
/* prose-like defaults */
.pm-content h1{font-size:28px;margin:18px 0 8px;font-weight:700}
.pm-content h2{font-size:22px;margin:16px 0 8px;font-weight:700}
.pm-content h3{font-size:18px;margin:12px 0 6px;font-weight:700}
.pm-content p{margin:10px 0}
.pm-content ul{margin:10px 0 10px 20px;list-style:disc}
.pm-content ol{margin:10px 0 10px 22px;list-style:decimal}
.pm-content blockquote{margin:10px 0;padding:4px 10px;border-left:3px solid #e5e7eb;color:#4b5563}
.pm-content a{color:#2563eb;text-decoration:underline}
.pm-content img{max-width:100%;height:auto;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,.08);margin:10px 0}

/* === Table defaults === */
.pm-content table{ border-collapse:collapse; width:100%; margin:10px 0; }
.pm-content th, .pm-content td{ border:1px solid #e5e7eb; padding:8px 10px; }
.pm-content th{ background:#f7f7f9; font-weight:600; }

/* === Toolbar popovers === */
.pm-pop{ position:fixed; z-index:10002; display:none; }
.pm-pop.is-open{ display:block; }
.pm-pop .pm-card{
  background:#fff; border:1px solid #e5e7eb; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.15);
  padding:12px;
}

/* Table size picker */
.pm-table-grid{ display:grid; grid-template-columns:repeat(10, 20px); grid-auto-rows:20px; gap:6px; }
.pm-table-cell{
  width:20px; height:20px; border:1px solid #d1d5db; border-radius:4px; background:#fff; cursor:pointer;
}
.pm-table-cell.is-on{ background:#111827; }

/* Color palette */
.pm-color-grid{ display:grid; grid-template-columns:repeat(6, 26px); grid-auto-rows:26px; gap:8px; }
.pm-swatch{
  width:26px; height:26px; border-radius:6px; border:1px solid #d1d5db; cursor:pointer;
}
.pm-swatch[data-none="1"]{ background:linear-gradient(135deg,#fff 45%, #ef4444 45%, #ef4444 55%, #fff 55%); }


@media (max-width: 640px){
  .pm-sep{display:none}
  .pm-spacer{margin-left:0;flex-basis:100%;justify-content:flex-end}
}