/* FlirtLabz Lexical Editor - Core Styles */
/* Unified across all platforms — v5 Enhanced Toolbar & Icons */

/* ============================================
   VARIABLES & DESIGN TOKENS - DARK THEME ONLY
   ============================================ */
:root {
  --lexical-purple: #7C3AED;
  --lexical-purple-light: #A78BFA;
  --lexical-purple-dark: #5B21B6;
  --lexical-purple-soft: rgba(124, 58, 237, 0.15);

  /* Dark theme colors - matching your site */
  --lexical-surface: #1a1020;
  --lexical-surface-hover: #24152d;
  --lexical-surface-toolbar: rgba(26, 16, 32, 0.95);
  --lexical-text: #f1f5f9;
  --lexical-text-secondary: #a68fb8;
  --lexical-text-muted: #6c6078;
  --lexical-border: rgba(255, 255, 255, 0.06);
  --lexical-border-hover: rgba(255, 255, 255, 0.12);

  --lexical-radius: 12px;
  --lexical-transition: 0.2s ease;
}

/* ============================================
   EDITOR CONTAINER
   ============================================ */
.lexical-editor {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--lexical-surface);
  border-radius: var(--lexical-radius);
  border: 1px solid var(--lexical-border);
  transition: border-color var(--lexical-transition);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

.lexical-editor:focus-within {
  border-color: var(--lexical-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* ============================================
   EDITOR AREA - NO INNER BORDER
   ============================================ */
.lexical-editor .editor-input {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  min-height: 100px;
  padding: 20px 24px;
  outline: none;
  font-size: 16px;
  line-height: 1.7;
  color: var(--lexical-text);
  max-width: min(100%, 760px);
  margin: 0 auto;
  width: 100%;
  background: transparent;
  border: none;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.lexical-editor-wrapper {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* ============================================
   PLACEHOLDER - CSS ONLY (no double text)
   ============================================ */
.lexical-placeholder {
  display: none !important;
}

.lexical-editor .editor-input:empty::before {
  content: attr(data-placeholder);
  color: var(--lexical-text-muted);
  pointer-events: none;
  position: absolute;
  padding: 0;
  font-size: 16px;
  line-height: 1.7;
  opacity: 0.4;
}

/* ============================================
   TOOLBAR - BASE STRUCTURE
   ============================================ */
.lexical-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  background: var(--lexical-surface-toolbar);
  backdrop-filter: blur(8px);
  border-radius: var(--lexical-radius) var(--lexical-radius) 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
  border: none;
  border-bottom: 1px solid var(--lexical-border);
}

.lexical-toolbar .toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 3px;
  border: 1px solid var(--lexical-border);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
}

.lexical-toolbar .toolbar-group-label {
  padding: 0 6px;
  color: var(--lexical-text-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.toolbar-mobile-tabs {
  display: none;
}

.toolbar-mobile-tabs[hidden],
.toolbar-group[hidden] {
  display: none !important;
}

.lexical-toolbar select {
  min-height: 34px;
  max-width: 118px;
  padding: 0 25px 0 9px;
  border: 0;
  border-radius: 7px;
  color: var(--lexical-text);
  background: rgba(255,255,255,.05);
  font: inherit;
  font-size: 12px;
}

/* ============================================
   TOOLBAR BUTTONS — Premium Editorial Icons
   ============================================ */
.lexical-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  color: #c0b0d0;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  min-height: 34px;
  min-width: 34px;
  font-weight: 500;
  position: relative;
}

.lexical-toolbar button:hover {
  background: rgba(168, 85, 247, 0.2);
  color: #d4b8f0;
  transform: translateY(-1px);
}

.lexical-toolbar button.active {
  background: rgba(168, 85, 247, 0.28);
  color: #c084fc;
  box-shadow: 0 0 0 1.5px rgba(168, 85, 247, 0.5);
}

/* The editable DOM below is owned and reconciled by Lexical. */
.lexical-editor-canvas { position: relative; }
.lexical-bold { font-weight: 700; }
.lexical-italic { font-style: italic; }
.lexical-underline { text-decoration: underline; text-underline-offset: .16em; }
.lexical-strikethrough { text-decoration: line-through; }
.lexical-underline.lexical-strikethrough { text-decoration: underline line-through; }
.lexical-highlight { background: rgba(250, 204, 21, .24); color: inherit; }
.lexical-inline-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.lexical-link { color: #d8b4fe; text-decoration: underline; text-underline-offset: .18em; }
.lexical-editor .editor-image--left { margin-left: 0; margin-right: auto; }
.lexical-editor .editor-image--right { margin-left: auto; margin-right: 0; }
.lexical-editor .editor-image--center { margin-left: auto; margin-right: auto; }

.lexical-toolbar button:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none;
}

.lexical-toolbar button:focus-visible,
.lexical-toolbar select:focus-visible,
.toolbar-mobile-tab:focus-visible {
  outline: 3px solid #f0abfc;
  outline-offset: 2px;
}

/* ============================================
   ICONS — Clear visual symbols
   ============================================ */
.lexical-toolbar .icon-bold,
.lexical-toolbar .icon-italic,
.lexical-toolbar .icon-underline,
.lexical-toolbar .icon-strikethrough,
.lexical-toolbar .icon-link,
.lexical-toolbar .icon-quote,
.lexical-toolbar .icon-spoiler,
.lexical-toolbar .icon-image,
.lexical-toolbar .icon-table,
.lexical-toolbar .icon-bullet,
.lexical-toolbar .icon-numbered,
.lexical-toolbar .icon-list,
.lexical-toolbar .icon-list-numbered,
.lexical-toolbar .icon-checklist,
.lexical-toolbar .icon-horizontal,
.lexical-toolbar .icon-undo,
.lexical-toolbar .icon-redo,
.lexical-toolbar .icon-emoji,
.lexical-toolbar .icon-code,
.lexical-toolbar .icon-code-block,
.lexical-toolbar .icon-highlight,
.lexical-toolbar .icon-callout,
.lexical-toolbar .icon-pull-quote,
.lexical-toolbar .icon-scene,
.lexical-toolbar .icon-align-left,
.lexical-toolbar .icon-align-center,
.lexical-toolbar .icon-align-right,
.lexical-toolbar .icon-align-justify,
.lexical-toolbar .icon-clear-formatting {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  line-height: 1;
  min-width: 22px;
  min-height: 22px;
  font-style: normal;
  color: inherit;
}

/* ── Text Formatting ─────────────────────────── */
.lexical-toolbar .icon-bold {
  font-weight: 800;
  font-size: 16px;
}
.lexical-toolbar .icon-bold::before { content: "B"; }

.lexical-toolbar .icon-italic {
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
}
.lexical-toolbar .icon-italic::before { content: "I"; }

.lexical-toolbar .icon-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.lexical-toolbar .icon-underline::before { content: "U"; }

.lexical-toolbar .icon-strikethrough {
  text-decoration: line-through;
  font-weight: 600;
}
.lexical-toolbar .icon-strikethrough::before { content: "S"; }

/* ── Lists — HIGHLY VISIBLE WITH PURPLE ──────── */
.lexical-toolbar .icon-list {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #c084fc !important;
}
.lexical-toolbar .icon-list::before { content: "•••"; }
.lexical-toolbar .icon-bullet::before { content: "•••"; }

.lexical-toolbar .icon-list-numbered {
  font-size: 16px;
  font-weight: 800;
  color: #c084fc !important;
}
.lexical-toolbar .icon-list-numbered::before { content: "1."; }
.lexical-toolbar .icon-numbered::before { content: "1."; }

.lexical-toolbar .icon-checklist {
  font-size: 16px;
  font-weight: 700;
  color: #c084fc !important;
}
.lexical-toolbar .icon-checklist::before { content: "☑"; }

/* ── Alignment ────────────────────────────────── */
.lexical-toolbar .icon-align-left {
  font-size: 16px;
  font-weight: 700;
}
.lexical-toolbar .icon-align-left::before { content: "⫷"; }

.lexical-toolbar .icon-align-center {
  font-size: 16px;
  font-weight: 700;
}
.lexical-toolbar .icon-align-center::before { content: "⫷⫸"; }

.lexical-toolbar .icon-align-right {
  font-size: 16px;
  font-weight: 700;
}
.lexical-toolbar .icon-align-right::before { content: "⫸"; }

.lexical-toolbar .icon-align-justify {
  font-size: 16px;
  font-weight: 700;
}
.lexical-toolbar .icon-align-justify::before { content: "≡"; }

/* ── Insert ───────────────────────────────────── */
.lexical-toolbar .icon-link::before { content: "🔗"; }
.lexical-toolbar .icon-quote::before { content: "❝"; font-size: 18px; }
.lexical-toolbar .icon-spoiler::before { content: "⚠"; }
.lexical-toolbar .icon-image::before { content: "🖼"; }
.lexical-toolbar .icon-table::before { content: "⊞"; font-size: 18px; font-weight: 700; }
.lexical-toolbar .icon-horizontal::before,
.lexical-toolbar .icon-scene::before { content: "—"; font-weight: 700; }
.lexical-toolbar .icon-callout::before { content: "💡"; }
.lexical-toolbar .icon-pull-quote::before { content: "❝"; font-size: 18px; }

/* ── History ──────────────────────────────────── */
.lexical-toolbar .icon-undo::before { content: "↩"; font-size: 16px; }
.lexical-toolbar .icon-redo::before { content: "↪"; font-size: 16px; }

/* ── More ─────────────────────────────────────── */
.lexical-toolbar .icon-emoji::before { content: "😊"; }
.lexical-toolbar .icon-code::before { content: "</>"; font-size: 12px; font-weight: 800; letter-spacing: -1px; }
.lexical-toolbar .icon-code-block::before { content: "{ }"; font-size: 12px; font-weight: 800; }
.lexical-toolbar .icon-highlight::before { content: "▰"; color: #facc15; font-size: 15px; }
.lexical-toolbar .icon-clear-formatting::before { content: "✕"; font-size: 14px; font-weight: 700; }

/* ============================================
   TOOLBAR DIVIDER — Refined
   ============================================ */
.lexical-toolbar .toolbar-divider {
  display: none;
}

.lexical-editor .text-size-small,
.post-body .text-size-small,
.discussion-post-body .text-size-small { font-size: .875em; }
.lexical-editor .text-size-large,
.post-body .text-size-large,
.discussion-post-body .text-size-large { font-size: 1.2em; }
.lexical-editor .text-size-xlarge,
.post-body .text-size-xlarge,
.discussion-post-body .text-size-xlarge { font-size: 1.45em; }

@media (max-width: 680px) {
  .lexical-toolbar { padding: 8px; }
  .lexical-toolbar .toolbar-group-label { padding:0 4px;font-size:9px; }
  .lexical-toolbar select { max-width: 104px; }
}

/* ============================================
   TOOLBAR DROPDOWN (More menu)
   ============================================ */
.lexical-toolbar .toolbar-more {
  position: relative;
  margin-left: auto;
}

/* The full studio toolbar is a compact command deck, not a horizontal rail. */
.lexical-toolbar.lexical-toolbar--publishing {
  position: relative;
  top: auto;
  flex-wrap: wrap;
  align-content: center;
  gap: 6px;
  overflow: visible;
  padding: 8px;
}

.lexical-toolbar.lexical-toolbar--publishing .toolbar-group {
  min-height: 36px;
  padding: 2px;
}

.lexical-toolbar.lexical-toolbar--publishing .toolbar-group-label {
  padding: 0 5px;
  font-size: 9px;
}

.lexical-toolbar.lexical-toolbar--publishing button {
  min-width: 32px;
  min-height: 32px;
  padding: 6px 8px;
}

.lexical-toolbar.lexical-toolbar--publishing select {
  min-height: 32px;
  max-width: 104px;
}

/* Release the toolbar's horizontal clipping while its menu is open. */
.lexical-toolbar.has-open-menu {
  overflow: visible;
  z-index: 100;
}

.lexical-toolbar .toolbar-more-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--lexical-surface);
  border: 1px solid var(--lexical-border);
  border-radius: var(--lexical-radius);
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 101;
}

.lexical-toolbar .toolbar-more-dropdown.open {
  display: block;
}

.lexical-toolbar .toolbar-more-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  background: transparent;
  color: var(--lexical-text-secondary);
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.lexical-toolbar .toolbar-more-dropdown button:hover {
  background: var(--lexical-purple-soft);
  color: var(--lexical-text);
}

/* ============================================
   HEADING SELECTOR — Refined
   ============================================ */
.lexical-toolbar select,
.lexical-toolbar .toolbar-heading-select {
  padding: 6px 24px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  color: #c0b0d0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-height: 34px;
  font-family: inherit;
  transition: all 0.18s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23c0b0d0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.lexical-toolbar select:hover,
.lexical-toolbar .toolbar-heading-select:hover {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.08);
  color: #d4b8f0;
}

.lexical-toolbar select:focus,
.lexical-toolbar .toolbar-heading-select:focus {
  border-color: #7C3AED;
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.lexical-toolbar select option,
.lexical-toolbar .toolbar-heading-select option {
  background: #1a1020;
  color: #f1f5f9;
}

/* ============================================
   EMOJI BUTTON — Subtle highlight
   ============================================ */
.lexical-toolbar button[data-command="emoji"] {
  background: rgba(124, 58, 237, 0.08);
  border-radius: 8px;
}

.lexical-toolbar button[data-command="emoji"]:hover {
  background: rgba(124, 58, 237, 0.20);
}

/* ============================================
   STATUS BAR
   ============================================ */
.lexical-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-top: 1px solid var(--lexical-border);
  font-size: 13px;
  color: var(--lexical-text-muted);
  background: rgba(26, 16, 32, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 0 0 var(--lexical-radius) var(--lexical-radius);
}

.lexical-status .status-saved {
  color: #c58d72;
}

.lexical-status .status-saving {
  color: #d1ad70;
}

.lexical-status .status-offline {
  color: #d97878;
}

.lexical-status .status-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lexical-status .status-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #6c6078;
}

.lexical-status .word-count,
.lexical-status .reading-time {
  color: #a68fb8;
  font-weight: 500;
}

/* ============================================
   COMPACT COMPOSER
   ============================================ */
.lexical-compact .editor-input {
  min-height: 60px;
  padding: 12px 16px;
  font-size: 15px;
}

.lexical-compact .lexical-toolbar {
  padding: 6px 10px;
}

.lexical-compact .lexical-toolbar button {
  padding: 3px 6px;
  min-height: 28px;
  min-width: 28px;
  font-size: 12px;
}

/* ============================================
   PUBLISHING COMPOSER
   ============================================ */
.lexical-publishing .editor-input {
  min-height: 500px;
  padding: 40px 48px;
  font-size: 18px;
  line-height: 1.85;
  color: #f1f5f9;
  letter-spacing: 0.01em;
}

.lexical-publishing .editor-input h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 1rem;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.lexical-publishing .editor-input h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

.lexical-publishing .editor-input h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 2rem 0 0.75rem;
  color: #f1f5f9;
}

.lexical-publishing .editor-input h4 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a68fb8;
}

