#header-editor {
  width:min(720px,calc(100% - 24px)); max-width:none;
  max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px);
  padding:0; border:1px solid var(--border); border-radius:16px;
  background:var(--surface-deep,var(--card)); color:var(--text);
  box-shadow:0 20px 70px #0009; font-family:'Segoe UI',system-ui,sans-serif;
}
#header-editor[open] { display:flex; flex-direction:column; }
#header-editor::backdrop { background:#030407d9; }
.header-editor-heading { padding:20px 24px 16px; border-bottom:1px solid var(--border); flex-shrink:0; }
.header-editor-heading h2 { font-size:1.2rem; margin:0 0 8px; color:var(--accent,var(--text)); }
.header-editor-heading p { font-size:.88rem; color:var(--sub); line-height:1.5; margin:0; }
.header-editor-scroll { padding:18px 24px; overflow-y:auto; overscroll-behavior:contain; min-height:0; }
.header-bullet-fields { padding:0; margin:0; list-style:none; }
.header-bullet-field { margin-bottom:14px; border:1px solid var(--border); background:var(--surface,var(--bg2)); padding:12px; border-radius:12px; }
.header-bullet-tools { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.header-bullet-tools label { font-size:.85rem; font-weight:700; }
.header-bullet-buttons { display:flex; gap:6px; }
#header-editor .header-bullet-buttons button { min-width:40px; min-height:40px; padding:6px 10px; }
.header-bullet-field textarea { display:block; width:100%; min-height:84px; max-height:220px; resize:vertical; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-deep,var(--bg1)); color:var(--text); font:400 16px/1.55 'Segoe UI',system-ui,sans-serif; }
.header-bullet-field textarea:focus-visible { outline:2px solid var(--accent,var(--amber)); outline-offset:2px; }
.header-bullet-field textarea::placeholder { color:var(--sub); opacity:.8; }
.header-editor-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin:4px 0 22px; }
.header-editor-preview h3 { margin:0 0 10px; font-size:.95rem; }
.header-editor-preview .header-bullets { padding:14px 18px 14px 34px; }
#header-preview-empty { color:var(--sub); font-size:.88rem; }
.header-editor-footer { padding:14px 24px; border-top:1px solid var(--border); flex-shrink:0; }
.header-editor-actions { display:flex; justify-content:flex-end; gap:10px; }
#header-editor .btn { min-height:44px; }
#header-editor [hidden] { display:none !important; }
#header-editor-error { color:#ffbdca; margin:0 0 12px; font-size:.88rem; line-height:1.5; }
#header-discard-check p { margin:0 0 12px; color:var(--amber); }
.header-editor-status { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
@media (max-width:600px) {
  .header-editor-heading { padding:16px; }
  .header-editor-scroll { padding:14px; }
  .header-editor-footer { padding:12px 14px; }
  .header-editor-actions .btn { flex:1; min-width:0; padding:9px 10px; }
  #header-editor .header-bullet-buttons button { min-width:44px; min-height:44px; }
}
