/* LYNQ 2.10: visual-only dark rendering, never write converted colors to saved HTML. */
body[data-compose-dark="1"] .nx-composer .nx-editor-surface,
body[data-compose-dark="1"] .nx-resource-studio .nx-editor-surface{background:#2b2e34!important;border-color:#343840}
body[data-compose-dark="1"] .nx-composer .editor-area,
body[data-compose-dark="1"] .nx-resource-studio .editor-area{
  background:#d3d5d9!important;color:#000!important;
  filter:invert(1) hue-rotate(180deg);
  caret-color:#000; color-scheme:light;
}
body[data-compose-dark="1"] .nx-composer .editor-area img,
body[data-compose-dark="1"] .nx-resource-studio .editor-area img{filter:invert(1) hue-rotate(180deg)}
body[data-compose-dark="1"] .nx-composer .mail-preview,
body[data-compose-dark="1"] .nx-resource-studio .mail-preview{background:#2b2e34;border-color:#494d55}
body[data-reader-dark="1"] .nx-message-reader .message-body,
body[data-reader-dark="1"] .nx-message-reader .mail-preview{background:#2b2e34;border-color:#494d55}
/* Inline editable signatures inherit the message's layout, not a separate footer. */
#editor-visual [data-lynq-signature="1"]{margin-top:24px;min-height:20px;max-width:100%;overflow-wrap:anywhere}
#editor-visual [data-lynq-signature="1"] img{max-width:100%;height:auto}
/* Color palette v2.10: click targets above the native input and above editor toolbars. */
.nx-color-input.nx-color-custom-trigger{position:relative;display:inline-flex;align-items:center;justify-content:center;overflow:visible;min-width:36px;min-height:36px}
.nx-color-custom-trigger>input[type="color"]{position:absolute!important;opacity:0!important;pointer-events:none!important;width:1px!important;height:1px!important;z-index:-1!important}
.nx-color-custom-trigger>.nx-color-open{position:relative;z-index:2;min-width:34px;min-height:34px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:#f4e9d1;background:transparent;border:0}
.nx-color-custom-trigger>.nx-color-open:hover{background:#343126;border-radius:6px}
.nx-color-v210{z-index:9999!important;max-height:calc(100dvh - 16px);overflow-y:auto;width:min(328px,calc(100vw - 20px))}
.nx-color-v210 .nx-color-title strong{display:flex;align-items:center;gap:9px}
.nx-color-v210 [data-count]{color:#91877a;font:10px system-ui}
.nx-color-v210 .nx-color-feedback{font:11px/1.3 system-ui;color:#d1b779;margin:8px 0 0;min-height:0}
.nx-color-v210 .nx-color-feedback:empty{display:none}

/* LYNQ 2.11: calm graphite surface rather than pitch black in dark mode. */
body[data-compose-dark="1"] #editor-visual,
body[data-compose-dark="1"] #resource-editor-visual{background:#d3d5d9!important}
body[data-reader-dark="1"] .nx-message-reader .message-body{background:#2b2e34!important}
/* No nested scrolling for received messages: the document owns scrolling. */
.nx-message-reader .message-body .mail-preview.nx-reader-fluid{
  display:block!important;width:100%!important;min-height:0!important;
  height:auto;border:0;overflow:hidden;scrollbar-width:none;
}
.nx-message-reader .message-body .mail-preview.nx-reader-fluid::-webkit-scrollbar{display:none}
@media(min-width:721px){body:has(.nx-message-reader) .sidebar{position:sticky;top:0;height:100dvh}}
body:has(.nx-message-reader) .topbar{position:sticky;top:0;z-index:80}