.lexical-publishing .editor-input p {
  margin: 0 0 1.25rem;
  color: #a68fb8;
  line-height: 1.85;
}

.lexical-publishing .editor-input blockquote {
  border-left: 4px solid #7C3AED;
  padding: 1rem 1.5rem;
  margin: 1.75rem 0;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 1.1rem;
  color: #f1f5f9;
}

.lexical-publishing .editor-input .pull-quote {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 300;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  text-align: center;
  color: #f1f5f9;
  line-height: 1.4;
  border-top: 2px solid #7C3AED;
  border-bottom: 2px solid #7C3AED;
}

.lexical-publishing .editor-input .callout {
  padding: 1.25rem 1.5rem;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 14px;
  margin: 1.75rem 0;
  border-left: 4px solid #7C3AED;
  color: #a68fb8;
}

.lexical-publishing .editor-input .scene-divider {
  text-align: center;
  padding: 1.5rem 0;
  color: #6c6078;
  font-size: 1.5rem;
  letter-spacing: 0.5rem;
  opacity: 0.4;
  user-select: none;
}

.lexical-publishing .editor-input code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.9em;
  color: #c084fc;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lexical-publishing .editor-input pre {
  background: #0d0a12;
  color: #E5E7EB;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lexical-publishing .editor-input img {
  max-width: 100%;
  border-radius: 14px;
  margin: 1.75rem 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

/* ============================================
   IMAGES
   ============================================ */
.lexical-editor .editor-image {
  margin: 16px 0;
  border-radius: var(--lexical-radius);
  overflow: hidden;
  position: relative;
}

.lexical-editor .editor-image img {
  width: 100%;
  height: auto;
  display: block;
}

.lexical-editor .editor-image .image-caption {
  display: block;
  min-height: 2.4rem;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--lexical-text-secondary);
  text-align: center;
  background: rgba(0, 0, 0, 0.02);
}

.lexical-editor .editor-image .image-caption:empty::before {
  content: attr(data-placeholder);
  color: var(--lexical-text-muted);
}

/* ============================================
   TABLES
   ============================================ */
.lexical-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

.lexical-editor table th,
.lexical-editor table td {
  border: 1px solid var(--lexical-border);
  padding: 8px 12px;
  text-align: left;
}

.lexical-editor table th {
  background: var(--lexical-purple-soft);
  font-weight: 600;
  color: var(--lexical-text);
}

.lexical-editor table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================
   LISTS
   ============================================ */
.lexical-editor ul,
.lexical-editor ol {
  padding-left: 24px;
  margin: 8px 0;
}

.lexical-editor ul {
  list-style-type: disc;
}

.lexical-editor ol {
  list-style-type: decimal;
}

.lexical-editor .checklist {
  list-style: none;
  padding-left: 0;
}

.lexical-editor .checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
}

.lexical-editor .checklist li::before {
  content: "☐";
  font-size: 18px;
  flex-shrink: 0;
}

.lexical-editor .checklist li.checked::before {
  content: "☑";
  color: var(--lexical-purple);
}

/* ============================================
   SPOILER
   ============================================ */
.lexical-editor .spoiler {
  background: #1A1A1A;
  color: #1A1A1A;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lexical-editor .spoiler:hover,
.lexical-editor .spoiler:focus {
  color: white;
}

/* ============================================
   CODE
   ============================================ */
.lexical-editor code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.9em;
  color: var(--lexical-text-secondary);
}

.lexical-editor pre {
  background: #0d0a12;
  color: #E5E7EB;
  padding: 16px 20px;
  border-radius: var(--lexical-radius);
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--lexical-border);
}

.lexical-editor pre code {
  background: transparent;
  padding: 0;
  color: #E5E7EB;
}

/* ============================================
   SLASH COMMAND MENU — Notion-style palette
   ============================================ */
.lexical-slash-menu {
  position: absolute;
  background: #1e1428;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 8px;
  min-width: 280px;
  max-height: 340px;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  z-index: 30;
  backdrop-filter: blur(12px);
}

.lexical-slash-menu .slash-search {
  padding: 8px 10px;
  margin: -8px -8px 8px -8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: -8px;
  background: #1e1428;
  border-radius: 14px 14px 0 0;
}

.lexical-slash-menu .slash-search-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.lexical-slash-menu .slash-search-input:focus {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.1);
}

.lexical-slash-menu .slash-search-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.lexical-slash-menu .slash-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.25);
  padding: 8px 12px 4px;
}

.lexical-slash-menu .slash-item {
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c0b0d0;
  transition: all 0.12s ease;
  font-size: 13px;
}

.lexical-slash-menu .slash-item:hover,
.lexical-slash-menu .slash-item.selected {
  background: rgba(168, 85, 247, 0.2);
  color: #f1f5f9;
}

.lexical-slash-menu .slash-item .slash-icon {
  font-size: 18px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  flex-shrink: 0;
}

.lexical-slash-menu .slash-item:hover .slash-icon,
.lexical-slash-menu .slash-item.selected .slash-icon {
  background: rgba(168, 85, 247, 0.25);
}

.lexical-slash-menu .slash-item .slash-label {
  font-weight: 500;
  color: #f1f5f9;
}

.lexical-slash-menu .slash-item .slash-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-left: auto;
}

