/* Keep the underlying page from retaining a scrollbar behind the full-screen editor. */
html:has(.jmc-editor:not([hidden])), body:has(.jmc-editor:not([hidden])) { overflow: hidden; }
/* Local node-canvas surface. All styles are isolated from the host site. */
.jmc-editor {
  --jmc-surface: #202022;
  --jmc-text: rgba(255, 255, 255, .85);
  --jmc-muted: rgba(255, 255, 255, .4);
  position: fixed;
  inset: 0;
  z-index: 2000;
  width: 100%;
  height: 100dvh;
  min-width: 0;
  overflow: hidden;
  background-color: #0d0d0d;
  background-image: radial-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 18px 18px;
  color: var(--jmc-text);
  font: 13px/20px "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color-scheme: dark;
  isolation: isolate;
  overscroll-behavior: none;
}
.jmc-editor *, .jmc-editor *::before, .jmc-editor *::after { box-sizing: border-box; }
.jmc-editor[hidden], .jmc-editor [hidden] { display: none !important; }
.jmc-editor :is(button, input, textarea, select) { font: inherit; }
.jmc-editor button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.jmc-editor button:disabled { cursor: not-allowed; opacity: .4; }
.jmc-editor :is(button, a, input, textarea, select, [tabindex]):focus-visible { outline: 2px solid #83d2ff; outline-offset: 3px; }
.jmc-editor button { transition: background-color .12s ease, color .12s ease, border-color .12s ease; }
.jmc-editor button svg { display: block; flex: 0 0 auto; width: 20px; height: 20px; }
.jmc-editor .jmc-topbar { position: absolute; z-index: 50; top: 10px; right: 12px; left: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; pointer-events: none; }
.jmc-editor .jmc-topbar-left, .jmc-editor .jmc-topbar-right { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; pointer-events: auto; }
.jmc-editor .jmc-logo { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: #77e3eb; font-size: 23px; line-height: 1; font-weight: 750; }
.jmc-editor .jmc-logo img, .jmc-editor .jmc-logo svg { display: block; width: 30px; height: 30px; object-fit: contain; }
.jmc-editor .jmc-title { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 300px; height: 28px; padding: 3px 8px; border: 0; border-radius: 6px; background: transparent; color: rgba(255, 255, 255, .9); font-size: 13px; line-height: 22px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jmc-editor button.jmc-title:hover { background: #ffffff0b; }
.jmc-editor .jmc-title svg { width: 12px; height: 12px; color: #ffffff70; }
.jmc-editor .jmc-title-input { width: min(280px, 30vw); min-width: 70px; height: 28px; padding: 3px 8px; border: 1px solid #ffffff20; border-radius: 6px; background: #202022; color: #ececee; font-size: 13px; line-height: 22px; }
.jmc-editor .jmc-topbar-left { gap: 0; }
.jmc-editor .jmc-topbar-left .jmc-title { width: 81px; max-width: 300px; padding-inline: 8px; }
.jmc-editor .jmc-project-button { display: grid; flex: 0 0 20px; place-items: center; width: 20px; height: 28px; padding: 2px; border: 0; border-radius: 6px; background: transparent; color: #aaaab4; }
.jmc-editor .jmc-project-button:hover { background: #ffffff0b; }
.jmc-editor .jmc-project-button svg { width: 12px; height: 12px; }
.jmc-editor .jmc-topbar-control, .jmc-editor .jmc-topbar-right > button, .jmc-editor .jmc-topbar-controls { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: #202022; color: #bfc0c6; font-size: 13px; line-height: 20px; }
.jmc-editor .jmc-topbar-controls { padding: 0 4px; gap: 0; }
.jmc-editor .jmc-topbar-controls button { display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; border: 0; border-radius: 9px; background: transparent; color: #bfc0c6; }
.jmc-editor .jmc-topbar-control:hover, .jmc-editor .jmc-topbar-right > button:hover, .jmc-editor .jmc-topbar-controls button:hover { background: #ffffff12; }
.jmc-editor .jmc-topbar-note { max-width: 250px; margin-left: 16px; color: #8d939f; font-size: 11px; white-space: nowrap; }
.jmc-editor .jmc-stage { position: absolute; inset: 0; z-index: 1; overflow: hidden; touch-action: none; }
.jmc-editor .jmc-world { position: absolute; top: 0; left: 0; width: 1px; height: 1px; transform-origin: 0 0; }
.jmc-editor .jmc-edges { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.jmc-editor .jmc-empty { position: absolute; z-index: 0; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; gap: 14px; max-width: calc(100% - 150px); padding: 0; transform: translate(-50%, -50%); color: rgba(255, 255, 255, .65); font-size: 16px; line-height: 24px; white-space: nowrap; pointer-events: none; }
.jmc-editor .jmc-empty::before { content: ""; position: absolute; z-index: -1; top: 50%; left: 50%; width: min(440px, 65vw); height: min(440px, 65vw); transform: translate(-50%, -50%); border-radius: 50%; background-image: radial-gradient(#80e8f44a .8px, transparent .8px), radial-gradient(#4e80ec33 .8px, transparent .8px), radial-gradient(#a8c96c2a .8px, transparent .8px); background-size: 18px 18px, 18px 18px, 18px 18px; background-position: 0 0, 6px 6px, 12px 12px; mask-image: radial-gradient(circle, #000 8%, #0007 43%, transparent 71%); -webkit-mask-image: radial-gradient(circle, #000 8%, #0007 43%, transparent 71%); }
.jmc-editor .jmc-empty svg, .jmc-editor .jmc-empty-icon { width: 27px; height: 27px; color: #68dbed; }
.jmc-editor .jmc-rail { position: absolute; z-index: 60; top: calc(50% + 28px); left: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 48px; height: 444px; max-height: calc(100dvh - 130px); padding: 4px 4px 8px; transform: translateY(-50%); border: 0; border-radius: 12px; background: #202022; box-shadow: inset 0 0 0 1px #ffffff0a, 0 8px 30px #0002; }
.jmc-editor .jmc-tool { position: relative; display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: #c7c7cd; }
.jmc-editor .jmc-tool:hover, .jmc-editor .jmc-tool.is-active, .jmc-editor .jmc-tool[aria-pressed="true"] { background: #ffffff12; color: #f1f1f3; }
.jmc-editor .jmc-tool svg { width: 20px; height: 20px; }
.jmc-editor .jmc-tool-label { position: absolute; top: 50%; left: 64px; z-index: 1; display: block; padding: 2px 0; transform: translateY(-50%); color: #c4c4ca; font-size: 13px; line-height: 20px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.jmc-editor .jmc-tool:hover .jmc-tool-label, .jmc-editor .jmc-tool:focus-visible .jmc-tool-label, .jmc-editor .jmc-rail:hover .jmc-tool-label, .jmc-editor .jmc-rail:focus-within .jmc-tool-label { opacity: 1; }
.jmc-editor .jmc-tool-badge { position: absolute; top: -2px; right: -1px; padding: 0 3px; border-radius: 3px; background: #585963; color: #e5e5ec; font-size: 8px; line-height: 11px; }
.jmc-editor .jmc-divider, .jmc-editor .jmc-rail-divider { flex: 0 0 1px; width: 20px; height: 1px; margin: 8px 0; border: 0; background: #ffffff15; }
.jmc-editor .jmc-viewport-control { position: absolute; z-index: 50; bottom: 16px; left: 12px; display: flex; align-items: center; gap: 4px; width: 164px; height: 34px; padding: 2px 4px; border: 1px solid #ffffff0a; border-radius: 8px; background: #171719; }
.jmc-editor .jmc-viewport-control button { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; padding: 6px; border: 0; border-radius: 6px; background: transparent; color: #c2c2c8; }
.jmc-editor .jmc-viewport-control button:hover, .jmc-editor .jmc-viewport-control button.is-active { background: #ffffff10; color: #fff; }
.jmc-editor .jmc-viewport-control button svg { width: 16px; height: 16px; }
.jmc-editor .jmc-zoom-value { flex: 1 1 auto; min-width: 0; padding: 0 4px; color: #8a8a94; font-size: 11px; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.jmc-editor .jmc-ai-launcher { position: absolute; z-index: 50; right: 12px; bottom: 12px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; width: 118px; height: 34px; padding: 6px 12px; border: 1px solid #ffffff08; border-radius: 20px; background: #202022; color: #d8d8de; font-size: 13px; line-height: 20px; font-weight: 500; }
.jmc-editor .jmc-ai-launcher:hover { border-color: #ffffff17; background: #2b2b2e; }
.jmc-editor .jmc-ai-launcher svg { width: 17px; height: 17px; color: #56ccec; }
.jmc-editor .jmc-node { position: absolute; width: 320px; height: 320px; min-width: 40px; min-height: 40px; border-radius: 8px; outline: none; color: #d3d3d7; user-select: none; }
.jmc-editor .jmc-node-body { position: relative; width: 100%; height: 100%; padding: 24px; overflow: hidden; border: 0; border-radius: 8px; background: linear-gradient(135deg, #222, #171717); color: rgba(255, 255, 255, .75); font-size: 13px; line-height: 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.jmc-editor .jmc-node-body[contenteditable="true"], .jmc-editor textarea.jmc-node-body { outline: none; resize: none; user-select: text; cursor: text; }
.jmc-editor .jmc-node-body img, .jmc-editor .jmc-node-body video { display: block; width: 100%; height: 100%; object-fit: contain; }
.jmc-editor .jmc-node-media .jmc-node-body { display: grid; place-items: center; padding: 0; }
.jmc-editor .jmc-node audio { display: block; width: calc(100% - 32px); margin: 16px; }
.jmc-editor .jmc-node-label { position: absolute; top: calc(-30px * var(--jmc-inverse, 1)); left: 0; display: flex; align-items: center; gap: 6px; width: calc(100% / var(--jmc-inverse, 1)); height: 24px; margin: 0; transform: scale(var(--jmc-inverse, 1)); transform-origin: left top; color: rgba(255, 255, 255, .3); font-size: 13px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jmc-editor .jmc-node-label > svg { flex: 0 0 16px; width: 16px; height: 16px; }
.jmc-editor .jmc-node-name { display: block; flex: 0 1 auto; min-width: 0; height: 24px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: rgba(255, 255, 255, .4); font-size: 13px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.jmc-editor .jmc-node-name:hover { color: rgba(255, 255, 255, .7); }
.jmc-editor .jmc-node-tag { display: grid; flex: 0 0 22px; place-items: center; width: 22px; height: 22px; padding: 3px; margin-left: auto; border: 0; border-radius: 5px; background: transparent; color: rgba(255, 255, 255, .3); }
.jmc-editor .jmc-node-tag:hover { background: #ffffff0b; color: #c6c6ce; }
.jmc-editor .jmc-node-tag svg { width: 16px; height: 16px; }
.jmc-editor .jmc-node-name-input { display: block; flex: 1 1 auto; width: 100%; min-width: 0; height: 24px; padding: 1px 5px; border: 1px solid #ffffff26; border-radius: 4px; background: #26262a; color: #d4d4dd; font-size: 13px; line-height: 20px; }
.jmc-editor .jmc-media-placeholder { display: block; width: 24px; height: 24px; color: rgba(255, 255, 255, .2); }
.jmc-editor .jmc-node.is-selected::after, .jmc-editor .jmc-node[aria-selected="true"]::after { content: ""; position: absolute; inset: calc(-4px * var(--jmc-inverse, 1)); border: calc(1px * var(--jmc-inverse, 1)) solid rgba(255, 255, 255, .6); border-radius: calc(12px * var(--jmc-inverse, 1)); pointer-events: none; }
.jmc-editor .jmc-port { position: absolute; z-index: 2; top: calc(50% - 18px); display: grid; place-items: center; width: 36px; height: 36px; padding: 0; transform: scale(var(--jmc-inverse, 1)); transform-origin: center; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .35); cursor: crosshair; opacity: 0; pointer-events: none; transition: opacity .2s ease, color .15s ease; }
.jmc-editor .jmc-port-left { left: calc(-22px * var(--jmc-inverse, 1) - 18px); }
.jmc-editor .jmc-port-right { right: calc(-22px * var(--jmc-inverse, 1) - 18px); }
.jmc-editor .jmc-port::before { content: ""; position: absolute; inset: 8px; border: 1px solid currentColor; border-radius: 50%; background: rgba(255, 255, 255, .04); backdrop-filter: blur(12px); transform: scale(.5); transition: transform .2s ease; }
.jmc-editor .jmc-port svg { position: relative; width: 12px; height: 12px; stroke-width: 2; transform: scale(.5); transition: transform .2s ease; }
.jmc-editor .jmc-node:hover .jmc-port, .jmc-editor .jmc-node.is-selected .jmc-port, .jmc-editor .jmc-node[aria-selected="true"] .jmc-port, .jmc-editor .jmc-port:focus-visible { opacity: 1; pointer-events: auto; }
.jmc-editor .jmc-node:hover .jmc-port::before, .jmc-editor .jmc-node.is-selected .jmc-port::before, .jmc-editor .jmc-node[aria-selected="true"] .jmc-port::before, .jmc-editor .jmc-port:focus-visible::before, .jmc-editor .jmc-node:hover .jmc-port svg, .jmc-editor .jmc-node.is-selected .jmc-port svg, .jmc-editor .jmc-node[aria-selected="true"] .jmc-port svg, .jmc-editor .jmc-port:focus-visible svg { transform: scale(1); }
.jmc-editor .jmc-port:hover { color: #fff; background: transparent; }
.jmc-editor .jmc-resize { position: absolute; z-index: 3; display: none; width: 8px; height: 8px; padding: 0; transform: scale(var(--jmc-inverse, 1)); transform-origin: center center; border: 1px solid #d2d2d8; border-radius: 2px; background: #28282c; }
.jmc-editor .jmc-node.is-selected .jmc-resize, .jmc-editor .jmc-node[aria-selected="true"] .jmc-resize { display: block; }
.jmc-editor .jmc-resize-nw, .jmc-editor .jmc-resize[data-direction="nw"] { top: calc(-4px * var(--jmc-inverse, 1) - 4px); left: calc(-4px * var(--jmc-inverse, 1) - 4px); cursor: nwse-resize; }
.jmc-editor .jmc-resize-n, .jmc-editor .jmc-resize[data-direction="n"] { top: calc(-4px * var(--jmc-inverse, 1) - 4px); left: calc(50% - 4px); cursor: ns-resize; }
.jmc-editor .jmc-resize-ne, .jmc-editor .jmc-resize[data-direction="ne"] { top: calc(-4px * var(--jmc-inverse, 1) - 4px); right: calc(-4px * var(--jmc-inverse, 1) - 4px); cursor: nesw-resize; }
.jmc-editor .jmc-resize-e, .jmc-editor .jmc-resize[data-direction="e"] { top: calc(50% - 4px); right: calc(-4px * var(--jmc-inverse, 1) - 4px); cursor: ew-resize; }
.jmc-editor .jmc-resize-se, .jmc-editor .jmc-resize[data-direction="se"] { bottom: calc(-4px * var(--jmc-inverse, 1) - 4px); right: calc(-4px * var(--jmc-inverse, 1) - 4px); cursor: nwse-resize; }
.jmc-editor .jmc-resize-s, .jmc-editor .jmc-resize[data-direction="s"] { bottom: calc(-4px * var(--jmc-inverse, 1) - 4px); left: calc(50% - 4px); cursor: ns-resize; }
.jmc-editor .jmc-resize-sw, .jmc-editor .jmc-resize[data-direction="sw"] { bottom: calc(-4px * var(--jmc-inverse, 1) - 4px); left: calc(-4px * var(--jmc-inverse, 1) - 4px); cursor: nesw-resize; }
.jmc-editor .jmc-resize-w, .jmc-editor .jmc-resize[data-direction="w"] { top: calc(50% - 4px); left: calc(-4px * var(--jmc-inverse, 1) - 4px); cursor: ew-resize; }
.jmc-editor .jmc-selection-toolbar { position: absolute; z-index: 5; top: calc(-76px * var(--jmc-inverse, 1)); left: 50%; display: flex; align-items: center; justify-content: center; gap: 2px; width: max-content; max-width: none; height: 40px; padding: 4px; transform: translateX(-50%) scale(var(--jmc-inverse, 1)); transform-origin: center top; border: 1px solid #ffffff08; border-radius: 12px; background: #202022; box-shadow: 0 6px 20px #0003; }
.jmc-editor .jmc-selection-toolbar button { display: grid; place-items: center; width: 28px; height: 28px; min-width: 28px; padding: 5px; border: 0; border-radius: 7px; background: transparent; color: #c2c2c9; }
.jmc-editor .jmc-selection-toolbar button:hover { background: #ffffff12; color: #fff; }
.jmc-editor .jmc-selection-toolbar button svg { width: 18px; height: 18px; }
.jmc-editor .jmc-replace-image { position: absolute; z-index: 4; top: calc(8px * var(--jmc-inverse, 1)); right: calc(8px * var(--jmc-inverse, 1)); display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; transform: scale(var(--jmc-inverse, 1)); transform-origin: top right; border: 1px solid transparent; border-radius: 8px; background: #0009; color: #fff; }
.jmc-editor .jmc-replace-image:hover, .jmc-editor .jmc-replace-image:active { border-color: #ffffff26; background: #000c; }
.jmc-editor .jmc-replace-image svg { width: 20px; height: 20px; }
.jmc-editor.is-gesturing .jmc-replace-image { visibility: hidden; }
.jmc-editor .jmc-selection-toolbar .jmc-background-button { display: flex; align-items: center; justify-content: center; gap: 6px; width: auto; min-width: 0; padding-inline: 8px; color: #b6b6c0; font-size: 12px; line-height: 20px; }
.jmc-editor .jmc-color-preview { display: block; flex: 0 0 12px; width: 12px; height: 12px; border: 1px solid #ffffff21; border-radius: 3px; background: linear-gradient(135deg, #555, #28282a); }
.jmc-editor .jmc-swatch { display: block; flex: 0 0 14px; width: 14px; height: 14px; border: 1px solid #ffffff22; border-radius: 4px; }
.jmc-editor .jmc-generator { position: absolute; z-index: 6; top: calc(100% + 20px * var(--jmc-inverse, 1)); left: 50%; display: flex; flex-direction: column; gap: 0; width: 680px; max-width: calc(100vw - 48px); min-height: 206px; padding: 16px; transform: translateX(-50%) scale(var(--jmc-inverse, 1)); transform-origin: center top; border: 0; border-radius: 20px; background: #222b; box-shadow: 0 10px 30px #0003; backdrop-filter: blur(16px); }
.jmc-editor .jmc-generator textarea { display: block; flex: 0 0 66px; width: 100%; min-width: 0; height: 66px; min-height: 66px; max-height: 66px; padding: 0; margin: 0 0 16px; border: 0; outline: none; resize: none; overflow: auto; background: transparent; color: #d9d9df; font-family: Montserrat, "CapCut Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; font-size: 12px; line-height: 16px; user-select: text; }
.jmc-editor .jmc-generator textarea::placeholder { color: #707078; opacity: 1; }
.jmc-editor .jmc-generator.jmc-generator-plain { min-height: 204px; }
.jmc-editor .jmc-generator-plain .jmc-generator-bar { margin-top: auto; }
.jmc-editor .jmc-generator-bar { display: flex; flex: 0 0 32px; align-items: center; gap: 10px; min-width: 0; min-height: 32px; }
.jmc-editor .jmc-generator-add { display: grid; flex: 0 0 48px; place-items: center; width: 48px; height: 48px; padding: 12px; border: 1px solid #ffffff0a; border-radius: 8px; background: #ffffff05; color: #b4b4bd; }
.jmc-editor .jmc-generator-add:hover { border-color: #ffffff23; background: #ffffff0c; }
.jmc-editor .jmc-generator-options { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.jmc-editor .jmc-generator-refs { display: flex; flex: 0 0 48px; align-items: center; flex-wrap: nowrap; gap: 8px; width: 100%; min-width: 0; height: 48px; margin: 0 0 12px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.jmc-editor .jmc-generator-bar .jmc-generator-options { flex: 1 1 auto; align-self: center; }
.jmc-editor .jmc-generator-option { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 3px 8px; border: 0; border-radius: 6px; background: #ffffff06; color: #aaaab4; font-size: 11px; line-height: 20px; }
.jmc-editor .jmc-generator-option:hover { background: #ffffff10; }
.jmc-editor .jmc-generator-send { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; padding: 7px; margin-left: auto; border: 0; border-radius: 50%; background: #f1f1f4; color: #222; }
.jmc-editor .jmc-generator-send:hover { background: #fff; }
.jmc-editor .jmc-generator-send svg { width: 18px; height: 18px; }
.jmc-editor .jmc-generator-status { margin: 0; color: #8d9aa8; font-size: 10px; line-height: 16px; }
.jmc-editor .jmc-popover { position: absolute; z-index: 100; display: flex; flex-direction: column; gap: 2px; width: 220px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 76px); padding: 8px; overflow-x: hidden; overflow-y: auto; border: 1px solid #ffffff14; border-radius: 12px; background: #202022; color: #d0d0d7; box-shadow: 0 12px 40px #0006; font-size: 13px; line-height: 20px; overscroll-behavior: contain; }
.jmc-editor .jmc-popover-row, .jmc-editor .jmc-popover > button { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: #d0d0d7; font-size: 13px; line-height: 20px; text-align: left; white-space: nowrap; }
.jmc-editor .jmc-popover-row:hover, .jmc-editor .jmc-popover > button:hover { background: #ffffff14; }
.jmc-editor .jmc-popover-row svg, .jmc-editor .jmc-popover > button svg { width: 16px; height: 16px; color: #aaaab4; }
.jmc-editor .jmc-popover-shortcut { margin-left: auto; color: #707079; font-size: 11px; }
.jmc-editor .jmc-popover-separator { flex: 0 0 1px; width: calc(100% - 16px); height: 1px; margin: 6px 8px; background: #ffffff0b; }
.jmc-editor .jmc-popover-title { padding: 5px 8px 8px; margin: 0; color: #7a7a85; font-size: 11px; line-height: 18px; font-weight: 400; }
.jmc-editor .jmc-popover-row.is-active, .jmc-editor .jmc-popover-row[aria-checked="true"] { background: #ffffff0b; color: #fafafd; }
.jmc-editor .jmc-popover-row.is-danger { color: #e88789; }
.jmc-editor .jmc-sidepanel { position: absolute; z-index: 70; top: 62px; right: 12px; bottom: 58px; display: flex; flex-direction: column; width: 360px; max-width: calc(100vw - 88px); min-width: 0; overflow: hidden; border: 1px solid #ffffff0c; border-radius: 14px; background: #202022; box-shadow: 0 10px 40px #0005; }
.jmc-editor .jmc-sidepanel-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; padding: 12px 16px; border-bottom: 1px solid #ffffff08; }
.jmc-editor .jmc-sidepanel-title { padding: 0; margin: 0; color: #e6e6ea; font-size: 14px; line-height: 22px; font-weight: 550; }
.jmc-editor .jmc-sidepanel-close { display: grid; place-items: center; width: 26px; height: 26px; padding: 5px; border: 0; border-radius: 6px; background: transparent; color: #878791; }
.jmc-editor .jmc-sidepanel-close:hover { background: #ffffff0d; color: #d4d4dc; }
.jmc-editor .jmc-sidepanel-close svg { width: 16px; height: 16px; }
.jmc-editor .jmc-sidepanel-body { flex: 1 1 auto; min-height: 0; min-width: 0; padding: 16px; overflow: auto; overscroll-behavior: contain; }
.jmc-editor .jmc-sidepanel-footer { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 52px; padding: 12px 16px; border-top: 1px solid #ffffff08; }
.jmc-editor .jmc-sidepanel-tabs { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 6px 8px; border-bottom: 1px solid #ffffff08; overflow-x: auto; }
.jmc-editor .jmc-sidepanel-tab { flex: 0 0 auto; padding: 6px 10px; border: 0; border-radius: 7px; background: transparent; color: #858590; font-size: 12px; line-height: 20px; }
.jmc-editor .jmc-sidepanel-tab.is-active, .jmc-editor .jmc-sidepanel-tab[aria-selected="true"] { background: #ffffff0c; color: #dedee5; }
.jmc-editor .jmc-panel-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 140px; padding: 24px 12px; color: #6f6f79; font-size: 12px; line-height: 20px; text-align: center; }
.jmc-editor .jmc-panel-input { display: block; flex: 1 1 auto; width: 100%; min-width: 0; min-height: 36px; padding: 8px 10px; border: 1px solid #ffffff1a; border-radius: 8px; outline: none; background: #151518; color: #d5d5dd; font-size: 12px; line-height: 20px; }
.jmc-editor textarea.jmc-panel-input { min-height: 86px; resize: vertical; }
.jmc-editor .jmc-panel-input::placeholder { color: #6c6c78; opacity: 1; }
.jmc-editor .jmc-panel-input:focus { border-color: #80899d66; }
.jmc-editor .jmc-settings-choices { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; padding: 0 7px 7px; }
.jmc-editor .jmc-settings-choices button { display: inline-flex; justify-content: center; align-items: center; min-width: 34px; min-height: 28px; padding: 4px 8px; border: 1px solid #ffffff0b; border-radius: 7px; background: #ffffff04; color: #a3a3b0; font-size: 11px; line-height: 18px; }
.jmc-editor .jmc-settings-choices button:hover { background: #ffffff0d; color: #e1e1e7; }
.jmc-editor .jmc-settings-choices button[aria-pressed="true"], .jmc-editor .jmc-settings-choices button.is-active { border-color: #d9dbe529; background: #ffffff12; color: #f0f0f5; }
.jmc-editor .jmc-popover.jmc-image-settings { display: flex; flex-direction: column; gap: 24px; width: 432px; height: 292px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 76px); padding: 16px; border: 0; border-radius: 16px; background: #262626; }
.jmc-editor .jmc-image-settings-section { display: flex; flex: 0 0 auto; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.jmc-editor .jmc-image-settings-title { padding: 0; margin: 0; color: #898989; font-size: 12px; line-height: 16px; font-weight: 400; }
.jmc-editor .jmc-image-settings-segments { display: flex; align-items: stretch; gap: 0; min-width: 0; height: 40px; padding: 2px; border: 0; border-radius: 10px; background: #373737; }
.jmc-editor .jmc-image-settings-section:first-child .jmc-image-settings-segments { height: 60px; }
.jmc-editor .jmc-image-settings-segment { display: flex; flex: 1 1 0; justify-content: center; align-items: center; gap: 5px; min-width: 0; min-height: 30px; padding: 5px 4px; border: 0; border-radius: 8px; background: transparent; color: #f5f5f5; font-size: 12px; line-height: 16px; }
.jmc-editor .jmc-image-settings-segment.is-ratio { flex-direction: column; gap: 8px; }
.jmc-editor .jmc-ratio-shape { display: block; box-sizing: border-box; border: 1px solid currentColor; border-radius: 1px; }
.jmc-editor .jmc-image-settings-segment:hover { background: #ffffff08; color: #b9b9c2; }
.jmc-editor .jmc-image-settings-segment[aria-pressed="true"], .jmc-editor .jmc-image-settings-segment.is-active { background: #484848; color: #f5f5f5; }
.jmc-editor .jmc-search-results { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.jmc-editor .jmc-search-result { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 8px 9px; border: 0; border-radius: 7px; background: transparent; color: #b8b8c3; text-align: left; overflow-wrap: anywhere; }
.jmc-editor .jmc-search-result:hover { background: #ffffff0b; color: #e7e7ee; }
.jmc-editor .jmc-search-result svg { width: 16px; height: 16px; color: #858594; }
.jmc-editor .jmc-minimap { position: absolute; z-index: 55; bottom: 60px; left: 12px; width: 180px; height: 120px; overflow: hidden; border: 1px solid #ffffff1a; border-radius: 8px; background: #171719; box-shadow: 0 6px 22px #0004; }
.jmc-editor .jmc-minimap-node { position: absolute; min-width: 3px; min-height: 3px; padding: 0; border: 1px solid #85879255; border-radius: 2px; background: #85879225; }
.jmc-editor .jmc-minimap-node:hover { border-color: #d4d9e485; background: #b4c0d445; }
.jmc-editor .jmc-fullscreen { position: absolute; inset: 0; z-index: 180; display: flex; align-items: center; justify-content: center; gap: 0; overflow: auto; padding: 48px 24px; background: #0d0d0df5; }
.jmc-editor .jmc-fullscreen-close { position: absolute; z-index: 1; top: 20px; right: 20px; display: grid; place-items: center; width: 34px; height: 34px; padding: 7px; border: 1px solid #ffffff0d; border-radius: 9px; background: #242428; color: #aeb0bb; }
.jmc-editor .jmc-fullscreen-close:hover { background: #303035; color: #e4e6ed; }
.jmc-editor .jmc-fullscreen-text { width: min(720px, 80vw); max-width: 80vw; max-height: 80vh; padding: 26px; overflow: auto; border: 1px solid #ffffff0a; border-radius: 10px; background: #19191d; color: #d2d2dc; font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.jmc-editor .jmc-fullscreen > img, .jmc-editor .jmc-fullscreen > video { display: block; max-width: 90vw; max-height: 90vh; object-fit: contain; }
.jmc-editor .jmc-fullscreen > audio { display: block; width: min(600px, 85vw); }
.jmc-editor.is-gesturing .jmc-generator, .jmc-editor.is-gesturing .jmc-selection-toolbar { opacity: 0; pointer-events: none; }
.jmc-editor.is-panning .jmc-stage, .jmc-editor.is-panning .jmc-node { cursor: grab; }
.jmc-editor.is-panning.is-gesturing .jmc-stage { cursor: grabbing; }
.jmc-editor .jmc-notice { position: absolute; z-index: 150; top: 68px; left: 50%; max-width: min(500px, calc(100% - 120px)); padding: 10px 16px; transform: translateX(-50%); border: 1px solid #ffffff16; border-radius: 10px; background: #29292df5; color: #d0d4db; box-shadow: 0 6px 25px #0004; font-size: 12px; line-height: 20px; text-align: center; pointer-events: none; }
.jmc-editor .jmc-node-media .jmc-node-body.jmc-special-body { display: block; padding: 0; overflow: visible; background: transparent; }
.jmc-editor .jmc-source-picker { position: absolute; z-index: 95; top: 70px; left: 50%; display: flex; align-items: center; gap: 16px; max-width: calc(100% - 40px); padding: 10px 16px; transform: translateX(-50%); border: 1px solid #ffffff1a; border-radius: 12px; background: #262626; box-shadow: 0 10px 32px #0006; color: #ddd; }
.jmc-editor .jmc-source-picker span { color: #999; font-size: 12px; }
.jmc-editor .jmc-source-picker button { display: grid; place-items: center; width: 24px; height: 24px; padding: 4px; border: 0; border-radius: 5px; background: transparent; color: #aaa; }
.jmc-editor .jmc-source-picker button:hover { background: #ffffff14; color: #fff; }
.jmc-editor.is-picking-material .jmc-node.is-source-ineligible { opacity: .25; }
.jmc-editor.is-picking-material .jmc-node.is-source-eligible { cursor: copy; }
.jmc-editor.is-picking-material .jmc-node.is-source-eligible:hover { outline: 2px solid #7dc9ff; outline-offset: 6px; }
.jmc-editor.is-picking-material .jmc-generator, .jmc-editor.is-picking-material .jmc-selection-toolbar { visibility: hidden; }
.jmc-editor .jmc-timeline-fullscreen { display: flex; flex-direction: column; justify-content: flex-end; padding: 64px 24px 24px; }
.jmc-editor .jmc-timeline-full-title { position: absolute; top: 18px; left: 24px; margin: 0; color: #ccc; font-size: 15px; font-weight: 500; }
.jmc-editor .jmc-timeline-fullscreen > .jmt-timeline { flex: 0 0 260px; height: 260px; max-width: 1500px; }
.jmc-editor .jmc-timeline-fullscreen .jmt-preview { bottom: calc(100% + 24px); width: min(720px, 80vw); }
.jmc-editor .jmc-timeline-fullscreen .jmt-preview-media:is(img,video) { max-height: calc(100dvh - 420px); }
.jmc-editor:has(.jmc-timeline-fullscreen) > .jmc-popover, .jmc-editor:has(.jmc-timeline-fullscreen) > .jmc-sidepanel { z-index: 210; }
.jmc-editor > .jmc-notice { z-index: 240; }
.jmc-editor .jmc-connection { fill: none; stroke: #fff; stroke-opacity: .16; stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; transition: stroke .2s ease, stroke-opacity .2s ease; }
.jmc-editor .jmc-connection.is-active, .jmc-editor .jmc-connection-draft { stroke: #008ee5; stroke-opacity: 1; }
.jmc-editor .jmc-marquee { position: absolute; z-index: 4; border: 1px solid #89bde375; background: #89bde312; pointer-events: none; }

@media (max-height: 650px) and (min-width: 761px) {
  .jmc-editor .jmc-rail { top: 70px; bottom: 66px; height: auto; max-height: none; transform: none; overflow-y: auto; overflow-x: visible; }
  .jmc-editor .jmc-rail .jmc-tool { flex-shrink: 0; }
}
@media (max-width: 760px) {
  .jmc-editor .jmc-topbar { top: 8px; right: 10px; left: 8px; gap: 7px; }
  .jmc-editor .jmc-topbar-left, .jmc-editor .jmc-topbar-right { gap: 4px; }
  .jmc-editor .jmc-topbar-right { flex-shrink: 0; white-space: nowrap; }
  .jmc-editor .jmc-title { max-width: min(180px, 35vw); padding-right: 5px; padding-left: 5px; font-size: 12px; }
  .jmc-editor .jmc-title-input { width: min(170px, 35vw); }
  .jmc-editor .jmc-topbar-note { display: none; }
  .jmc-editor .jmc-topbar-control, .jmc-editor .jmc-topbar-right > button { gap: 4px; height: 36px; padding: 0 9px; border-radius: 10px; font-size: 11px; }
  .jmc-editor .jmc-topbar-control svg, .jmc-editor .jmc-topbar-right > button svg { width: 17px; height: 17px; }
  .jmc-editor .jmc-rail { top: 66px; bottom: 65px; left: 8px; height: auto; max-height: none; transform: none; overflow-y: auto; scrollbar-width: thin; }
  .jmc-editor .jmc-tool-label { display: none; }
  .jmc-editor .jmc-empty { max-width: calc(100% - 100px); gap: 9px; margin-left: 20px; font-size: 13px; line-height: 22px; white-space: normal; text-align: center; }
  .jmc-editor .jmc-empty::before { width: min(330px, 70vw); height: min(330px, 70vw); }
  .jmc-editor .jmc-viewport-control { bottom: 12px; left: 8px; width: 150px; height: 34px; gap: 2px; }
  .jmc-editor .jmc-ai-launcher { right: 10px; bottom: 12px; width: 108px; }
  .jmc-editor .jmc-generator { width: min(680px, calc(100vw - 80px)); max-width: calc(100vw - 80px); min-height: 192px; padding: 13px; border-radius: 15px; }
  .jmc-editor .jmc-generator textarea { font-size: 12px; }
  .jmc-editor .jmc-generator-bar { flex-wrap: wrap; gap: 8px; }
  .jmc-editor .jmc-generator-add { flex-basis: 40px; width: 40px; height: 40px; padding: 10px; }
  .jmc-editor .jmc-generator-refs { flex-basis: 40px; height: 40px; }
  .jmc-editor .jmc-generator-options { flex: 1 1 140px; }
  .jmc-editor .jmc-generator-option { min-height: 25px; padding: 3px 6px; font-size: 10px; }
  .jmc-editor .jmc-sidepanel { top: 60px; right: 8px; bottom: 58px; width: min(360px, calc(100vw - 74px)); max-width: calc(100vw - 74px); border-radius: 12px; }
  .jmc-editor .jmc-sidepanel-header { min-height: 48px; padding: 10px 12px; }
  .jmc-editor .jmc-sidepanel-body { padding: 12px; }
  .jmc-editor .jmc-sidepanel-footer { padding: 10px 12px; }
  .jmc-editor .jmc-popover { max-width: calc(100vw - 80px); max-height: calc(100dvh - 100px); }
  .jmc-editor .jmc-popover.jmc-image-settings { width: min(432px, calc(100vw - 80px)); height: auto; min-height: 292px; max-width: calc(100vw - 80px); max-height: calc(100dvh - 100px); }
  .jmc-editor .jmc-image-settings-segments { flex-wrap: wrap; }
  .jmc-editor .jmc-image-settings-segment { flex-basis: 48px; padding-inline: 5px; font-size: 11px; }
  .jmc-editor .jmc-notice { top: 58px; max-width: calc(100% - 80px); padding: 8px 12px; margin-left: 22px; font-size: 11px; }
}
@media (max-width: 400px) {
  .jmc-editor .jmc-logo { flex-basis: 32px; width: 32px; height: 36px; }
  .jmc-editor .jmc-title { max-width: 110px; font-size: 11px; }
  .jmc-editor .jmc-topbar-control, .jmc-editor .jmc-topbar-right > button { height: 34px; padding: 0 7px; font-size: 10px; }
  .jmc-editor .jmc-topbar-controls { padding: 0 2px; }
  .jmc-editor .jmc-topbar-controls button { width: 30px; height: 32px; padding: 6px; }
  .jmc-editor .jmc-viewport-control { width: 144px; }
  .jmc-editor .jmc-ai-launcher { width: 110px; gap: 5px; padding-inline: 8px; font-size: 12px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .jmc-editor, .jmc-editor *, .jmc-editor *::before, .jmc-editor *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.jmc-editor .jmc-generator > .jmk-widget { position: absolute; bottom: 100%; left: 0; }

.jmc-editor .jmc-reference-chip { position: relative; flex: 0 0 48px; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border: 1px solid #ffffff0d; border-radius: 8px; background: #ffffff08; }
.jmc-editor .jmc-reference-chip > img { width: 100%; height: 100%; object-fit: cover; }
.jmc-editor .jmc-reference-chip > svg { width: 22px; height: 22px; color: #b4b4bd; }
.jmc-editor .jmc-reference-remove { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 16px; height: 16px; padding: 2px; min-height: 0; border: 0; border-radius: 0 0 0 4px; background: #0009; color: #fff; opacity: 0; }
.jmc-editor .jmc-reference-chip:is(:hover,:focus-within) .jmc-reference-remove { opacity: 1; }

.jmc-editor .jmc-generator-refs { flex-basis: 58px; height: 58px; padding-top: 10px; margin-top: -10px; }
.jmc-editor .jmc-reference-chip { overflow: visible; }
.jmc-editor .jmc-reference-open { display: grid; place-items: center; width: 48px; height: 48px; min-height: 0; padding: 0; overflow: hidden; border: 0; border-radius: 8px; background: transparent; color: #b4b4bd; }
.jmc-editor .jmc-reference-open > img { width: 100%; height: 100%; object-fit: cover; }
.jmc-editor .jmc-reference-open > svg { width: 22px; height: 22px; }
.jmc-editor .jmc-reference-remove { top: -10px; right: -10px; width: 24px; height: 24px; padding: 6px; border-radius: 50%; }
.jmc-editor .jmc-reference-preview { position: fixed; z-index: 360; display: grid; place-items: center; width: 200px; height: 200px; overflow: hidden; border-radius: 8px; background: #171719; box-shadow: 0 6px 24px #0005; pointer-events: none; }
.jmc-editor .jmc-reference-preview > img { width: 100%; height: 100%; object-fit: contain; }

.jmc-editor .jmc-generator:has(> .jmk-widget:not(.is-collapsed):not([hidden])) { top: calc(100% + 76px * var(--jmc-inverse, 1)); }

.jmc-director-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#202123;color:#b8b9bd;border-radius:8px;font:14px/20px 'PingFang SC','Microsoft YaHei',Arial,sans-serif}.jmc-director-card>svg{width:40px;height:40px;color:#c7c8cb}.jmc-director-card p{margin:0}.jmc-director-open{height:36px;padding:0 20px;border:1px solid #4a4b50;border-radius:7px;background:#303136;color:#e8e8eb;font:inherit;cursor:pointer}.jmc-director-open:hover{background:#3d3e44}

.jmc-editor .jmc-generator:has(> .jmk-widget.is-collapsed) { top: calc(100% + 40px * var(--jmc-inverse, 1)); }

.jmc-editor .jmc-popover.jmc-add-menu { width: 200px; gap: 4px; padding: 4px; border: 0; border-radius: 12px; }
.jmc-editor .jmc-add-menu-title { display: flex; align-items: center; flex: 0 0 28px; height: 28px; padding: 4px 8px; color: rgba(255,255,255,.35); font-size: 12px; }
.jmc-editor .jmc-add-menu > button { height: 36px; min-height: 36px; padding: 8px; }

.jmc-editor .jmc-back-to-content { position: absolute; z-index: 30; top: 32px; left: 50%; display: flex; align-items: center; gap: 24px; height: 44px; padding: 0 16px; transform: translateX(-50%); border-radius: 12px; background: #333; box-shadow: 0 8px 24px #0003; color: #f5fbff; font-size: 13px; line-height: 20px; white-space: nowrap; }
.jmc-editor .jmc-back-to-content button { display: inline-flex; align-items: center; gap: 4px; min-width: 72px; height: 20px; padding: 0; border: 0; background: transparent; color: inherit; font-size: 13px; line-height: 20px; font-weight: 500; }
.jmc-editor .jmc-back-to-content img { width: 16px; height: 16px; }
.jmc-editor.is-hand-tool .jmc-stage, .jmc-editor.is-hand-tool .jmc-node { cursor: grab; }
.jmc-editor.is-hand-tool.is-gesturing .jmc-stage, .jmc-editor.is-hand-tool.is-gesturing .jmc-node { cursor: grabbing; }
.jmc-editor.is-hand-tool .jmc-port, .jmc-editor.is-panning .jmc-port { opacity: 0; pointer-events: none; }

.jmc-editor .jmc-edge { outline: none; }
.jmc-editor .jmc-connection-hit { fill: none; stroke: transparent; stroke-width: 20; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.jmc-editor .jmc-edge:focus-visible .jmc-connection { stroke: #008ee5; stroke-opacity: 1; }

.jmc-editor.is-hand-tool .jmc-connection-hit, .jmc-editor.is-panning .jmc-connection-hit { pointer-events: none; }

.jmc-editor .jmc-stage { cursor: grab; }
.jmc-editor.is-panning.is-gesturing .jmc-node { cursor: grabbing; }

/* Image composition keeps surrounding canvas context and owns its local gestures. */
.jmc-editor:has(.jic-composition) :is(.jmc-generator,.jmc-selection-toolbar,.jmc-replace-image,.jmc-port) { visibility: hidden; }
.jmc-editor:has(.jic-composition) .jmc-node.is-selected { visibility: hidden; }

.jmc-editor .jmc-history-panel { top: 56px; bottom: auto; width: 320px; min-height: 211px; max-height: calc(100dvh - 116px); }
.jmc-editor .jmc-history-panel .jmc-sidepanel-body { padding: 0 8px 20px; }
.jmc-editor .jmc-history-panel .jmc-sidepanel-tabs { border: 0; padding: 4px 0; }
.jmc-editor .jmc-history-panel .jmc-panel-empty { padding: 28px 12px; }
@media (max-width: 760px) { .jmc-editor .jmc-history-panel { top: 60px; max-width: calc(100vw - 74px); } }

.jmc-editor .jmc-popover.jmc-image-settings-native { height: auto; min-height: 220px; overflow-y: auto; }
.jmc-editor .jmc-image-settings-native .jmc-image-settings-segments { height: auto; min-height: 40px; flex-wrap: wrap; }
.jmc-editor .jmc-image-settings-native .jmc-image-settings-segment { flex-basis: 38px; }
.jmc-editor .jmc-image-settings-native input { width: 100%; border: 0; border-radius: 8px; padding: 10px; background: #373737; color: #f5f5f5; }

.jmc-editor .jmc-image-settings-native .jmc-image-settings-confirm { padding: 8px 12px; border: 0; border-radius: 8px; background: #484848; color: #f5f5f5; font: inherit; }
.jmc-editor .jmc-image-settings-native input { flex: 1 1 60%; width: 0; min-width: 70px; }

.jmc-editor .jmc-generator-pending { width: 100%; margin: 12px 0; color: #9b9ba5; font: 12px/20px "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }

.jmc-editor .jmc-generator-refs.has-reference-mapping { flex-basis: 78px; align-items: flex-start; height: 78px; }
.jmc-editor .jmc-reference-purpose { position: absolute; right: -2px; bottom: -20px; left: -2px; overflow: hidden; height: 18px; min-height: 0; padding: 0 2px; border: 1px solid #ffffff16; border-radius: 4px; background: #28282b; color: #c4c4cc; font: 10px/16px "PingFang SC", "Microsoft YaHei", Arial, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.jmc-editor .jmc-reference-purpose:hover { background: #3b3b40; color: #fff; }
.jmc-editor .jmc-reference-purpose:disabled { color: #8e8e97; cursor: not-allowed; }
.jmc-editor .jmc-reference-mapping-status { flex-basis: 100%; margin: 4px 0; color: #d4b48b; }

/* U-010 text-only reference parity. Other node types retain their existing rules. */
.jmc-editor .jmc-node[data-type="text"] > .jmc-node-body { font: 13px/22px "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; color: rgba(255,255,255,.85); }
.jmc-editor .jmc-rich-text { white-space: normal; overflow-wrap: anywhere; }
.jmc-editor .jmc-rich-text:empty::before, .jmc-editor .jmc-rich-text:has(> p:only-child:empty)::before { content: attr(data-placeholder); color: #ffffff60; pointer-events: none; }
.jmc-editor .jmc-rich-text > :first-child { margin-top: 0; }
.jmc-editor .jmc-rich-text p { margin: 0; }
.jmc-editor .jmc-rich-text p + p { margin-top: 8px; }
.jmc-editor .jmc-rich-text h1 { font-size: 26px; line-height: 1.4; margin: 16px 0 8px; font-weight: 600; }
.jmc-editor .jmc-rich-text h2 { font-size: 22px; line-height: 1.4; margin: 14px 0 8px; font-weight: 600; }
.jmc-editor .jmc-rich-text h3 { font-size: 18px; line-height: 1.4; margin: 12px 0 6px; font-weight: 600; }
.jmc-editor .jmc-rich-text ul, .jmc-editor .jmc-rich-text ol { margin: 8px 0; padding-left: 24px; }
.jmc-editor .jmc-rich-text ul { list-style: disc; }
.jmc-editor .jmc-rich-text ol { list-style: decimal; }
.jmc-editor .jmc-rich-text blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid #ffffff30; color: #ffffff99; }
.jmc-editor .jmc-rich-text [contenteditable] { user-select: text; }
.jmc-editor .jmc-node[data-type="text"] .jmc-selection-toolbar { background: #242424; }
.jmc-editor .jmc-node[data-type="text"] .jmc-selection-toolbar button { width: 32px; height: 32px; padding: 8px; color: #fff; }
.jmc-editor .jmc-node[data-type="text"] .jmc-selection-toolbar button svg { width: 16px; height: 16px; }
.jmc-editor .jmc-node[data-type="text"] .jmc-selection-toolbar .jmc-background-button { width: auto; min-width: 76px; gap: 4px; font-size: 13px; }
.jmc-editor .jmc-text-color-menu { flex-direction: row; gap: 6px; width: 214px; height: 40px; min-height: 40px; padding: 5px 8px; overflow: visible; background: #262626; border-radius: 8px; }
.jmc-editor .jmc-text-color-menu > button { display: grid; place-items: center; width: 28px; min-width: 28px; height: 28px; min-height: 28px; padding: 3px; border: 2px solid transparent; border-radius: 6px; background: transparent; }
.jmc-editor .jmc-text-color-menu > button:hover { border-color: #ffffff40; background: transparent; }
.jmc-editor .jmc-text-color-menu > button[aria-checked="true"] { border-color: #fff; background: transparent; }
.jmc-editor .jmc-text-color-menu .jmc-swatch { width: 20px; height: 20px; border: 1px solid #ffffff14; border-radius: 3px; }
.jmc-editor .is-text-editing > :is(.jmc-selection-toolbar,.jmc-generator,.jmc-port,.jmc-resize) { visibility: hidden; pointer-events: none; }
.jmc-editor .jmc-text-format-toolbar { position: relative; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 2px; height: 40px; padding: 4px; border: 1px solid #ffffff08; border-radius: 12px; background: #242424; color: #fff; }
.jmc-editor .jmc-text-format-toolbar.is-inline { position: absolute; top: calc(-76px * var(--jmc-inverse, 1)); left: 50%; width: max-content; transform: translateX(-50%) scale(var(--jmc-inverse,1)); transform-origin: top center; }
.jmc-editor .jmc-text-format-toolbar > button { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 32px; padding: 8px; border: 0; border-radius: 6px; background: transparent; color: #fff; }
.jmc-editor .jmc-text-format-toolbar > button:hover, .jmc-editor .jmc-text-format-toolbar > button[aria-pressed="true"] { background: #ffffff14; }
.jmc-editor .jmc-text-format-toolbar svg { flex-shrink: 0; width: 16px; height: 16px; }
.jmc-editor .jmc-text-format-toolbar > button.has-chevron { width: 48px; flex-basis: 48px; gap: 2px; }
.jmc-editor .jmc-text-format-toolbar > button.has-chevron svg:last-child { width: 12px; height: 12px; }
.jmc-editor .jmc-text-format-divider { display: block; width: 1px; height: 16px; margin: 0 4px; background: #ffffff08; flex-shrink: 0; }
.jmc-editor .jmc-text-format-menu { position: absolute; z-index: 10; top: calc(100% + 2px); width: 200px; display: flex; flex-direction: column; padding: 4px; border-radius: 8px; background: #262626; box-shadow: 0 8px 30px #0004; }
.jmc-editor .jmc-text-format-menu > button { width: 100%; min-height: 36px; padding: 7px 12px; border: 0; border-radius: 4px; background: transparent; color: #fff; text-align: left; font-size: 14px; line-height: 22px; }
.jmc-editor .jmc-text-format-menu > button:hover { background: #ffffff14; }
.jmc-editor .jmc-text-fullscreen { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 0 60px; background: #121212; overflow: hidden; }
.jmc-editor .jmc-text-full-header { display: flex; flex: 0 0 84px; align-items: flex-start; justify-content: space-between; width: 100%; padding-top: 28px; }
.jmc-editor .jmc-text-full-header h2 { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; color: #fff; font: 500 14px/22px "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; }
.jmc-editor .jmc-text-full-header svg { width: 16px; height: 16px; }
.jmc-editor .jmc-text-full-actions { display: flex; align-items: center; gap: 16px; }
.jmc-editor .jmc-text-full-actions button { display: flex; align-items: center; justify-content: center; gap: 4px; height: 36px; padding: 8px 16px; border: 0; border-radius: 8px; color: #fff; background: #262626; }
.jmc-editor .jmc-text-full-actions button.jmc-text-close { width: 36px; padding: 8px; background: transparent; }
.jmc-editor .jmc-text-full-actions button.jmc-text-close svg { width: 24px; height: 24px; }
.jmc-editor .jmc-text-format-toolbar.is-fullscreen { width: min(1320px, 100%); flex-shrink: 0; border: 0; border-radius: 12px 12px 0 0; background: #1a1a1a; }
.jmc-editor .jmc-text-full-body { width: min(1320px, 100%); flex: 1 1 auto; min-height: 0; overflow: auto; border-top: 1px solid #ffffff06; background: #1a1a1a; scrollbar-width: thin; }
.jmc-editor .jmc-text-full-content { width: min(800px, calc(100% - 48px)); min-height: 100%; margin: 0 auto; padding: 20px 0 60px; outline: none; color: #fff; user-select: text; font: 16px/26px "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; }
.jmc-editor .jmc-text-full-content p + p { margin-top: 16px; }
.jmc-editor .jmc-node[data-type="text"] .jmc-generator { background: #1e1e1e; }
.jmc-editor .jmc-node[data-type="text"] .jmc-generator-prompt { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; font-size: 13px; line-height: 24px; }
@media (max-width: 680px) { .jmc-editor .jmc-text-fullscreen { padding-inline: 16px; } .jmc-editor .jmc-text-format-toolbar { flex-wrap: wrap; height: auto; min-height: 40px; } .jmc-editor .jmc-text-full-header { height: 72px; flex-basis: 72px; } }