/* ============================================
   EMOJI PICKER
   ============================================ */
.emoji-picker {
  position: fixed !important;
  background: var(--lexical-surface, #1a1020) !important;
  border: 1px solid var(--lexical-border, rgba(255,255,255,0.06)) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: repeat(8, 1fr) !important;
  gap: 4px !important;
  z-index: 1000 !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
  max-width: 360px !important;
  max-height: 300px !important;
  overflow-y: auto !important;
  min-width: 280px !important;
}

.emoji-picker::-webkit-scrollbar {
  width: 4px;
}

.emoji-picker::-webkit-scrollbar-track {
  background: transparent;
}

.emoji-picker::-webkit-scrollbar-thumb {
  background: var(--lexical-border, rgba(255,255,255,0.1));
  border-radius: 2px;
}

.emoji-picker button {
  background: transparent !important;
  border: none !important;
  font-size: 22px !important;
  padding: 6px !important;
  cursor: pointer !important;
  border-radius: 8px !important;
  transition: background 0.15s !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.emoji-picker button:hover {
  background: var(--lexical-purple-soft, rgba(124,58,237,0.15)) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .lexical-toolbar,
  #lexical-editor-body .lexical-toolbar {
    display: block !important;
    padding: 8px !important;
    overflow: visible !important;
  }

  .lexical-toolbar .toolbar-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-bottom: 8px;
  }

  .lexical-toolbar .toolbar-mobile-tab,
  #lexical-editor-body .lexical-toolbar .toolbar-mobile-tab {
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 8px 6px !important;
    border: 1px solid var(--lexical-border) !important;
    color: var(--lexical-text-muted) !important;
    background: rgba(255, 255, 255, 0.025) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
  }

  .lexical-toolbar .toolbar-mobile-tab[aria-selected="true"],
  #lexical-editor-body .lexical-toolbar .toolbar-mobile-tab[aria-selected="true"] {
    border-color: rgba(192, 132, 252, 0.65) !important;
    color: #f3e8ff !important;
    background: rgba(168, 85, 247, 0.2) !important;
  }

  .lexical-toolbar .toolbar-group,
  #lexical-editor-body .lexical-toolbar .toolbar-group {
    display: flex !important;
    width: 100%;
    min-width: 0;
    padding: 8px !important;
    gap: 6px;
    flex-wrap: wrap;
    overflow: visible;
  }

  .lexical-toolbar .toolbar-group[hidden],
  #lexical-editor-body .lexical-toolbar .toolbar-group[hidden] {
    display: none !important;
  }

  .lexical-toolbar .toolbar-group-label,
  .lexical-toolbar > .toolbar-divider {
    display: none;
  }

  .lexical-toolbar .toolbar-group button,
  #lexical-editor-body .lexical-toolbar .toolbar-group button {
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 9px !important;
    font-size: 14px !important;
  }

  .lexical-toolbar .toolbar-group select,
  #lexical-editor-body .lexical-toolbar .toolbar-group select {
    min-height: 44px !important;
    flex: 1 1 132px;
    max-width: none !important;
    font-size: 14px !important;
  }

  .lexical-editor .editor-input {
    padding: 14px 16px;
    font-size: 16px;
  }

  .lexical-publishing .editor-input {
    padding: 20px;
    font-size: 17px;
  }

  .lexical-publishing .editor-input h1 {
    font-size: 28px;
  }

  .lexical-publishing .editor-input h2 {
    font-size: 22px;
  }

  .lexical-toolbar .desktop-only {
    display: none;
  }

  .lexical-status {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
    padding: 6px 12px;
  }

  .lexical-status .status-right {
    gap: 8px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .lexical-editor .editor-input {
    padding: 12px;
    font-size: 15px;
  }

  .lexical-publishing .editor-input {
    padding: 16px;
    font-size: 16px;
  }

  .lexical-publishing .editor-input h1 {
    font-size: 24px;
  }

  .lexical-publishing .editor-input h2 {
    font-size: 20px;
  }

  .lexical-status .status-right {
    gap: 4px;
    font-size: 10px;
  }

  .emoji-picker {
    grid-template-columns: repeat(6, 1fr) !important;
    max-width: 280px !important;
    min-width: 240px !important;
    max-height: 250px !important;
  }
  .emoji-picker button {
    font-size: 18px !important;
    padding: 4px !important;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes pulse-save {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.lexical-status .saving {
  animation: pulse-save 1.5s ease-in-out infinite;
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
.lexical-editor .editor-input::-webkit-scrollbar {
  width: 6px;
}

.lexical-editor .editor-input::-webkit-scrollbar-track {
  background: transparent;
}

.lexical-editor .editor-input::-webkit-scrollbar-thumb {
  background: var(--lexical-border);
  border-radius: 3px;
}

.lexical-editor .editor-input::-webkit-scrollbar-thumb:hover {
  background: var(--lexical-border-hover);
}

/* ============================================
   LIGHT MODE SUPPORT
   ============================================ */
:root.site-light .lexical-editor {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

:root.site-light .lexical-toolbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

:root.site-light .lexical-toolbar button {
  background: rgba(0, 0, 0, 0.03);
  color: #6b5a7a;
}

:root.site-light .lexical-toolbar button:hover {
  background: rgba(124, 58, 237, 0.12);
  color: #5b21b6;
}

:root.site-light .lexical-toolbar button.active {
  background: rgba(124, 58, 237, 0.18);
  color: #7c3aed;
  box-shadow: 0 0 0 1.5px rgba(124, 58, 237, 0.4);
}

/* List icons — dark purple for light mode */
:root.site-light .lexical-toolbar .icon-list,
:root.site-light .lexical-toolbar .icon-list-numbered,
:root.site-light .lexical-toolbar .icon-checklist {
  color: #7c3aed !important;
}

:root.site-light .lexical-toolbar .toolbar-divider {
  background: rgba(0, 0, 0, 0.1);
}

:root.site-light .lexical-toolbar select,
:root.site-light .lexical-toolbar .toolbar-heading-select {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.1);
  color: #6b5a7a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b5a7a'/%3E%3C/svg%3E");
}

:root.site-light .lexical-toolbar select:hover,
:root.site-light .lexical-toolbar .toolbar-heading-select:hover {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.06);
  color: #5b21b6;
}

:root.site-light .lexical-toolbar select option,
:root.site-light .lexical-toolbar .toolbar-heading-select option {
  background: #ffffff;
  color: #1a1020;
}

:root.site-light .lexical-editor .editor-input {
  color: #1a1020;
}

:root.site-light .lexical-status {
  background: rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: #8a7c9a;
}

:root.site-light .lexical-status .word-count,
:root.site-light .lexical-status .reading-time {
  color: #5c4a6e;
}

:root.site-light .lexical-slash-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

:root.site-light .lexical-slash-menu .slash-search {
  background: #ffffff;
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

:root.site-light .lexical-slash-menu .slash-search-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1a1020;
}

:root.site-light .lexical-slash-menu .slash-item {
  color: #6b5a7a;
}

:root.site-light .lexical-slash-menu .slash-item:hover,
:root.site-light .lexical-slash-menu .slash-item.selected {
  background: rgba(124, 58, 237, 0.1);
  color: #1a1020;
}

:root.site-light .lexical-slash-menu .slash-item .slash-icon {
  background: rgba(0, 0, 0, 0.03);
}

:root.site-light .lexical-slash-menu .slash-section-label {
  color: rgba(0, 0, 0, 0.3);
}

:root.site-light .lexical-slash-menu .slash-item .slash-desc {
  color: rgba(0, 0, 0, 0.35);
}

:root.site-light .emoji-picker {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

:root.site-light .lexical-publishing .editor-input {
  color: #1a1020;
}

:root.site-light .lexical-publishing .editor-input h1,
:root.site-light .lexical-publishing .editor-input h2,
:root.site-light .lexical-publishing .editor-input h3 {
  color: #1a1020;
}

:root.site-light .lexical-publishing .editor-input h4 {
  color: #5c4a6e;
}

:root.site-light .lexical-publishing .editor-input p {
  color: #5c4a6e;
}

:root.site-light .lexical-publishing .editor-input blockquote {
  color: #1a1020;
  background: rgba(124, 58, 237, 0.06);
}

:root.site-light .lexical-publishing .editor-input .pull-quote {
  color: #1a1020;
  border-top-color: #7C3AED;
  border-bottom-color: #7C3AED;
}

:root.site-light .lexical-publishing .editor-input .callout {
  background: rgba(124, 58, 237, 0.06);
  color: #5c4a6e;
}

/* ================================================================
   SUBMIT PAGE OVERRIDES — Editorial Studio Canvas (FINAL)
   ================================================================ */
/* Retained only as migration history. `not all` removes this obsolete
   purple/white submit skin from the cascade; the editorial manuscript layer
   at the end of this file is the sole active publishing treatment. */
@media not all {

/* 1. The editor wrapper — transparent, no box */
#lexical-editor-body .lexical-editor {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 2. Toolbar — Centered pill above the canvas, sticky */
#lexical-editor-body .lexical-toolbar {
  background: var(--blog-surface) !important;
  border: 1px solid var(--blog-border) !important;
  border-radius: 12px !important;
  padding: 6px 12px !important;
  margin: 0 auto 20px auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  position: relative !important;
  top: auto !important;
  z-index: 40 !important;
}

#lexical-editor-body .lexical-toolbar button {
  background: rgba(255, 255, 255, 0.04) !important;
  border-radius: 7px !important;
  color: #c0b0d0 !important;
  padding: 7px 10px !important;
  min-height: 34px !important;
  min-width: 34px !important;
  transition: all 0.18s ease !important;
  border: none !important;
  font-weight: 500 !important;
}

#lexical-editor-body .lexical-toolbar button:hover {
  background: rgba(168, 85, 247, 0.2) !important;
  color: #d4b8f0 !important;
  transform: translateY(-1px) !important;
}

#lexical-editor-body .lexical-toolbar button.active {
  background: rgba(168, 85, 247, 0.28) !important;
  color: #c084fc !important;
  box-shadow: 0 0 0 1.5px rgba(168, 85, 247, 0.5) !important;
}

/* List buttons — keep purple highlight */
#lexical-editor-body .lexical-toolbar .icon-list,
#lexical-editor-body .lexical-toolbar .icon-list-numbered,
#lexical-editor-body .lexical-toolbar .icon-checklist {
  color: #c084fc !important;
}

/* Light mode overrides for submit page */
:root.site-light #lexical-editor-body .lexical-toolbar button {
  background: rgba(0, 0, 0, 0.03) !important;
  color: #6b5a7a !important;
}

:root.site-light #lexical-editor-body .lexical-toolbar button:hover {
  background: rgba(124, 58, 237, 0.12) !important;
  color: #5b21b6 !important;
}

:root.site-light #lexical-editor-body .lexical-toolbar button.active {
  background: rgba(124, 58, 237, 0.18) !important;
  color: #7c3aed !important;
  box-shadow: 0 0 0 1.5px rgba(124, 58, 237, 0.4) !important;
}

:root.site-light #lexical-editor-body .lexical-toolbar .icon-list,
:root.site-light #lexical-editor-body .lexical-toolbar .icon-list-numbered,
:root.site-light #lexical-editor-body .lexical-toolbar .icon-checklist {
  color: #7c3aed !important;
}

#lexical-editor-body .lexical-toolbar select {
  background: transparent !important;
  border: 1px solid var(--blog-border) !important;
  color: var(--blog-text-secondary) !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
  min-height: 32px !important;
}

#lexical-editor-body .lexical-toolbar .toolbar-divider {
  height: 20px !important;
  margin: 0 6px !important;
  background: var(--blog-border) !important;
}

/* 3. Editor Canvas — Premium paper-like surface */
#lexical-editor-body .editor-input {
  background: var(--blog-surface) !important;
  border: 1px solid var(--blog-border) !important;
  border-radius: 16px !important;
  padding: 48px 56px !important;
  min-height: 650px !important;
  width: min(100%, 820px) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  white-space: pre-wrap !important;
  margin: 0 auto !important;

  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.02),
    0 8px 32px rgba(0,0,0,0.3) !important;

  color: var(--blog-text) !important;
  font-size: 1.1rem !important;
  line-height: 1.85 !important;
  font-family: var(--blog-font-body) !important;
}

#lexical-editor-body .editor-input:focus {
  outline: none !important;
  border-color: var(--blog-primary) !important;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.02),
    0 8px 32px rgba(0,0,0,0.3),
    0 0 0 3px var(--blog-primary-glow) !important;
}

#lexical-editor-body .editor-input::before {
  color: var(--blog-text-muted) !important;
  opacity: 0.3 !important;
  font-size: 1.1rem !important;
}

/* 4. Editorial Typography inside the canvas */
#lexical-editor-body .editor-input h1 {
  font-family: var(--blog-font-display) !important;
  font-size: 2.4rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  margin: 0 0 1.5rem !important;
  color: var(--blog-text) !important;
  letter-spacing: -0.02em !important;
}

#lexical-editor-body .editor-input h2 {
  font-family: var(--blog-font-display) !important;
  font-size: 1.7rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: var(--blog-text) !important;
  margin: 2.5rem 0 1rem !important;
  padding-bottom: 0.4rem !important;
  border-bottom: 1px solid var(--blog-border) !important;
}

#lexical-editor-body .editor-input h3 {
  font-family: var(--blog-font-display) !important;
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  color: var(--blog-text) !important;
  margin: 2rem 0 0.75rem !important;
}

#lexical-editor-body .editor-input h4 {
  font-family: var(--blog-font-body) !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: var(--blog-text-secondary) !important;
  margin: 1.5rem 0 0.5rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

#lexical-editor-body .editor-input p {
  font-size: 1.05rem !important;
  line-height: 1.85 !important;
  color: var(--blog-text-secondary) !important;
  margin: 0 0 1.25rem !important;
}

#lexical-editor-body .editor-input blockquote {
  border-left: 4px solid var(--blog-primary) !important;
  padding: 0.5rem 0 0.5rem 1.5rem !important;
  margin: 1.75rem 0 !important;
  font-style: italic !important;
  font-size: 1.1rem !important;
  color: var(--blog-text) !important;
}

#lexical-editor-body .editor-input code {
  background: rgba(255, 255, 255, 0.06) !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-family: 'SF Mono', 'Fira Code', monospace !important;
  font-size: 0.9em !important;
  color: #c084fc !important;
}

#lexical-editor-body .editor-input pre {
  background: #0d0a12 !important;
  padding: 1.25rem 1.5rem !important;
  border-radius: 14px !important;
  overflow-x: auto !important;
  margin: 1.75rem 0 !important;
  border: 1px solid var(--blog-border) !important;
}

/* 5. Hide the status bar */
#lexical-editor-body .lexical-status {
  display: none !important;
}

/* 6. Light mode overrides */
:root.site-light #lexical-editor-body .editor-input {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,1),
    0 8px 24px rgba(0, 0, 0, 0.06) !important;
}

:root.site-light #lexical-editor-body .lexical-toolbar {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

:root.site-light .submit-actions {
  background: rgba(250, 248, 246, 0.95);
  border-color: var(--blog-border);
  box-shadow: 0 4px 20px rgba(140, 90, 80, 0.06);
}

/* 7. Mobile */
@media (max-width: 1024px) {
  #lexical-editor-body .editor-input {
    padding: 24px !important;
    min-height: 400px !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  #lexical-editor-body .lexical-toolbar {
    position: relative !important;
    top: auto !important;
    padding: 6px 8px !important;
    width: 100% !important;
    border-radius: 12px !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    flex-wrap: wrap !important;
  }
}
}

/* ================================================================
   DISCUSSION COMPOSER — compact, wrapping and contained
   The Blog studio and Forum composer share a mount id, so discussion
   profile rules explicitly restore the compact forum presentation.
   ================================================================ */
#lexical-editor-body[data-profile="discussion"] {
  width: 100%;
  min-width: 0;
}

#lexical-editor-body[data-profile="discussion"] .lexical-editor {
  overflow: hidden !important;
  border: 1px solid var(--forum-border, var(--lexical-border)) !important;
  border-top: 0 !important;
  border-radius: 0 0 12px 12px !important;
  background: rgba(7, 4, 10, .2) !important;
  box-shadow: none !important;
}

#lexical-editor-body[data-profile="discussion"] .lexical-toolbar {
  position: static !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 8px !important;
  gap: 6px !important;
  overflow: visible !important;
  border: 1px solid var(--forum-border, var(--lexical-border)) !important;
  border-radius: 12px 12px 0 0 !important;
  background: rgba(255, 255, 255, .018) !important;
  box-shadow: none !important;
}

#lexical-editor-body[data-profile="discussion"] .toolbar-group {
  min-height: 36px;
  padding: 2px;
  gap: 1px;
  flex: 0 1 auto;
  border-color: var(--forum-border, var(--lexical-border));
  background: rgba(255, 255, 255, .018);
}

#lexical-editor-body[data-profile="discussion"] .toolbar-group-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#lexical-editor-body[data-profile="discussion"] .lexical-toolbar button {
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 5px 8px !important;
  color: var(--forum-text-secondary, #c0b0d0) !important;
  background: transparent !important;
}

#lexical-editor-body[data-profile="discussion"] .lexical-toolbar button:hover {
  color: var(--forum-text, #f1f5f9) !important;
  background: var(--forum-primary-glow, rgba(168, 85, 247, .14)) !important;
  transform: none !important;
}

#lexical-editor-body[data-profile="discussion"] .editor-input {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 220px !important;
  margin: 0 !important;
  padding: 22px 24px !important;
  overflow-x: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--forum-text, var(--lexical-text)) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: var(--forum-font-body, inherit) !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
}

#lexical-editor-body[data-profile="discussion"] .editor-input:focus {
  outline: none !important;
  box-shadow: inset 3px 0 0 var(--forum-primary, var(--lexical-purple)) !important;
}

#lexical-editor-body[data-profile="discussion"] .lexical-status {
  display: flex !important;
  padding: 8px 12px;
  border-radius: 0;
  background: rgba(255, 255, 255, .015);
  font-size: 11px;
}

:root.site-light #lexical-editor-body[data-profile="discussion"] .lexical-editor,
:root.site-light #lexical-editor-body[data-profile="discussion"] .lexical-toolbar,
:root.site-light #lexical-editor-body[data-profile="discussion"] .lexical-status {
  background: var(--forum-surface, #fff) !important;
}

:root.site-light #lexical-editor-body[data-profile="discussion"] .editor-input {
  color: var(--forum-text, #211827) !important;
  background: var(--forum-surface, #fff) !important;
}

@media (max-width: 600px) {
  #lexical-editor-body[data-profile="discussion"] .lexical-toolbar { gap: 4px !important; }
  #lexical-editor-body[data-profile="discussion"] .toolbar-group { border: 0; padding: 0; }
  #lexical-editor-body[data-profile="discussion"] .editor-input { min-height: 190px !important; padding: 18px !important; }
}

/* Persisted rich-text elements; these classes are also used on rendered posts. */
.lexical-editor mark,
.post-body mark,
.conversation-op-body mark,
.conversation-reply-body mark {
  padding: 0 0.15em;
  color: inherit;
  background: rgba(250, 204, 21, 0.35);
}

.editor-callout {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid #c084fc;
  background: rgba(192, 132, 252, 0.08);
}

.editor-pull-quote {
  margin: 1.25rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid #e94560;
  font-size: 1.15em;
}

.editor-spoiler {
  margin: 0.75rem 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.editor-spoiler summary { cursor: pointer; font-weight: 600; }

.lexical-editor pre,
.post-body pre,
.conversation-op-body pre,
.conversation-reply-body pre {
  overflow-x: auto;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  white-space: pre-wrap;
}

.lexical-editor table,
.post-body table,
.conversation-op-body table,
.conversation-reply-body table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}

.lexical-editor th, .lexical-editor td,
.post-body th, .post-body td,
.conversation-op-body th, .conversation-op-body td,
.conversation-reply-body th, .conversation-reply-body td {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.text-align-left { text-align: left; }
.text-align-center { text-align: center; }
.text-align-right { text-align: right; }
.text-align-justify { text-align: justify; }
.lexical-source-field {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/*
 * Publishing toolbar contract: the studio markup owns this profile before
 * JavaScript runs, so this remains reliable with cached editor scripts and at
 * every breakpoint. Commands flow onto another row; they never create a
 * sideways toolbar rail.
 */
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-content: center !important;
  overflow: visible !important;
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
}

#lexical-editor-body[data-profile="publishing"] .toolbar-group {
  flex: 0 1 auto;
}

/* Publishing uses a quiet command strip instead of a row of nested boxes. */
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar {
  gap: 4px !important;
  padding: 7px 8px !important;
}

#lexical-editor-body[data-profile="publishing"] .toolbar-group {
  min-height: 34px;
  gap: 2px;
  padding: 0 5px 0 0;
  border: 0;
  border-right: 1px solid var(--lexical-border);
  border-radius: 0;
  background: transparent;
}

#lexical-editor-body[data-profile="publishing"] .toolbar-group:last-child { border-right: 0; }
#lexical-editor-body[data-profile="publishing"] .toolbar-group-label { display: none; }
#lexical-editor-body[data-profile="publishing"] .toolbar-more { margin-left: 0; }
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar button {
  min-width: 34px;
  min-height: 34px;
  padding: 6px 8px;
}

@media (max-width: 768px) {
  .lexical-toolbar,
  #lexical-editor-body[data-profile="publishing"] .lexical-toolbar {
    flex-wrap: wrap !important;
    overflow: visible !important;
    scrollbar-width: none;
  }
  .lexical-toolbar .toolbar-group { flex: 0 1 auto; min-width: 0; }
  .lexical-toolbar .toolbar-group-label { display: none; }
  .lexical-toolbar .toolbar-more { margin-left: 0; }
  .lexical-toolbar button { min-width: 36px; min-height: 36px; }
  .lexical-toolbar .toolbar-more-dropdown {
    position: fixed;
    inset: auto 12px calc(68px + env(safe-area-inset-bottom)) 12px;
    width: auto;
    max-height: min(360px, 55dvh);
    overflow-y: auto;
  }
  .lexical-slash-menu { width: min(320px, calc(100vw - 32px)); min-width: 0; }
}

/* Publishing surface: restrained controls, readable measure, contextual tools. */
#lexical-editor-body[data-profile="publishing"] .lexical-editor {
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 14px;
  background: color-mix(in srgb, var(--lexical-bg, #11131d) 74%, transparent);
}

#lexical-editor-body[data-profile="publishing"] .lexical-toolbar {
  position: sticky !important;
  z-index: 12;
  top: 0 !important;
  justify-content: center;
  border-bottom: 1px solid rgba(148, 163, 184, .13);
  background: color-mix(in srgb, var(--lexical-bg, #11131d) 94%, transparent);
  backdrop-filter: blur(14px);
}

#lexical-editor-body[data-profile="publishing"] .editor-input {
  box-sizing: border-box;
  width: min(100%, 75ch);
  min-height: 320px !important;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 74px) clamp(22px, 6vw, 72px) 100px !important;
  color: var(--lexical-text, #ece9e5);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(17px, 1.55vw, 19px) !important;
  line-height: 1.78 !important;
}

.toolbar-dropdown { position: relative; display: flex; align-items: center; }
#lexical-editor-body .toolbar-dropdown-toggle { width: auto; padding-inline: 11px; font-size: .75rem; font-weight: 680; }
.toolbar-dropdown-toggle::after { margin-left: 6px; content: '⌄'; color: var(--lexical-text-muted); }
.toolbar-dropdown-menu { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; display: none; width: 220px; padding: 6px; border: 1px solid var(--lexical-border); border-radius: 10px; background: var(--lexical-toolbar-bg, #171a25); box-shadow: 0 18px 50px rgba(0,0,0,.42); }
.toolbar-dropdown-menu.open { display: grid; }
#lexical-editor-body .toolbar-dropdown-menu button { display: grid; grid-template-columns: 28px 1fr; gap: 7px; align-items: center; width: 100%; min-height: 38px; padding: 7px 9px; text-align: left; }

.lexical-selection-toolbar {
  position: fixed;
  z-index: 180;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 9px;
  background: #1b1e2b;
  box-shadow: 0 12px 36px rgba(0,0,0,.42);
  transform: translate(-50%, -100%);
}
.lexical-selection-toolbar[hidden] { display: none; }
.lexical-selection-toolbar button { width: 34px; height: 34px; border: 0; border-radius: 6px; background: transparent; color: #f3f1ed; cursor: pointer; }
.lexical-selection-toolbar button:hover { background: rgba(167,139,250,.16); }
#lexical-editor-body[data-profile="publishing"] button:focus-visible,
#lexical-editor-body[data-profile="publishing"] select:focus-visible,
.lexical-selection-toolbar button:focus-visible { outline: 2px solid #c4a7ff; outline-offset: 2px; }

@media (max-width: 768px) {
  #lexical-editor-body[data-profile="publishing"] .lexical-toolbar { justify-content: flex-start; }
  #lexical-editor-body[data-profile="publishing"] .editor-input { width: 100%; min-height: 280px !important; padding: 30px 20px 72px !important; }
  .toolbar-dropdown-menu { position: fixed; inset: auto 12px 82px; width: auto; max-height: 55dvh; overflow-y: auto; }
}

/* Contextual authoring layers share one visual and stacking contract. */
:root {
  --lexical-popover-bg: #1b1e2b;
  --lexical-popover-border: rgba(148, 163, 184, .24);
  --lexical-popover-text: #f3f1ed;
  --lexical-popover-muted: #aaa2b4;
  --lexical-popover-hover: rgba(167, 139, 250, .16);
  --lexical-popover-active: rgba(167, 139, 250, .28);
  --lexical-popover-shadow: 0 18px 52px rgba(0, 0, 0, .48);
  --lexical-focus-ring: #c4a7ff;
  --lexical-danger: #fb7185;
  --lexical-layer-toolbar: 20;
  --lexical-layer-context: 70;
}

:root.site-light {
  --lexical-popover-bg: #fffdfb;
  --lexical-popover-border: rgba(76, 55, 89, .18);
  --lexical-popover-text: #241a2c;
  --lexical-popover-muted: #75677e;
  --lexical-popover-hover: rgba(124, 58, 237, .1);
  --lexical-popover-active: rgba(124, 58, 237, .16);
  --lexical-popover-shadow: 0 18px 52px rgba(48, 35, 56, .18);
  --lexical-focus-ring: #7c3aed;
}

#lexical-editor-body[data-profile="publishing"] .lexical-editor { overflow: visible; }
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar { z-index: var(--lexical-layer-toolbar) !important; }
.toolbar-dropdown-menu { z-index: var(--lexical-layer-context); }

.lexical-popover,
.lexical-selection-toolbar,
.lexical-slash-menu,
.emoji-picker {
  position: fixed;
  z-index: var(--lexical-layer-context) !important;
  box-sizing: border-box;
  color: var(--lexical-popover-text);
  border: 1px solid var(--lexical-popover-border);
  background: var(--lexical-popover-bg) !important;
  box-shadow: var(--lexical-popover-shadow);
}

.lexical-popover[hidden],
.lexical-selection-toolbar[hidden] { display: none !important; }

.lexical-selection-toolbar {
  top: auto;
  transform: translateX(-50%);
}

.lexical-selection-toolbar button.active,
.lexical-selection-toolbar button[aria-pressed="true"] {
  color: #d8b4fe;
  background: var(--lexical-popover-active);
}

.lexical-selection-toolbar [class^="icon-"] {
  display: inline-flex;
  min-width: 18px;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-style: normal;
}
.lexical-selection-toolbar .icon-bold::before { content: "B"; font-weight: 800; }
.lexical-selection-toolbar .icon-italic::before { content: "I"; font-style: italic; }
.lexical-selection-toolbar .icon-underline::before { content: "U"; text-decoration: underline; text-underline-offset: 3px; }
.lexical-selection-toolbar .icon-link::before { content: "↗"; }
.lexical-selection-toolbar .icon-quote::before { content: "❝"; font-size: 18px; }

.lexical-popover button,
.lexical-popover input,
.lexical-slash-menu button { font: inherit; }
.lexical-popover button:focus-visible,
.lexical-popover input:focus-visible,
.lexical-slash-menu button:focus-visible {
  outline: 2px solid var(--lexical-focus-ring);
  outline-offset: 2px;
}

.lexical-link-popover {
  width: min(360px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 12px;
}
.lexical-link-popover label {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  color: var(--lexical-popover-muted);
  font-size: 12px;
  font-weight: 700;
}
.lexical-link-popover input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  color: var(--lexical-popover-text);
  border: 1px solid var(--lexical-popover-border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--lexical-popover-bg) 90%, white 10%);
}
.lexical-popover-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.lexical-popover-actions button,
.table-toolbar-toggle,
.table-toolbar-menu button {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--lexical-popover-text);
  border: 1px solid var(--lexical-popover-border);
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}
.lexical-popover-actions button:hover,
.table-toolbar-toggle:hover,
.table-toolbar-menu button:hover { background: var(--lexical-popover-hover); }
.lexical-popover-actions .primary { background: var(--lexical-popover-active); }
.lexical-popover .danger { color: var(--lexical-danger); }
.lexical-popover-error { margin: 8px 0 0; color: var(--lexical-danger); font-size: 12px; }

.lexical-table-toolbar { padding: 5px; border-radius: 9px; }
.lexical-image-toolbar { display: flex; gap: 5px; padding: 5px; border-radius: 9px; }
.lexical-image-toolbar button { border: 0; border-radius: 6px; padding: 7px 9px; background: rgba(255,255,255,.07); color: inherit; cursor: pointer; }
.table-toolbar-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 225px;
  padding: 6px;
  border: 1px solid var(--lexical-popover-border);
  border-radius: 9px;
  background: var(--lexical-popover-bg);
  box-shadow: var(--lexical-popover-shadow);
}
.table-toolbar-menu[hidden] { display: none; }
.table-toolbar-menu button { width: 100%; border: 0; text-align: left; }
.lexical-editor table { display: block; max-width: 100%; overflow-x: auto; }
.lexical-editor table td,
.lexical-editor table th { min-width: 110px; }
.lexical-editor table.is-active-table { outline: 2px solid rgba(167, 139, 250, .42); outline-offset: 2px; }
.lexical-editor table .is-active-cell { box-shadow: inset 0 0 0 2px var(--lexical-focus-ring); }

.lexical-slash-menu { position: fixed; z-index: var(--lexical-layer-context); }
.lexical-slash-menu .slash-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

@media (max-width: 560px) {
  .lexical-selection-toolbar { max-width: calc(100vw - 24px); }
  .lexical-table-toolbar { max-width: calc(100vw - 24px); }
  .table-toolbar-menu { position: fixed; inset: auto 12px 72px; width: auto; max-height: 55dvh; overflow-y: auto; }
}

/* ========================================================================
   FLIRTLABZ EDITORIAL COMPOSER — AUTHORITATIVE PUBLISHING LAYER
   This intentionally wins over the retired purple "premium editor" rules
   above while the discussion composer retains its compact profile.
   ======================================================================== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:root {
  --lexical-purple: #bc3e69;
  --lexical-purple-light: #dc6f91;
  --lexical-purple-dark: #641d39;
  --lexical-purple-soft: rgba(188,62,105,.14);
  --lexical-surface: #170c13;
  --lexical-surface-hover: #24111b;
  --lexical-surface-toolbar: rgba(18,9,15,.88);
  --lexical-text: #fff8ef;
  --lexical-text-secondary: #d8c7c9;
  --lexical-text-muted: #9f858d;
  --lexical-border: rgba(234,202,178,.15);
  --lexical-border-hover: rgba(234,202,178,.28);
  --lexical-popover-bg: #211018;
  --lexical-popover-border: rgba(234,202,178,.2);
  --lexical-popover-text: #fff8ef;
  --lexical-popover-muted: #bda8ae;
  --lexical-popover-hover: rgba(188,62,105,.12);
  --lexical-popover-active: rgba(188,62,105,.2);
  --lexical-popover-shadow: 0 26px 72px rgba(0,0,0,.5);
  --lexical-focus-ring: #dc6f91;
  --lexical-danger: #e5767c;
}

#lexical-editor-body[data-profile="publishing"] .lexical-editor {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}

#lexical-editor-body[data-profile="publishing"] .lexical-toolbar {
  position: sticky !important;
  z-index: var(--lexical-layer-toolbar) !important;
  top: 64px !important;
  display: flex !important;
  width: min(100%, 900px) !important;
  max-width: 100% !important;
  min-height: 58px !important;
  margin: 0 auto 18px !important;
  padding: 8px 12px !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 3px !important;
  overflow: visible !important;
  border: 1px solid rgba(234,202,178,.14) !important;
  border-radius: 22px 22px 10px 10px !important;
  background: rgba(22,11,18,.88) !important;
  box-shadow: inset 0 1px rgba(255,248,239,.025),0 18px 45px rgba(0,0,0,.18) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  backdrop-filter: blur(18px) !important;
}

#lexical-editor-body[data-profile="publishing"] .toolbar-group {
  display: flex !important;
  min-height: 36px !important;
  padding: 0 7px 0 0 !important;
  align-items: center !important;
  gap: 2px !important;
  border: 0 !important;
  border-right: 1px solid rgba(234,202,178,.13) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
#lexical-editor-body[data-profile="publishing"] .toolbar-group:last-child { padding-right:0 !important; border-right:0 !important; }
#lexical-editor-body[data-profile="publishing"] .toolbar-group--block { min-width:136px; }

#lexical-editor-body[data-profile="publishing"] .lexical-toolbar select {
  width: 132px !important;
  max-width: 132px !important;
  min-height: 36px !important;
  padding: 0 30px 0 11px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255,248,239,.055) !important;
  color: var(--lexical-text-secondary) !important;
  font: 600 .75rem 'Inter',system-ui,sans-serif !important;
  box-shadow: none !important;
}

#lexical-editor-body[data-profile="publishing"] .lexical-toolbar button {
  display: inline-flex !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 7px 9px !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--lexical-text-secondary) !important;
  font-weight: 650 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background .16s ease,color .16s ease,transform .16s ease !important;
}
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar button:hover {
  background: rgba(188,62,105,.12) !important;
  color: var(--lexical-text) !important;
  transform: translateY(-1px) !important;
}
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar button.active,
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar button[aria-pressed="true"] {
  background: rgba(188,62,105,.2) !important;
  color: #ef9bb2 !important;
  box-shadow: inset 0 0 0 1px rgba(220,111,145,.24) !important;
}
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar button:disabled { opacity:.34 !important; }
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar .icon-list,
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar .icon-list-numbered,
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar .icon-bullet,
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar .icon-numbered,
#lexical-editor-body[data-profile="publishing"] .lexical-toolbar .icon-checklist { color: var(--lexical-text-secondary) !important; }
#lexical-editor-body[data-profile="publishing"] .toolbar-dropdown-toggle { width:auto !important; padding-inline:12px !important; }

#lexical-editor-body[data-profile="publishing"] .toolbar-more-dropdown {
  top: calc(100% + 10px) !important;
  width: 272px !important;
  padding: 8px !important;
  border: 1px solid var(--lexical-popover-border) !important;
  border-radius: 18px !important;
  background: var(--lexical-popover-bg) !important;
  box-shadow: var(--lexical-popover-shadow) !important;
}
#lexical-editor-body[data-profile="publishing"] .toolbar-more-dropdown button {
  display: grid !important;
  grid-template-columns: 30px minmax(0,1fr) !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 7px 10px !important;
  gap: 9px !important;
  border-radius: 10px !important;
  text-align: left !important;
}
.command-menu-icon { display:inline-flex; width:28px; height:28px; align-items:center; justify-content:center; border-radius:50%; background:rgba(188,62,105,.1); color:#ef9bb2; }
.command-menu-icon::before { font-size:.78rem; }
.command-menu-icon.icon-image::before { content:'IMG'; font-size:.55rem; font-weight:800; }
.command-menu-icon.icon-table::before { content:'GRID'; font-size:.5rem; font-weight:800; }
.command-menu-icon.icon-scene-divider::before { content:'\2014'; }
.command-menu-icon.icon-emoji::before { content:'\2726'; }
#lexical-editor-body[data-profile="publishing"] .toolbar-more-dropdown strong,
#lexical-editor-body[data-profile="publishing"] .toolbar-more-dropdown small { display:block; min-width:0; }
#lexical-editor-body[data-profile="publishing"] .toolbar-more-dropdown strong { color:var(--lexical-popover-text); font-size:.78rem; font-weight:700; }
#lexical-editor-body[data-profile="publishing"] .toolbar-more-dropdown small { margin-top:4px; color:var(--lexical-popover-muted); font-size:.66rem; line-height:1.35; }

#lexical-editor-body[data-profile="publishing"] .lexical-editor-canvas {
  position:relative;
  width:min(100%,900px);
  margin:0 auto;
}
#lexical-editor-body[data-profile="publishing"] .editor-input {
  box-sizing:border-box !important;
  width:100% !important;
  max-width:none !important;
  min-height:680px !important;
  margin:0 !important;
  padding:clamp(44px,7vw,78px) clamp(28px,8vw,92px) 110px !important;
  overflow-wrap:anywhere !important;
  border:1px solid rgba(234,202,178,.14) !important;
  border-radius:2.25rem 2.25rem 6rem 2.25rem !important;
  outline:0 !important;
  background:
    radial-gradient(ellipse at 100% 100%,rgba(139,41,78,.16),transparent 38%),
    linear-gradient(150deg,rgba(255,248,239,.045),rgba(255,248,239,.016)) !important;
  color:var(--lexical-text-secondary) !important;
  font:400 clamp(17px,1.45vw,19px)/1.86 'Cormorant Garamond',Georgia,serif !important;
  letter-spacing:.005em !important;
  box-shadow:inset 0 1px rgba(255,248,239,.03),0 30px 80px rgba(0,0,0,.2) !important;
  transition:border-color .2s ease,box-shadow .2s ease !important;
}
#lexical-editor-body[data-profile="publishing"] .editor-input:focus {
  border-color:rgba(220,111,145,.36) !important;
  box-shadow:inset 0 1px rgba(255,248,239,.04),0 34px 85px rgba(0,0,0,.24),0 0 0 3px rgba(188,62,105,.08) !important;
}
#lexical-editor-body[data-profile="publishing"] .lexical-placeholder { display:block !important; position:absolute; z-index:1; top:clamp(44px,7vw,78px); left:clamp(28px,8vw,92px); color:var(--lexical-text-muted); font:italic 1.2rem 'Cormorant Garamond',Georgia,serif; pointer-events:none; opacity:.62; }
#lexical-editor-body[data-profile="publishing"] .editor-input:empty::before { content:none !important; }

#lexical-editor-body[data-profile="publishing"] .editor-input p { margin:0 0 1.35em !important; color:var(--lexical-text-secondary) !important; font:inherit !important; }
#lexical-editor-body[data-profile="publishing"] .editor-input h1,
#lexical-editor-body[data-profile="publishing"] .editor-input h2,
#lexical-editor-body[data-profile="publishing"] .editor-input h3,
#lexical-editor-body[data-profile="publishing"] .editor-input h4 { color:var(--lexical-text) !important; font-family:'Cormorant Garamond',Georgia,serif !important; font-weight:500 !important; letter-spacing:-.018em !important; }
#lexical-editor-body[data-profile="publishing"] .editor-input h1 { margin:0 0 .75em !important; font-size:2.55rem !important; line-height:1 !important; }
#lexical-editor-body[data-profile="publishing"] .editor-input h2 { margin:2.2em 0 .6em !important; padding:0 !important; border:0 !important; font-size:2rem !important; line-height:1.05 !important; }
#lexical-editor-body[data-profile="publishing"] .editor-input h2::after { content:''; display:block; width:70px; height:12px; margin-top:.45em; border-bottom:1px solid rgba(223,194,139,.38); border-radius:0 0 75% 45%; }
#lexical-editor-body[data-profile="publishing"] .editor-input h3 { margin:1.8em 0 .55em !important; font-size:1.55rem !important; line-height:1.1 !important; }
#lexical-editor-body[data-profile="publishing"] .editor-input h4 { margin:1.8em 0 .5em !important; color:var(--lexical-popover-muted) !important; font:700 .72rem/1.2 'Inter',system-ui,sans-serif !important; letter-spacing:.13em !important; text-transform:uppercase !important; }
#lexical-editor-body[data-profile="publishing"] .editor-input blockquote,
#lexical-editor-body[data-profile="publishing"] .editor-pull-quote { margin:2rem 0 !important; padding:.3rem 0 .3rem 1.5rem !important; border:0 !important; border-left:1px solid rgba(223,194,139,.55) !important; background:transparent !important; color:var(--lexical-text) !important; font-size:1.28em !important; font-style:italic !important; }
#lexical-editor-body[data-profile="publishing"] .editor-callout { margin:2rem 0; padding:1.25rem 1.4rem; border:1px solid rgba(223,194,139,.16); border-radius:1.5rem 1.5rem 3.5rem 1.5rem; background:rgba(139,41,78,.1); }
#lexical-editor-body[data-profile="publishing"] .editor-input code { padding:.12em .35em !important; border-radius:.35em !important; background:rgba(255,248,239,.07) !important; color:#ef9bb2 !important; font-family:'SFMono-Regular',Consolas,monospace !important; }
#lexical-editor-body[data-profile="publishing"] .editor-input pre { margin:2rem 0 !important; padding:1.4rem !important; border:1px solid var(--lexical-border) !important; border-radius:1rem !important; background:#0b0609 !important; color:#eadde0 !important; }
#lexical-editor-body[data-profile="publishing"] .editor-input hr { width:90px; margin:3rem auto; border:0; border-top:1px solid rgba(223,194,139,.48); }

#lexical-editor-body[data-profile="publishing"] .lexical-status {
  display:flex !important;
  width:min(100%,900px);
  margin:8px auto 0;
  padding:0 18px;
  justify-content:space-between;
  color:var(--lexical-text-muted);
  font:600 .66rem 'Inter',system-ui,sans-serif;
  letter-spacing:.04em;
}
#lexical-editor-body[data-profile="publishing"] .status-saving::before { content:''; display:inline-block; width:6px; height:6px; margin-right:7px; border-radius:50%; background:#dfc28b; }
#lexical-editor-body[data-profile="publishing"] .status-saved::before,
#lexical-editor-body[data-profile="publishing"] .status-recovered::before { content:''; display:inline-block; width:6px; height:6px; margin-right:7px; border-radius:50%; background:#c58d72; }

/* Authoring dialogs replace browser prompts for tables and media metadata. */
.lexical-editor-dialog { position:fixed; z-index:1000; inset:0; display:grid; place-items:center; padding:20px; }
.lexical-editor-dialog-backdrop { position:absolute; inset:0; width:100%; height:100%; border:0; background:rgba(6,3,5,.76); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); cursor:default; }
.lexical-editor-dialog-card { position:relative; z-index:1; width:min(520px,calc(100vw - 32px)); max-height:min(760px,calc(100dvh - 32px)); overflow:auto; border:1px solid var(--lexical-popover-border); border-radius:2rem 2rem 4.5rem 2rem; background:radial-gradient(circle at 100% 0,rgba(156,48,84,.14),transparent 38%),var(--lexical-popover-bg); box-shadow:var(--lexical-popover-shadow); }
.lexical-editor-dialog-head { display:flex; justify-content:space-between; gap:22px; padding:28px 28px 20px; border-bottom:1px solid var(--lexical-popover-border); }
.lexical-editor-dialog-head > div > span { color:#dfc28b; font:750 .62rem 'Inter',system-ui,sans-serif; letter-spacing:.16em; text-transform:uppercase; }
.lexical-editor-dialog-head h2 { margin:.35rem 0 .45rem; color:var(--lexical-popover-text); font:500 2rem/1 'Cormorant Garamond',Georgia,serif; }
.lexical-editor-dialog-head p { max-width:48ch; margin:0; color:var(--lexical-popover-muted); font-size:.8rem; line-height:1.55; }
.lexical-editor-dialog-close { flex:0 0 auto; width:38px; height:38px; border:1px solid var(--lexical-popover-border); border-radius:50%; background:transparent; color:var(--lexical-popover-muted); font-size:1.35rem; cursor:pointer; }
.lexical-editor-dialog-body { padding:24px 28px; }
.lexical-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.lexical-editor-dialog-field,.lexical-field-grid label { display:grid; gap:7px; color:var(--lexical-popover-text); font:700 .75rem 'Inter',system-ui,sans-serif; }
.lexical-editor-dialog-field + .lexical-editor-dialog-field { margin-top:18px; }
.lexical-editor-dialog-field > span { color:var(--lexical-popover-muted); font-size:.65rem; font-weight:500; }
.lexical-editor-dialog input,.lexical-editor-dialog textarea { box-sizing:border-box; width:100%; border:1px solid var(--lexical-popover-border); border-radius:10px; background:rgba(255,248,239,.045); color:var(--lexical-popover-text); font:400 .9rem 'Inter',system-ui,sans-serif; outline:0; }
.lexical-editor-dialog input { min-height:48px; padding:10px 12px; }
.lexical-editor-dialog textarea { padding:12px; resize:vertical; line-height:1.55; }
.lexical-editor-dialog input:focus,.lexical-editor-dialog textarea:focus { border-color:#dc6f91; box-shadow:0 0 0 3px rgba(220,111,145,.1); }
.lexical-editor-dialog-actions { display:flex; justify-content:flex-end; gap:10px; padding:18px 28px 26px; border-top:1px solid var(--lexical-popover-border); }
.lexical-editor-dialog-actions button { min-height:44px; padding:9px 17px; border:1px solid var(--lexical-popover-border); border-radius:999px; background:transparent; color:var(--lexical-popover-text); cursor:pointer; font-weight:700; }
.lexical-editor-dialog-actions .primary { border-color:transparent; background:linear-gradient(135deg,#bc3e69,#641d39); color:#fff8ef; box-shadow:0 12px 28px rgba(139,41,78,.28); }
.lexical-table-preview { --preview-columns:2; display:grid; grid-template-columns:repeat(var(--preview-columns),1fr); gap:3px; max-width:240px; margin:22px auto 0; padding:12px; border:1px solid var(--lexical-popover-border); border-radius:14px; }
.lexical-table-preview span { aspect-ratio:1.6; border:1px solid rgba(223,194,139,.18); border-radius:3px; background:rgba(188,62,105,.08); }
.lexical-image-dialog-preview { display:grid; place-items:center; max-height:220px; margin-bottom:20px; overflow:hidden; border-radius:1rem; background:#090508; }
.lexical-image-dialog-preview img { display:block; max-width:100%; max-height:220px; object-fit:contain; }

.lexical-selection-toolbar,.lexical-table-toolbar,.lexical-image-toolbar,.emoji-picker,.lexical-slash-menu,.lexical-link-popover { border-radius:14px !important; background:var(--lexical-popover-bg) !important; }
.lexical-selection-toolbar button:hover,.lexical-image-toolbar button:hover,.emoji-picker button:hover { background:var(--lexical-popover-hover) !important; }
.lexical-selection-toolbar button.active { color:#ef9bb2 !important; }
.lexical-slash-menu { width:min(360px,calc(100vw - 24px)); max-height:min(480px,65dvh); padding:8px; overflow-y:auto; }
.lexical-slash-menu .slash-section-label { padding:7px 10px; color:#dfc28b; font-size:.62rem; font-weight:750; letter-spacing:.14em; text-transform:uppercase; }
.lexical-slash-menu .slash-item { display:grid; grid-template-columns:30px 1fr; gap:10px; min-height:54px; padding:8px 10px; border-radius:10px; color:var(--lexical-popover-text); }
.lexical-slash-menu .slash-item:hover,.lexical-slash-menu .slash-item.selected { background:var(--lexical-popover-hover); }
.lexical-slash-menu .slash-icon { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:rgba(188,62,105,.1); color:#ef9bb2; }
.lexical-slash-menu .slash-label,.lexical-slash-menu .slash-desc { display:block; }
.lexical-slash-menu .slash-label { font-size:.8rem; font-weight:700; }
.lexical-slash-menu .slash-desc { margin-top:2px; color:var(--lexical-popover-muted); font-size:.68rem; }

:root.site-light {
  --lexical-surface:#ead5d0;
  --lexical-surface-hover:#dfc4c4;
  --lexical-surface-toolbar:rgba(236,215,208,.9);
  --lexical-text:#321923;
  --lexical-text-secondary:#63434e;
  --lexical-text-muted:#74515b;
  --lexical-border:rgba(86,32,49,.18);
  --lexical-border-hover:rgba(86,32,49,.3);
  --lexical-popover-bg:#f0dcd5;
  --lexical-popover-border:rgba(86,32,49,.2);
  --lexical-popover-text:#321923;
  --lexical-popover-muted:#74515b;
  --lexical-popover-hover:rgba(169,48,89,.09);
  --lexical-popover-active:rgba(169,48,89,.15);
  --lexical-popover-shadow:0 28px 78px rgba(77,31,46,.2);
  --lexical-focus-ring:#a93059;
}
:root.site-light #lexical-editor-body[data-profile="publishing"] .lexical-toolbar {
  border-color:rgba(86,32,49,.17) !important;
  background:rgba(238,217,210,.9) !important;
  box-shadow:inset 0 1px rgba(255,248,240,.5),0 18px 45px rgba(77,31,46,.1) !important;
}
:root.site-light #lexical-editor-body[data-profile="publishing"] .lexical-toolbar select { background:rgba(249,232,223,.55) !important; color:#54343f !important; }
:root.site-light #lexical-editor-body[data-profile="publishing"] .lexical-toolbar button { background:transparent !important; color:#63434e !important; }
:root.site-light #lexical-editor-body[data-profile="publishing"] .lexical-toolbar button:hover { background:rgba(169,48,89,.09) !important; color:#321923 !important; }
:root.site-light #lexical-editor-body[data-profile="publishing"] .lexical-toolbar button.active,
:root.site-light #lexical-editor-body[data-profile="publishing"] .lexical-toolbar button[aria-pressed="true"] { background:rgba(169,48,89,.15) !important; color:#8e294c !important; box-shadow:inset 0 0 0 1px rgba(169,48,89,.18) !important; }
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-input {
  border-color:rgba(86,32,49,.17) !important;
  background:radial-gradient(ellipse at 100% 100%,rgba(169,48,89,.14),transparent 40%),linear-gradient(150deg,rgba(248,230,221,.86),rgba(221,193,194,.64)) !important;
  color:#63434e !important;
  box-shadow:inset 0 1px rgba(255,248,240,.62),0 30px 75px rgba(77,31,46,.14) !important;
}
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-input:focus { border-color:rgba(169,48,89,.38) !important; box-shadow:inset 0 1px rgba(255,248,240,.7),0 34px 82px rgba(77,31,46,.17),0 0 0 3px rgba(169,48,89,.09) !important; }
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-input p { color:#63434e !important; }
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-input h1,
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-input h2,
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-input h3 { color:#321923 !important; }
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-input blockquote,
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-pull-quote { color:#452832 !important; background:transparent !important; }
:root.site-light #lexical-editor-body[data-profile="publishing"] .editor-callout { background:rgba(169,48,89,.09) !important; color:#54343f !important; }
:root.site-light .lexical-editor-dialog-backdrop { background:rgba(50,20,31,.52); }
:root.site-light .lexical-editor-dialog-card { background:radial-gradient(circle at 100% 0,rgba(169,48,89,.12),transparent 38%),#f0dcd5; }
:root.site-light .lexical-editor-dialog input,
:root.site-light .lexical-editor-dialog textarea { background:rgba(246,226,218,.74) !important; color:#321923 !important; }

@media (max-width:768px) {
  #lexical-editor-body[data-profile="publishing"] .lexical-toolbar { position:relative !important; top:auto !important; justify-content:flex-start !important; border-radius:18px 18px 9px 9px !important; }
  #lexical-editor-body[data-profile="publishing"] .toolbar-group { padding-right:4px !important; }
  #lexical-editor-body[data-profile="publishing"] .editor-input { min-height:520px !important; padding:38px 22px 80px !important; border-radius:1.5rem 1.5rem 4rem 1.5rem !important; }
  #lexical-editor-body[data-profile="publishing"] .lexical-placeholder { top:38px; left:22px; }
  #lexical-editor-body[data-profile="publishing"] .toolbar-more-dropdown { position:fixed !important; inset:auto 12px 76px !important; width:auto !important; max-height:60dvh; overflow-y:auto; }
  .lexical-editor-dialog { padding:10px; }
  .lexical-editor-dialog-card { width:min(100%,560px); border-radius:1.5rem 1.5rem 3.5rem 1.5rem; }
  .lexical-editor-dialog-head,.lexical-editor-dialog-body { padding:22px; }
  .lexical-editor-dialog-actions { padding:16px 22px 22px; }
}

/* Discussion composer — compact, calm and wrapping.
   This targets the rendered editor profile instead of one historical mount ID,
   so it also covers topic replies and inline reply editing. */
.lexical-editor-wrapper:has(.lexical-discussion) {
  width:100%;
  min-width:0;
  max-width:100%;
  overflow:visible;
}
.lexical-discussion {
  width:100%;
  min-width:0;
  overflow:visible !important;
  border:1px solid rgba(234,202,178,.14) !important;
  border-radius:1.65rem 1.65rem 3.5rem 1.65rem !important;
  background:
    radial-gradient(ellipse at 100% 0,rgba(188,62,105,.1),transparent 38%),
    rgba(255,248,239,.022) !important;
  box-shadow:inset 0 1px rgba(255,248,239,.025),0 18px 48px rgba(0,0,0,.13) !important;
}
.lexical-discussion .lexical-toolbar {
  position:relative !important;
  top:auto !important;
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:8px 10px !important;
  gap:5px !important;
  overflow:visible !important;
  border:0 !important;
  border-bottom:1px solid rgba(234,202,178,.12) !important;
  border-radius:1.65rem 1.65rem 0 0 !important;
  background:rgba(255,248,239,.025) !important;
  box-shadow:none !important;
}
.lexical-discussion .toolbar-group {
  display:flex;
  flex:0 1 auto !important;
  min-width:0 !important;
  max-width:100% !important;
  min-height:38px;
  padding:2px 5px !important;
  gap:1px !important;
  overflow:visible !important;
  border:0 !important;
  border-right:1px solid rgba(234,202,178,.11) !important;
  border-radius:0 !important;
  background:transparent !important;
}
.lexical-discussion .toolbar-group:last-child { border-right:0 !important; }
.lexical-discussion .toolbar-group-label { position:absolute !important; width:1px !important; height:1px !important; margin:-1px !important; padding:0 !important; overflow:hidden !important; clip:rect(0 0 0 0) !important; white-space:nowrap !important; }
.lexical-discussion .lexical-toolbar select {
  width:auto;
  max-width:138px;
  min-height:34px !important;
  padding:5px 28px 5px 10px !important;
  border:1px solid rgba(234,202,178,.14) !important;
  border-radius:999px !important;
  background:rgba(255,248,239,.025) !important;
  color:#d8c7c9 !important;
}
.lexical-discussion .lexical-toolbar button {
  min-width:34px !important;
  min-height:34px !important;
  padding:5px 8px !important;
  border:0 !important;
  border-radius:999px !important;
  background:transparent !important;
  color:#bea8ae !important;
  box-shadow:none !important;
}
.lexical-discussion .lexical-toolbar button:hover {
  background:rgba(188,62,105,.11) !important;
  color:#fff8ef !important;
  transform:none !important;
}
.lexical-discussion .lexical-toolbar button.active,
.lexical-discussion .lexical-toolbar button[aria-pressed='true'] {
  background:rgba(188,62,105,.17) !important;
  color:#dc6f91 !important;
}
.lexical-discussion .toolbar-dropdown-toggle { padding-inline:12px !important; }
.lexical-discussion .toolbar-more-dropdown {
  width:min(310px,calc(100vw - 32px));
  padding:7px;
  border-color:rgba(234,202,178,.16);
  border-radius:1.2rem 1.2rem 2.3rem 1.2rem;
  background:#26131d;
}
.lexical-discussion .toolbar-more-dropdown button {
  display:grid !important;
  grid-template-columns:32px minmax(0,1fr) !important;
  align-items:start !important;
  gap:10px !important;
  min-height:54px !important;
  padding:9px 10px !important;
  text-align:left !important;
}
.lexical-discussion .toolbar-more-dropdown .command-menu-icon { margin-top:1px; }
.lexical-discussion .toolbar-more-dropdown strong,
.lexical-discussion .toolbar-more-dropdown small { display:block;min-width:0; }
.lexical-discussion .toolbar-more-dropdown strong { color:var(--lexical-popover-text);font-size:.8rem;line-height:1.25; }
.lexical-discussion .toolbar-more-dropdown small { margin-top:4px;color:var(--lexical-popover-muted);font-size:.69rem;line-height:1.35; }
.lexical-discussion .lexical-editor-canvas { min-width:0; overflow:hidden; }
.lexical-discussion .editor-input {
  width:100% !important;
  max-width:100% !important;
  min-height:180px !important;
  margin:0 !important;
  padding:1.55rem 1.7rem 2rem !important;
  overflow-x:hidden !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#d8c7c9 !important;
  box-shadow:none !important;
  font-family:'Inter',system-ui,sans-serif !important;
  font-size:1rem !important;
  line-height:1.72 !important;
  overflow-wrap:anywhere;
}
.lexical-discussion .editor-input:focus { outline:0 !important; box-shadow:inset 3px 0 rgba(220,111,145,.55) !important; }
.lexical-discussion .lexical-placeholder { top:1.55rem; left:1.7rem; color:#947a83; }
.lexical-discussion .lexical-status {
  display:flex !important;
  padding:.65rem 1rem .8rem !important;
  border-top:1px solid rgba(234,202,178,.1);
  border-radius:0 0 3.5rem 1.65rem !important;
  background:rgba(255,248,239,.014) !important;
  color:#947a83;
  font-size:.68rem;
}
:root.site-light .lexical-discussion {
  border-color:rgba(86,32,49,.17) !important;
  background:radial-gradient(ellipse at 100% 0,rgba(169,48,89,.1),transparent 38%),rgba(244,224,216,.48) !important;
  box-shadow:inset 0 1px rgba(255,248,240,.5),0 18px 45px rgba(77,31,46,.09) !important;
}
:root.site-light .lexical-discussion .lexical-toolbar { border-color:rgba(86,32,49,.14) !important; background:rgba(249,232,223,.25) !important; }
:root.site-light .lexical-discussion .toolbar-group { border-color:rgba(86,32,49,.12) !important; }
:root.site-light .lexical-discussion .lexical-toolbar select { border-color:rgba(86,32,49,.17) !important; background:rgba(249,232,223,.5) !important; color:#63434e !important; }
:root.site-light .lexical-discussion .lexical-toolbar button { color:#63434e !important; }
:root.site-light .lexical-discussion .lexical-toolbar button:hover { background:rgba(169,48,89,.09) !important; color:#321923 !important; }
:root.site-light .lexical-discussion .editor-input { background:transparent !important; color:#54343f !important; }
:root.site-light .lexical-discussion .lexical-status { border-color:rgba(86,32,49,.1); background:rgba(249,232,223,.18) !important; color:#74515b; }

@media (max-width:620px) {
  .lexical-discussion { border-radius:1.25rem 1.25rem 2.6rem 1.25rem !important; }
  .lexical-discussion .lexical-toolbar { padding:7px !important; border-radius:1.25rem 1.25rem 0 0 !important; }
  .lexical-discussion .toolbar-group { padding:1px 3px !important; border-right:0 !important; }
  .lexical-discussion .lexical-toolbar select { max-width:124px; }
  .lexical-discussion .editor-input { min-height:160px !important; padding:1.25rem 1.15rem 1.7rem !important; }
  .lexical-discussion .lexical-placeholder { top:1.25rem; left:1.15rem; }
  .lexical-discussion .lexical-status { border-radius:0 0 2.6rem 1.25rem !important; }
}
