/* =========================================================================
   EFL Full Studio — dynamic node-graph engine styles (.efl-g-*)
   Coexists with public.css (which styles the shell). Canonical dark palette
   (Image Studio) + light overrides via html[data-theme="light"].
   ========================================================================= */
.efl-fs {
	--g-bg: #070b15;
	--g-node: #0a0e1f;
	--g-node-2: #0d1226;
	--g-line: rgba(255, 255, 255, .10);
	--g-text: #e8ecf7;
	--g-muted: rgba(232, 236, 247, .58);
	--g-cyan: #00efff;
	--g-purple: #8d4dff;
	--g-pink: #ff5db1;
	--g-grad: linear-gradient(135deg, #4f6dfb, #8d4dff 55%, #ff5db1);
	--g-ok: #34d399;
	--g-amber: #fbbf24;
	--g-red: #f87171;
}

/* ---- Node ---- */
.efl-g-node {
	position: absolute;
	width: 248px;
	background: linear-gradient(180deg, var(--g-node-2), var(--g-node));
	border: 1px solid var(--g-line);
	border-radius: 16px;
	box-shadow: 0 24px 60px -28px rgba(0, 0, 0, .8);
	color: var(--g-text);
	user-select: none;
	cursor: grab;
	transition: border-color .15s ease, box-shadow .2s ease, transform .12s ease;
}
.efl-g-node:active { cursor: grabbing; }
.efl-g-node.is-selected { border-color: rgba(141, 77, 255, .8); box-shadow: 0 0 0 1px rgba(141, 77, 255, .5), 0 28px 70px -26px rgba(141, 77, 255, .5); }
.efl-g-node.is-running { border-color: rgba(0, 239, 255, .55); }
.efl-g-node.is-done { border-color: rgba(52, 211, 153, .4); }
.efl-g-node.is-error { border-color: rgba(248, 113, 113, .5); }

/* role accent strip on the left edge */
.efl-g-node::before {
	content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px;
	background: var(--g-muted); opacity: .7;
}
.efl-g-node--project::before { background: var(--g-grad); opacity: 1; }
.efl-g-node--input::before { background: linear-gradient(180deg, #38bdf8, #4f6dfb); }
.efl-g-node--operation::before { background: linear-gradient(180deg, #8d4dff, #ff5db1); }
.efl-g-node--output::before { background: linear-gradient(180deg, #34d399, #00efff); }
.efl-g-node--util::before { background: rgba(255, 255, 255, .25); }

.efl-g-node-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px 18px; }
.efl-g-node-kind { font-size: 13px; font-weight: 700; letter-spacing: .01em; }
.efl-g-node-body { padding: 0 14px 12px 18px; font-size: 12px; min-height: 18px; }
.efl-g-kv { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.efl-g-kv span { color: var(--g-muted); }
.efl-g-kv b { font-weight: 600; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efl-g-snip { margin: 2px 0 0; color: var(--g-text); line-height: 1.5; }
.efl-g-muted { margin: 2px 0 0; color: var(--g-muted); }
.efl-g-err { margin: 2px 0 0; color: var(--g-red); }

/* ---- YouTube preview card (video-link node) ---- */
.efl-g-yt { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.efl-g-yt-thumb {
	position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
	background: rgba(127, 127, 127, .14); border: 1px solid var(--g-line);
}
.efl-g-yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.efl-g-yt-thumb.is-broken { aspect-ratio: auto; height: 0; border: 0; } /* collapse gracefully if the image 404s */
.efl-g-yt-badge {
	position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; border-radius: 4px;
	background: rgba(0, 0, 0, .82); color: #fff; font-size: 11px; font-weight: 600; line-height: 1.45; letter-spacing: .02em;
}
.efl-g-yt-info { display: flex; flex-direction: column; gap: 3px; }
.efl-g-yt-title {
	color: var(--g-text); font-size: 12.5px; font-weight: 600; line-height: 1.35;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.efl-g-yt-title.is-loading { color: var(--g-muted); font-weight: 500; font-style: italic; }
.efl-g-yt-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--g-muted); font-size: 11.5px; }
.efl-g-yt-sep { opacity: .55; }

.efl-g-node-act {
	display: block; width: calc(100% - 28px); margin: 0 14px 14px 14px;
	border: 1px solid var(--g-line); background: rgba(255, 255, 255, .04); color: var(--g-text);
	font-size: 12px; font-weight: 650; padding: 8px 10px; border-radius: 10px; cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}
.efl-g-node-act:hover { background: rgba(141, 77, 255, .16); border-color: rgba(141, 77, 255, .6); }

.efl-g-pill { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.efl-g-pill--running { color: var(--g-cyan); background: rgba(0, 239, 255, .14); }
.efl-g-pill--done { color: var(--g-ok); background: rgba(52, 211, 153, .14); }
.efl-g-pill--error { color: var(--g-red); background: rgba(248, 113, 113, .14); }

/* ---- Ports ---- */
.efl-g-port {
	position: absolute; top: 50%; width: 15px; height: 15px; margin-top: -7.5px;
	border-radius: 50%; background: var(--g-node); border: 2px solid var(--g-purple); z-index: 2;
	transition: transform .12s ease, box-shadow .12s ease;
}
.efl-g-port--in { left: -8px; border-color: #4f6dfb; }
.efl-g-port--out { right: -8px; cursor: crosshair; }
.efl-g-port--out:hover { transform: scale(1.25); box-shadow: 0 0 0 5px rgba(141, 77, 255, .22); }

/* ---- Wires ---- */
.efl-g-wire { fill: none; stroke: url(#efl-g-grad); stroke-width: 2.5; opacity: .45; }
.efl-g-wire.is-active { opacity: 1; stroke-width: 3; filter: drop-shadow(0 0 6px rgba(141, 77, 255, .5)); }
.efl-g-wire.is-pending { opacity: .9; stroke-dasharray: 7 6; }

/* ---- The transformation moment ---- */
@keyframes efl-g-mutate {
	0% { box-shadow: 0 0 0 0 rgba(0, 239, 255, .0), 0 24px 60px -28px rgba(0, 0, 0, .8); }
	40% { box-shadow: 0 0 0 6px rgba(0, 239, 255, .28), 0 0 40px 6px rgba(141, 77, 255, .45); }
	100% { box-shadow: 0 0 0 0 rgba(0, 239, 255, .0), 0 24px 60px -28px rgba(0, 0, 0, .8); }
}
.efl-g-node.is-mutating { animation: efl-g-mutate 1.1s ease-in-out infinite; }
.efl-g-node.is-mutating::after {
	content: ""; position: absolute; inset: -1px; border-radius: 16px; pointer-events: none;
	background: linear-gradient(120deg, transparent, rgba(0, 239, 255, .12), transparent);
	background-size: 220% 100%; animation: efl-g-sheen 1.1s linear infinite;
}
@keyframes efl-g-sheen { 0% { background-position: 220% 0; } 100% { background-position: -120% 0; } }

/* ---- Create menu (Unreal-style) ---- */
.efl-g-menu {
	position: fixed; z-index: 2147483600; width: 240px; max-height: 320px; display: flex; flex-direction: column;
	background: #0b1022; border: 1px solid var(--g-line); border-radius: 12px;
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .85); overflow: hidden;
	animation: efl-g-pop .12s ease;
}
@keyframes efl-g-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.efl-g-menu-search {
	margin: 8px; padding: 8px 10px; border: 1px solid var(--g-line); border-radius: 8px;
	background: rgba(255, 255, 255, .05); color: var(--g-text); font-size: 13px; font-family: inherit; outline: none;
}
.efl-g-menu-search:focus { border-color: var(--g-purple); }
.efl-g-menu-list { overflow-y: auto; padding: 0 6px 8px; scrollbar-width: thin; }
.efl-g-menu-item {
	display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
	border: 0; background: transparent; color: var(--g-text); font-size: 13px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.efl-g-menu-item:hover { background: rgba(141, 77, 255, .16); }
.efl-g-menu-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; background: var(--g-muted); }
.efl-g-menu-dot--input { background: #4f6dfb; }
.efl-g-menu-dot--operation { background: #8d4dff; }
.efl-g-menu-dot--output { background: #34d399; }
.efl-g-menu-dot--util { background: #14b8a6; }
html[data-theme="light"] .efl-g-menu-dot--util { background: #0d9488; }
.efl-g-menu-head { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--g-muted); }

/* Grouped submenu: a category header that reveals its items inline on hover (or tap on touch), and
   flattens out while the user is searching so every item stays findable. */
.efl-g-menu-grouphead {
	display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
	border: 0; background: transparent; color: var(--g-text); font-size: 13px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.efl-g-menu-grouphead:hover { background: rgba(141, 77, 255, .16); }
.efl-g-menu-caret { margin-left: auto; color: var(--g-muted); font-size: 15px; line-height: 1; transition: transform .12s ease; }
.efl-g-submenu { display: none; margin: 1px 0 4px 14px; padding-left: 8px; border-left: 1px solid var(--g-line); }
.efl-g-menu-group:hover > .efl-g-submenu,
.efl-g-menu-group.open > .efl-g-submenu { display: block; }
.efl-g-menu-group:hover > .efl-g-menu-grouphead .efl-g-menu-caret,
.efl-g-menu-group.open > .efl-g-menu-grouphead .efl-g-menu-caret { transform: rotate(90deg); }
.efl-g-menu.searching .efl-g-submenu { display: block; margin-left: 0; padding-left: 0; border-left: 0; }
.efl-g-menu.searching .efl-g-menu-grouphead { display: none; }

/* ---- Direct Script panel (modal-style; appended inside the region for fullscreen) ---- */
.efl-g-panel-bg { position: fixed; inset: 0; z-index: 2147483601; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(3, 6, 14, .66); animation: efl-g-pop .14s ease; }
.efl-g-panel { width: 100%; max-width: 640px; max-height: 86vh; display: flex; flex-direction: column; background: #0b1022; border: 1px solid var(--g-line); border-radius: 16px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .85); overflow: hidden; }
.efl-g-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--g-line); }
.efl-g-panel-head h3 { margin: 0; font-size: 16px; color: var(--g-text); }
.efl-g-panel-x { border: 0; background: transparent; color: var(--g-muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.efl-g-panel-x:hover { color: var(--g-text); }
.efl-g-panel-body { padding: 16px 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--g-line) transparent; }
.efl-g-panel-body::-webkit-scrollbar { width: 10px; }
.efl-g-panel-body::-webkit-scrollbar-track { background: transparent; }
.efl-g-panel-body::-webkit-scrollbar-thumb { background: var(--g-line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.efl-g-panel-body::-webkit-scrollbar-thumb:hover { background: var(--g-muted); }
.efl-g-panel-body textarea { max-height: 320px; }
.efl-g-panel-save { width: 100%; margin-top: 4px; }
.efl-g-srclist { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.efl-g-srcrow { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--g-line); border-radius: 9px; background: rgba(255, 255, 255, .03); }
.efl-g-srcnum { flex: 0 0 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--g-purple); color: #fff; font-size: 11px; font-weight: 700; }
.efl-g-srcmeta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.efl-g-srcmeta b { font-size: 12px; color: var(--g-text); }
.efl-g-srcmeta span { font-size: 11px; color: var(--g-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.efl-g-panel--sm { max-width: 460px; }
.efl-g-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 10px; font-size: 12px; }
.efl-g-crumb { background: none; border: 0; color: var(--g-purple); cursor: pointer; padding: 2px 4px; border-radius: 6px; font-size: 12px; }
.efl-g-crumb:hover { background: rgba(255, 255, 255, .06); }
.efl-g-crumb-sep { color: var(--g-muted); opacity: .6; }
.efl-g-browse { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--g-line) transparent; }
.efl-g-browse::-webkit-scrollbar { width: 10px; }
.efl-g-browse::-webkit-scrollbar-thumb { background: var(--g-line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.efl-g-browse-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--g-line); border-radius: 9px; background: rgba(255, 255, 255, .03); color: var(--g-text); cursor: pointer; font-size: 13px; }
.efl-g-browse-row:hover { border-color: var(--g-purple); background: rgba(255, 255, 255, .06); }
.efl-g-browse-ic { flex: 0 0 auto; font-size: 15px; }
.efl-g-browse-nm { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.efl-g-browse-mt { flex: 0 0 auto; font-size: 11px; color: var(--g-muted); max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.efl-g-savebtn.is-dirty { border-color: var(--g-purple); }
.efl-g-panel-row { display: flex; gap: 12px; }
.efl-g-panel-row .efl-g-field { flex: 1; }
.efl-g-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--g-text); margin: 2px 0 4px; cursor: pointer; }
.efl-g-check input { margin: 0; }
.efl-g-field--sm { flex: 0 0 92px !important; }
.efl-g-panel-gen { width: 100%; }
.efl-g-panel-out { margin-top: 14px; }
html[data-theme="light"] .efl-g-panel { background: #fff; }
html[data-theme="light"] .efl-g-panel-bg { background: rgba(20, 28, 56, .42); }

/* ---- Inspector additions ---- */
.efl-g-field { display: block; margin-bottom: 12px; }
.efl-g-field > span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--g-muted); margin-bottom: 6px; }
.efl-g-field input, .efl-g-field select, .efl-g-field textarea {
	width: 100%; box-sizing: border-box; border: 1px solid var(--g-line); border-radius: 9px;
	background: rgba(255, 255, 255, .05); color: var(--g-text); font-size: 13px; padding: 9px 11px; font-family: inherit; resize: vertical;
}
.efl-g-field input:focus, .efl-g-field select:focus, .efl-g-field textarea:focus { outline: none; border-color: var(--g-purple); box-shadow: 0 0 0 3px rgba(141, 77, 255, .18); }
.efl-g-field select {
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
	color-scheme: dark; cursor: pointer; padding-right: 34px;
	background-color: rgba(255, 255, 255, .05);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a9b1d6' d='M6 8 0 2l1.4-1.4L6 5.2 10.6.6 12 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
}
.efl-g-field select option { background: #0b1022; color: var(--g-text); }
.efl-g-field input[type="number"] { color-scheme: dark; }
html[data-theme="light"] .efl-g-field select { color-scheme: light; background-color: #ffffff; }
html[data-theme="light"] .efl-g-field select option { background: #ffffff; color: #1a1a2e; }
html[data-theme="light"] .efl-g-field input[type="number"] { color-scheme: light; }
.efl-g-run { width: 100%; margin-top: 2px; }
.efl-g-result { margin-top: 12px; }
.efl-g-result label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--g-muted); margin-bottom: 6px; }
.efl-g-result-box { white-space: pre-wrap; font-size: 12.5px; line-height: 1.55; color: var(--g-text); background: rgba(255, 255, 255, .04); border: 1px solid var(--g-line); border-radius: 10px; padding: 11px 12px; max-height: 260px; overflow: auto; scrollbar-width: thin; }
.efl-g-note { font-size: 12.5px; color: var(--g-muted); line-height: 1.5; margin: 0 0 12px; }
.efl-g-del { width: 100%; margin-top: 8px; color: var(--g-red); border-color: rgba(248, 113, 113, .4); background: transparent; }
.efl-g-del:hover { background: rgba(248, 113, 113, .12); }

/* ---- Storyboard inspector list ---- */
.efl-g-sb-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.efl-g-sb-row { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--g-line); border-radius: 10px; background: rgba(255, 255, 255, .03); }
.efl-g-sb-thumb { width: 52px; height: 34px; flex: 0 0 52px; object-fit: cover; border-radius: 6px; background: rgba(255, 255, 255, .06); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--g-muted); }
.efl-g-sb-thumb.is-empty { border: 1px dashed var(--g-line); }
.efl-g-sb-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.efl-g-sb-meta b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efl-g-sb-meta span { font-size: 11.5px; color: var(--g-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.efl-g-sb-open { flex: 0 0 auto; padding: 6px 12px; font-size: 12px; }
html[data-theme="light"] .efl-g-sb-row { background: rgba(20, 28, 56, .03); }

/* ---- Toast ---- */
.efl-g-toast {
	position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); z-index: 2147483600;
	background: #0b1022; border: 1px solid var(--g-line); color: var(--g-text);
	font-size: 13px; padding: 11px 18px; border-radius: 11px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
	opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; max-width: 80vw;
}
.efl-g-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.efl-g-toast.is-err { border-color: rgba(248, 113, 113, .5); }

/* ---- Opt-in overlay (sits over the classic canvas; hidden until toggled) ---- */
.efl-g-overlay { position: absolute; inset: 0; display: none; z-index: 5; }
.efl-g-overlay.is-on { display: block; background: radial-gradient(circle at 20% 20%, rgba(141, 77, 255, .08), transparent 50%), var(--g-bg); }
.efl-g-overlay .efl-g-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; width: 1px; height: 1px; }
.efl-g-overlay .efl-g-links { position: absolute; top: 0; left: 0; width: 6000px; height: 4000px; overflow: visible; pointer-events: none; }
.efl-g-overlay .efl-g-nodes { position: absolute; top: 0; left: 0; }
.efl-g-emptyhint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; font-size: 13px; color: var(--g-muted); pointer-events: none; max-width: 340px; }
.efl-g-toggle.is-on { background: linear-gradient(135deg, #4f6dfb, #8d4dff 55%, #ff5db1); border: 0; color: #fff; }

/* ---- Resize handle (bottom-right corner) ---- */
.efl-g-resize {
	position: absolute; right: 3px; bottom: 3px; width: 16px; height: 16px; cursor: nwse-resize; z-index: 3;
	opacity: 0; transition: opacity .12s ease;
	background:
		linear-gradient(135deg, transparent 0 50%, var(--g-muted) 50% 60%, transparent 60% 70%, var(--g-muted) 70% 80%, transparent 80%);
	border-bottom-right-radius: 14px;
}
.efl-g-node:hover .efl-g-resize, .efl-g-node.is-selected .efl-g-resize { opacity: .85; }

/* ---- Fullscreen (maximize the canvas + inspector; hide chrome) ---- */
.efl-fs:fullscreen {
	background: var(--g-bg); display: flex; flex-direction: column; padding: 14px; gap: 12px; overflow: hidden;
}
html[data-theme="light"] .efl-fs:fullscreen { background: #eef1f8; }
.efl-fs:fullscreen .efl-fs-bar, .efl-fs:fullscreen .efl-fs-bottom { display: none; }
.efl-fs:fullscreen .efl-fs-board { flex: 1 1 auto; min-height: 0; }
.efl-fs.is-fs .efl-fs-canvas { border-radius: 12px; }

/* ---- Light theme ---- */
html[data-theme="light"] .efl-fs {
	--g-bg: #eef1f8; --g-node: #ffffff; --g-node-2: #f7f9ff;
	--g-line: rgba(20, 28, 56, .12); --g-text: #1b2440; --g-muted: rgba(27, 36, 64, .58);
}
html[data-theme="light"] .efl-g-node-act { background: rgba(20, 28, 56, .03); }
html[data-theme="light"] .efl-g-node-act:hover { background: rgba(141, 77, 255, .12); }
html[data-theme="light"] .efl-g-menu { background: #ffffff; }
html[data-theme="light"] .efl-g-menu-search,
html[data-theme="light"] .efl-g-field input,
html[data-theme="light"] .efl-g-field select,
html[data-theme="light"] .efl-g-field textarea { background: #ffffff; }
html[data-theme="light"] .efl-g-result-box { background: rgba(20, 28, 56, .03); }
html[data-theme="light"] .efl-g-toast { background: #ffffff; }
html[data-theme="light"] .efl-g-port { background: #ffffff; }

/* =========================================================================
   EFL Assistant — a full chat that lives inside a canvas node. Themed with
   the same --g-* variables, so it follows dark/light automatically. The
   thread grows with the conversation (no internal scroll) so the per-reply
   ports are never clipped; each AI reply carries its own output port at the
   node's right edge, and the left port takes wired-in context.
   ========================================================================= */
.efl-aiw {
	width: 380px;
	padding: 0;
	overflow: visible;            /* the node-edge reply ports must not be clipped */
	display: flex;
	flex-direction: column;
	cursor: default;
}
.efl-g-node--assistant { border-color: rgba(141, 77, 255, .38); }
.efl-g-node--assistant.is-selected { border-color: var(--g-purple); }

.efl-aiw-head {
	flex: 0 0 auto;
	display: flex; align-items: center; gap: 8px;
	padding: 10px 12px; border-bottom: 1px solid var(--g-line);
	background: rgba(141, 77, 255, .07);
	border-radius: 16px 16px 0 0;
	cursor: grab;                 /* the header is the drag handle */
}
.efl-aiw-mark { color: var(--g-purple); font-size: 13px; line-height: 1; }
.efl-aiw-title { flex: 1; font-weight: 700; font-size: 13px; color: var(--g-text); }
.efl-aiw-model {
	max-width: 46%; padding: 4px 6px; font-size: 11.5px;
	border: 1px solid var(--g-line); border-radius: 8px;
	background: var(--g-node); color: var(--g-text); outline: none; cursor: pointer;
}

.efl-aiw-srcs {
	flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 5px;
	padding: 8px 12px; max-height: 58px; overflow-y: auto;
	border-bottom: 1px solid var(--g-line);
	scrollbar-width: thin; scrollbar-color: var(--g-line) transparent;
}
.efl-aiw-src {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 2px 8px; font-size: 10.5px; border-radius: 999px; white-space: nowrap;
	background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .35); color: var(--g-text);
}

.efl-aiw-thread {
	flex: 1 1 auto; min-height: 0;       /* the scrollable region inside the fixed-height node */
	padding: 12px; display: flex; flex-direction: column; gap: 10px;
	overflow-y: auto; overflow-x: hidden;
	scrollbar-width: thin; scrollbar-color: var(--g-line) transparent;
}
.efl-aiw-thread::-webkit-scrollbar { width: 8px; }
.efl-aiw-thread::-webkit-scrollbar-thumb { background: var(--g-line); border-radius: 8px; }
.efl-aiw-empty { color: var(--g-muted); font-size: 12.5px; line-height: 1.6; }

.efl-aiw-row { display: flex; }
.efl-aiw-row--user { justify-content: flex-end; }
.efl-aiw-row--ai { justify-content: flex-start; }
.efl-aiw-bubble {
	max-width: 86%; padding: 9px 12px; border-radius: 14px;
	font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
	color: var(--g-text);
}
.efl-aiw-row--user .efl-aiw-bubble { background: var(--g-grad); color: #fff; border-bottom-right-radius: 5px; }
.efl-aiw-row--ai .efl-aiw-bubble { background: rgba(127, 127, 127, .14); border: 1px solid var(--g-line); border-bottom-left-radius: 5px; }
/* each reply's output port: parked on the node's right edge by layoutAssistantPorts (sets style.top). */
.efl-aiw-port { cursor: crosshair; z-index: 3; }

.efl-aiw-typing { display: inline-flex; gap: 4px; align-items: center; }
.efl-aiw-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--g-muted); animation: efl-aiw-blink 1s infinite both; }
.efl-aiw-typing i:nth-child(2) { animation-delay: .2s; }
.efl-aiw-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes efl-aiw-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.efl-aiw-chips { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.efl-aiw-chip {
	padding: 4px 10px; font-size: 11px; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--g-line); background: rgba(141, 77, 255, .08); color: var(--g-text);
}
.efl-aiw-chip:hover { background: rgba(141, 77, 255, .18); }
.efl-aiw-suggest {
	display: inline-flex; align-items: center; gap: 6px;
	background: rgba(141, 77, 255, .14); border-color: rgba(141, 77, 255, .45); font-weight: 600;
}
.efl-aiw-suggest:hover { background: rgba(141, 77, 255, .26); }
.efl-aiw-arr { opacity: .7; font-weight: 400; }

.efl-aiw-input { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--g-line); border-radius: 0 0 16px 16px; }
.efl-aiw-text {
	flex: 1; resize: none; min-height: 38px; max-height: 110px;
	padding: 9px 12px; font-family: inherit; font-size: 12.5px; line-height: 1.4;
	border: 1px solid var(--g-line); border-radius: 12px;
	background: var(--g-node); color: var(--g-text); outline: none;
}
.efl-aiw-text:focus { border-color: var(--g-purple); }
.efl-aiw-send {
	flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
	background: var(--g-grad); color: #fff; font-size: 16px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
}
.efl-aiw-send:hover { filter: brightness(1.08); }
.efl-aiw.is-busy .efl-aiw-send { opacity: .5; pointer-events: none; }

/* Light theme: form controls on white, AI bubble a touch darker for contrast. */
html[data-theme="light"] .efl-aiw-model,
html[data-theme="light"] .efl-aiw-text { background: #ffffff; color-scheme: light; }
html[data-theme="light"] .efl-aiw-model option { background: #ffffff; color: #1b2440; }
html[data-theme="light"] .efl-aiw-row--ai .efl-aiw-bubble { background: rgba(20, 28, 56, .045); }

/* =========================================================================
   Group — a resizable container that visually holds nodes and gathers their
   data. Painted behind its members, so it reads as a frame/zone. Themed with
   the shared --g-* variables.
   ========================================================================= */
.efl-grp {
	background: rgba(141, 77, 255, .06);
	border: 1.5px dashed var(--g-line);
	box-shadow: none;
}
.efl-g-node--group::before { display: none; }
.efl-grp.is-selected { border-style: solid; border-color: var(--g-purple); box-shadow: 0 0 0 1px rgba(141, 77, 255, .4); }
.efl-grp-head {
	position: absolute; top: 0; left: 0; right: 0;
	display: flex; align-items: center; gap: 7px;
	padding: 8px 12px; border-radius: 15px 15px 0 0;
	background: rgba(141, 77, 255, .10);
	cursor: grab;
}
.efl-grp-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--g-purple); }
.efl-grp-title { font-weight: 700; font-size: 12.5px; color: var(--g-text); }
html[data-theme="light"] .efl-grp { background: rgba(141, 77, 255, .05); }

.efl-grp-title { cursor: text; }
.efl-editable-title { cursor: text; padding: 1px 4px; border-radius: 5px; }
.efl-editable-title.is-editing { background: var(--g-node); outline: 1px solid var(--g-purple); cursor: text; }

/* Magnetic wire target: the input port the wire will snap to lights up while dragging. */
.efl-g-port--in.is-wire-target {
	background: var(--g-cyan);
	border-color: var(--g-cyan);
	transform: scale(1.7);
	box-shadow: 0 0 0 4px rgba(0, 239, 255, .25), 0 0 14px 2px rgba(0, 239, 255, .55);
}

/* ---- Channel card (Get Channel) — theme-aware via the --g-* tokens ---- */
.efl-chan { width: 360px; }
.efl-chan::before { display: none; } /* the banner replaces the role accent */
.efl-chan-banner {
	height: 70px; border-radius: 15px 15px 0 0;
	background: var(--g-grad) center/cover no-repeat;
}
.efl-chan-top { display: flex; align-items: flex-end; gap: 10px; padding: 0 14px; margin-top: -26px; }
.efl-chan-ava {
	width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none;
	border: 3px solid var(--g-node); background: var(--g-node-2);
	box-shadow: 0 3px 12px rgba(0, 0, 0, .4);
}
.efl-chan-ava--ph { display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: var(--g-text); }
.efl-chan-id { flex: 1 1 auto; min-width: 0; padding-bottom: 2px; }
.efl-chan-title { font-size: 15px; font-weight: 700; color: var(--g-text); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block; max-width: 100%; }
.efl-chan-handle { font-size: 12px; color: var(--g-muted); margin-top: 1px; }
.efl-chan-open { flex: none; align-self: flex-end; color: var(--g-muted); text-decoration: none; font-size: 15px; padding: 2px 5px; border-radius: 7px; }
.efl-chan-open:hover { color: var(--g-cyan); background: var(--g-node-2); }
.efl-chan-stats { display: flex; gap: 6px; padding: 12px 14px 0; }
.efl-chan-stats span { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10px; color: var(--g-muted); text-align: center; background: var(--g-node-2); border: 1px solid var(--g-line); border-radius: 9px; padding: 7px 4px; }
.efl-chan-stats b { font-size: 14px; font-weight: 700; color: var(--g-text); }
.efl-chan-desc { padding: 11px 14px 0; font-size: 11px; line-height: 1.5; color: var(--g-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.efl-chan-vids-h { padding: 13px 14px 6px; font-size: 10px; font-weight: 700; color: var(--g-text); text-transform: uppercase; letter-spacing: .05em; }
.efl-chan-vids { max-height: 248px; overflow-y: auto; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 3px; scrollbar-width: thin; scrollbar-color: var(--g-line) transparent; }
.efl-chan-vids::-webkit-scrollbar { width: 10px; }
.efl-chan-vids::-webkit-scrollbar-track { background: transparent; }
.efl-chan-vids::-webkit-scrollbar-thumb { background: var(--g-line); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.efl-chan-vids::-webkit-scrollbar-thumb:hover { background: var(--g-muted); }
.efl-chan-vid { display: flex; gap: 9px; align-items: center; padding: 5px 6px; border-radius: 9px; text-decoration: none; transition: background .12s ease; }
.efl-chan-vid:hover { background: var(--g-node-2); }
.efl-chan-thumb { flex: none; width: 68px; height: 38px; border-radius: 6px; background: var(--g-node-2) center/cover no-repeat; }
.efl-chan-vmeta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.efl-chan-vtitle { font-size: 11px; color: var(--g-text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.efl-chan-vviews { font-size: 10px; color: var(--g-muted); }
.efl-chan-load { padding: 30px 16px; text-align: center; color: var(--g-muted); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 11px; }
.efl-chan-spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--g-line); border-top-color: var(--g-cyan); animation: efl-chan-spin .8s linear infinite; }
@keyframes efl-chan-spin { to { transform: rotate(360deg); } }

/* ---- Shared source-card layout — used by the Document and Media (audio/video/image) nodes.
   Theme-aware via the --g-* tokens. ---- */
.efl-tt { width: 340px; }
.efl-tt::before { display: none; } /* source cards carry no role accent */
.efl-tt-top { display: flex; align-items: center; gap: 10px; padding: 11px 14px 0; }
.efl-tt-id { flex: 1 1 auto; min-width: 0; }
.efl-tt-nameline { display: flex; align-items: center; gap: 5px; min-width: 0; }
.efl-tt-name { font-size: 14px; font-weight: 700; color: var(--g-text); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.efl-tt-load { padding: 30px 16px; text-align: center; color: var(--g-muted); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 11px; }
.efl-tt-spin { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--g-line); border-top-color: var(--g-pink); animation: efl-chan-spin .8s linear infinite; }

/* ---- Source-card error state + retry ---- */
.efl-tt-err { gap: 9px; }
.efl-tt-erricon { font-size: 22px; color: var(--g-pink); }
.efl-tt-errmsg { font-size: 11px; line-height: 1.45; color: var(--g-muted); max-width: 280px; }
.efl-tt-retry { margin-top: 4px; padding: 6px 16px; font-size: 12px; cursor: pointer; }

/* ---- Scrollable text box (Comments / Transcript node bodies) ---- */
.efl-tt-sub { font-size: 11px; line-height: 1.55; color: var(--g-text); background: var(--g-node-2); border-radius: 8px; padding: 8px 10px; max-height: 132px; overflow-y: auto; white-space: pre-wrap; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--g-line) transparent; }
.efl-tt-sub::-webkit-scrollbar { width: 8px; }
.efl-tt-sub::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.efl-tt-sub::-webkit-scrollbar-thumb { background: var(--g-line); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.efl-tt-sub::-webkit-scrollbar-thumb:hover { background: var(--g-muted); background-clip: padding-box; }

/* Source-card chips shared by the Document and Media nodes: icon chip, host/type line, saved badge. */
.efl-web-fav { width: 38px; height: 38px; border-radius: 9px; object-fit: contain; flex: none; padding: 5px; border: 1px solid var(--g-line); background: var(--g-node-2); }
.efl-web-fav--ph { display: flex; align-items: center; justify-content: center; font-size: 18px; }
.efl-web-host { font-size: 11px; color: var(--g-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.efl-web-saved { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11px; color: var(--g-muted); }
.efl-web-saved-ic { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--g-ok, #34d399); color: #06210f; font-size: 10px; font-weight: 800; flex: none; }

/* Document node + picker */
.efl-doc-ic { display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--g-grad); border: 0; }
.efl-doc-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.efl-doc-tab { flex: 1; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--g-line); background: transparent; color: var(--g-muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .12s ease; }
.efl-doc-tab:hover { color: var(--g-text); }
.efl-doc-tab.is-on { color: #fff; background: var(--g-grad); border-color: transparent; }
.efl-doc-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 18px; border: 1.5px dashed var(--g-line); border-radius: 12px; text-align: center; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.efl-doc-drop:hover, .efl-doc-drop.is-over { border-color: var(--g-purple); background: rgba(141, 77, 255, .07); }
.efl-doc-drop-ic { font-size: 30px; }
.efl-doc-drop-t { font-size: 14px; font-weight: 600; color: var(--g-text); }
.efl-doc-drop-s { font-size: 11px; color: var(--g-muted); }
.efl-doc-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; font-size: 12px; }
.efl-doc-crumb { border: 0; background: transparent; color: var(--g-cyan, #4f6dfb); cursor: pointer; padding: 2px 4px; border-radius: 6px; font-size: 12px; }
.efl-doc-crumb:hover { background: var(--g-node-2); }
.efl-doc-crumb-sep { color: var(--g-muted); }
.efl-doc-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; scrollbar-color: var(--g-line) transparent; }
.efl-doc-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 11px; border-radius: 9px; border: 1px solid transparent; background: var(--g-node-2); color: var(--g-text); cursor: pointer; transition: border-color .12s ease; }
.efl-doc-row:hover { border-color: var(--g-purple); }
.efl-doc-row-ic { font-size: 16px; flex: none; }
.efl-doc-row-ic--file { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; font-size: 9px; font-weight: 800; color: #fff; background: var(--g-grad); }
.efl-doc-row-n { flex: 1 1 auto; min-width: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.efl-doc-row-meta { flex: none; font-size: 11px; color: var(--g-muted); }
.efl-doc-empty { padding: 22px 10px; text-align: center; font-size: 12px; color: var(--g-muted); }

/* ====================================================================== *
 * Unified, theme-aware scrollbars + control polish (dark AND light).
 * Every scroll area inside the canvas, plus the floating menus and the
 * upload/asset modals, share one thin scrollbar that tracks --g-line /
 * --g-muted, so it reads correctly under both themes.
 * ====================================================================== */
.efl-fs *,
.efl-g-menu, .efl-g-menu *,
.efl-doc-list, .efl-g-browse, .efl-g-result-box {
	scrollbar-width: thin;
	scrollbar-color: var(--g-line, rgba(127,127,127,.3)) transparent;
}
.efl-fs ::-webkit-scrollbar,
.efl-g-menu ::-webkit-scrollbar,
.efl-g-menu-list::-webkit-scrollbar,
.efl-doc-list::-webkit-scrollbar,
.efl-g-result-box::-webkit-scrollbar { width: 10px; height: 10px; }
.efl-fs ::-webkit-scrollbar-track,
.efl-g-menu ::-webkit-scrollbar-track,
.efl-g-menu-list::-webkit-scrollbar-track,
.efl-doc-list::-webkit-scrollbar-track,
.efl-g-result-box::-webkit-scrollbar-track { background: transparent; }
.efl-fs ::-webkit-scrollbar-thumb,
.efl-g-menu ::-webkit-scrollbar-thumb,
.efl-g-menu-list::-webkit-scrollbar-thumb,
.efl-doc-list::-webkit-scrollbar-thumb,
.efl-g-result-box::-webkit-scrollbar-thumb {
	background: var(--g-line, rgba(127,127,127,.3));
	border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
.efl-fs ::-webkit-scrollbar-thumb:hover,
.efl-g-menu ::-webkit-scrollbar-thumb:hover,
.efl-g-menu-list::-webkit-scrollbar-thumb:hover,
.efl-doc-list::-webkit-scrollbar-thumb:hover,
.efl-g-result-box::-webkit-scrollbar-thumb:hover { background: var(--g-muted, rgba(127,127,127,.55)); }
.efl-fs ::-webkit-scrollbar-corner,
.efl-g-menu ::-webkit-scrollbar-corner { background: transparent; }

/* Light-theme legibility for the floating menus + crumb links (the menu can render
 * outside .efl-fs, so re-declare the vars it relies on under the light theme). */
html[data-theme="light"] .efl-g-menu {
	--g-line: rgba(20, 28, 56, .12); --g-text: #1b2440; --g-muted: rgba(27, 36, 64, .58); --g-node-2: #f7f9ff;
	border-color: rgba(20, 28, 56, .12); box-shadow: 0 24px 60px -28px rgba(20, 28, 56, .35);
}
html[data-theme="light"] .efl-g-menu-search { background: #f3f5fb; }
html[data-theme="light"] .efl-g-menu-item:hover,
html[data-theme="light"] .efl-g-menu-grouphead:hover { background: rgba(141, 77, 255, .12); }
html[data-theme="light"] .efl-doc-crumb { color: #4f6dfb; }
html[data-theme="light"] .efl-doc-row { background: #f5f7fd; }

/* Image source node — thumbnail preview of the attached image. */
.efl-img-prev { margin-top: 8px; border-radius: 9px; overflow: hidden; border: 1px solid var(--g-line); background: var(--g-node-2); }
.efl-img-prev img { display: block; width: 100%; max-height: 160px; object-fit: cover; }

/* Asset browser — image/video rows show a real thumbnail instead of a generic icon. */
.efl-doc-row-thumb { width: 30px; height: 30px; flex: none; border-radius: 7px; background-size: cover; background-position: center; background-repeat: no-repeat; background-color: var(--g-node-2); border: 1px solid var(--g-line); object-fit: cover; overflow: hidden; }
video.efl-doc-row-thumb { background: #000; }

/* ---- TikTok source node (card / list / transcript) ---- */
.efl-g-tt-card { display: flex; flex-direction: column; gap: 10px; }
.efl-g-tt-top { display: flex; align-items: flex-start; gap: 11px; }
.efl-g-tt-ava { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--g-line, #e2e4e9); }
.efl-g-tt-card { display: flex; flex-direction: column; gap: 8px; }
.efl-g-tt-coverbig { position: relative; display: block; width: 100%; height: 180px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: var(--g-line, #e2e4e9); text-decoration: none; cursor: pointer; }
.efl-g-tt-coverbig:hover { opacity: .95; }
.efl-g-tt-coverimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.efl-g-ig-cover { position: relative; display: block; width: 100%; height: 340px; flex: 0 0 auto; border-radius: 10px; overflow: hidden; background: #0b1022; text-decoration: none; cursor: pointer; }
.efl-g-ig-cover:hover { opacity: .95; }
.efl-g-ig-coverimg { width: 100%; height: 100%; object-fit: contain; display: block; }
html[data-theme="light"] .efl-g-ig-cover { background: #eef0f4; }
.efl-g-ig-phead { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.efl-g-ig-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #0b1022; }
.efl-g-ig-pmeta { min-width: 0; }
.efl-g-ig-vf { color: #3897f0; }
.efl-g-ig-bio { margin-top: 10px; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.efl-g-ig-extlink { display: inline-block; margin-top: 8px; font-size: 12px; color: #3897f0; text-decoration: none; word-break: break-all; }
.efl-g-ig-extlink:hover { text-decoration: underline; }
.efl-g-tt-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center; padding-left: 3px; pointer-events: none; }
.efl-g-tt-id { min-width: 0; }
.efl-g-tt-name { font-weight: 600; font-size: 13px; line-height: 1.25; }
.efl-g-tt-h { color: var(--g-muted, #667085); font-size: 11.5px; margin-top: 2px; overflow: hidden; }
.efl-g-tt-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.efl-g-tt-stat { background: var(--g-chip, rgba(0,0,0,.04)); border-radius: 8px; padding: 5px 9px; text-align: center; min-width: 58px; }
.efl-g-tt-stat b { display: block; font-size: 13px; }
.efl-g-tt-stat span { display: block; color: var(--g-muted, #667085); font-size: 10.5px; margin-top: 1px; }
.efl-g-tt-list { display: flex; flex-direction: column; gap: 2px; max-height: 300px; overflow: auto; }
.efl-g-tt-row { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 8px; }
.efl-g-tt-row:hover { background: var(--g-chip, rgba(0,0,0,.04)); }
.efl-g-tt-thumb { width: 34px; height: 44px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; background: var(--g-line, #e2e4e9); }
.efl-g-tt-thumb--ph { display: inline-flex; align-items: center; justify-content: center; color: var(--g-muted, #98a2b3); font-size: 14px; }
.efl-g-tt-rowtx { min-width: 0; flex: 1; }
.efl-g-tt-rowt { font-size: 12.5px; line-height: 1.3; overflow: hidden; }
.efl-g-tt-rowm { color: var(--g-muted, #667085); font-size: 11px; margin-top: 2px; }
.efl-g-tt-scroll { max-height: 300px; overflow: auto; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; }
.efl-g-tt-more { color: var(--g-muted, #667085); font-size: 11px; padding: 6px 4px 2px; }
.efl-g-tt-crow { padding: 7px 4px; border-bottom: 1px solid var(--g-line, rgba(0,0,0,.06)); }
.efl-g-tt-crow:last-child { border-bottom: 0; }
.efl-g-tt-trow { display: flex; gap: 8px; align-items: flex-start; padding: 7px 4px; border-bottom: 1px solid var(--g-line, rgba(0,0,0,.06)); }
.efl-g-tt-trow:last-child { border-bottom: 0; }
.efl-g-tt-tthumb { flex: 0 0 auto; width: 56px; height: 74px; border-radius: 8px; overflow: hidden; background: var(--g-line, #e2e4e9); display: block; text-decoration: none; }
.efl-g-tt-tthumb:hover { opacity: .95; }
.efl-g-tt-tbody { flex: 1 1 auto; min-width: 0; }
.efl-g-tt-ctext { font-size: 12.5px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.efl-g-tt-clink { color: var(--g-purple, #8d4dff); text-decoration: none; }
.efl-g-tt-clink:hover { text-decoration: underline; }
.efl-g-tt-load { display: flex; align-items: center; gap: 8px; color: var(--g-muted, #667085); font-size: 12.5px; }
.efl-g-tt-spin { width: 14px; height: 14px; border: 2px solid var(--g-line, #e2e4e9); border-top-color: var(--g-accent, #6b4eff); border-radius: 50%; animation: efl-g-tt-spin .7s linear infinite; }
@keyframes efl-g-tt-spin { to { transform: rotate(360deg); } }
.efl-g-tt-err { color: #b42318; background: rgba(217,45,32,.08); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.4; }

/* Inline "working" spinner for generate buttons (reuses the efl-g-tt-spin keyframe). Because every
   completion path resets the button text, the spinner clears itself automatically when work ends. */
.efl-g-spin{display:inline-block;width:11px;height:11px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-1px;margin-left:6px;animation:efl-g-tt-spin .6s linear infinite}

/* Muted per-reply timing footer in the EFL Assistant: exact queue wait vs model time, so slowness is
   attributable at a glance (a big first number = queue/dispatch problem; a big second = the provider). */
.efl-aiw-tim{margin-top:6px;font-size:10px;opacity:.55;letter-spacing:.02em;white-space:nowrap}

/* Project Overview popover (replaces the retired bottom panel) — themed for dark AND light. */
.efl-g-ovpop{z-index:99999;min-width:240px;max-width:340px;background:#14121f;border:1px solid var(--g-line,rgba(255,255,255,.12));border-radius:12px;padding:12px 14px;box-shadow:0 12px 32px rgba(0,0,0,.5);font-size:12px;color:var(--g-text,#e9e7f4)}
html[data-theme="light"] .efl-g-ovpop{background:#fff;border-color:rgba(20,28,56,.14);box-shadow:0 12px 32px rgba(20,28,56,.16);color:#1c2340}
.efl-g-ovhead{font-weight:700;margin-bottom:8px;font-size:13px}
.efl-g-ovrow{display:flex;justify-content:space-between;gap:12px;padding:3px 0;border-top:1px solid var(--g-line,rgba(255,255,255,.06))}
html[data-theme="light"] .efl-g-ovrow{border-top-color:rgba(20,28,56,.08)}
.efl-g-ovrow b{opacity:.62;font-weight:600}
.efl-g-ovrow span{text-align:right;word-break:break-word}
.efl-g-ovbtn{padding-left:9px;padding-right:9px}

/* Media previews — elegant frames, themed for dark AND light. The whole image is always visible;
   video sits in a cinematic rounded frame with a soft shadow. */
.efl-img-prev--full{margin-top:8px;border:1px solid var(--g-line,rgba(255,255,255,.1));border-radius:12px;overflow:hidden;background:rgba(255,255,255,.03)}
html[data-theme="light"] .efl-img-prev--full{background:rgba(20,28,56,.04);border-color:rgba(20,28,56,.12)}
.efl-img-prev--full img{width:100%;height:auto;max-height:260px;object-fit:contain;display:block}
.efl-vid-prev{margin-top:8px;border:1px solid var(--g-line,rgba(255,255,255,.12));border-radius:12px;overflow:hidden;background:#000;box-shadow:0 6px 18px rgba(0,0,0,.35)}
html[data-theme="light"] .efl-vid-prev{border-color:rgba(20,28,56,.14);box-shadow:0 6px 18px rgba(20,28,56,.14)}
.efl-vid-prev video{width:100%;max-height:240px;display:block;background:#000}

/* Live-measured height: the canvas + inspector fill the page exactly — default and fullscreen.
   The JS sets --efl-fs-h from the canvas's real top to the viewport bottom on every resize. */
.efl-fs-canvas{height:var(--efl-fs-h,calc(100vh - 190px))!important;min-height:480px;max-height:none!important}
.efl-fs-inspector{height:var(--efl-fs-h,calc(100vh - 190px))!important;max-height:none!important;overflow-y:auto!important}

/* Inline audio player — a soft brand-gradient card with a note chip; the NATIVE control itself
   flips dark/light with the theme via color-scheme. */
.efl-aud-prev{margin-top:8px;display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--g-line,rgba(255,255,255,.12));border-radius:12px;background:linear-gradient(135deg,rgba(99,102,241,.12),rgba(168,85,247,.09) 50%,rgba(236,72,153,.09))}
html[data-theme="light"] .efl-aud-prev{border-color:rgba(20,28,56,.12);background:linear-gradient(135deg,rgba(99,102,241,.08),rgba(168,85,247,.06) 50%,rgba(236,72,153,.06))}
.efl-aud-ic{flex:0 0 auto;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:9px;font-size:15px;background:linear-gradient(135deg,#6366f1,#a855f7 55%,#ec4899);color:#fff;box-shadow:0 4px 10px rgba(120,80,220,.35)}
.efl-aud-prev audio{flex:1;min-width:0;width:100%;height:34px;display:block;color-scheme:dark}
html[data-theme="light"] .efl-aud-prev audio{color-scheme:light}

/* Note node: in-card editor, themed for dark AND light. */
.efl-note-ed{display:flex;flex-direction:column;gap:6px}
.efl-note-ed textarea{width:100%;min-height:86px;resize:vertical;border-radius:10px;padding:8px 10px;font:inherit;font-size:12px;line-height:1.45;background:rgba(255,255,255,.05);border:1px solid var(--g-line,rgba(255,255,255,.12));color:var(--g-text,#e9e7f4)}
html[data-theme="light"] .efl-note-ed textarea{background:rgba(20,28,56,.04);border-color:rgba(20,28,56,.14);color:#1c2340}
.efl-note-bar{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.efl-note-st{font-size:10px;opacity:.55}
.efl-note-save{padding:4px 12px}

/* Big, clear image-picker grid (full folder explorer) — themed. */
.efl-g-browse-grid{display:flex;flex-wrap:wrap;gap:10px;max-height:420px;overflow:auto;padding:4px}
.efl-g-tile{display:flex;flex-direction:column;align-items:center;gap:6px;width:132px;padding:8px;border-radius:12px;border:1px solid var(--g-line,rgba(255,255,255,.1));background:rgba(255,255,255,.03);cursor:pointer}
html[data-theme="light"] .efl-g-tile{background:rgba(20,28,56,.03);border-color:rgba(20,28,56,.12)}
.efl-g-tile:hover{border-color:var(--blue,#6366f1)}
.efl-g-tile-img{width:116px;height:116px;object-fit:cover;border-radius:9px;display:block;background:#0b0a12}
.efl-g-tile-ic{width:116px;height:116px;display:flex;align-items:center;justify-content:center;font-size:36px;border-radius:9px;background:rgba(255,255,255,.04)}
html[data-theme="light"] .efl-g-tile-ic{background:rgba(20,28,56,.05)}
.efl-g-tile-nm{font-size:11px;max-width:116px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.efl-g-tile-ct{font-size:10px;opacity:.55}
.efl-g-sb-mini{padding:4px 8px;margin-right:6px}
.efl-g-sb-row{display:flex;align-items:center;gap:10px;padding:6px 0;border-top:1px solid var(--g-line,rgba(255,255,255,.08))}
.efl-g-sb-row .efl-g-sb-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.efl-g-sb-list{margin:8px 0}
.efl-g-sb-mt{font-size:11px;opacity:.55}
.efl-g-sb-thumb img{width:56px;height:56px;object-fit:cover;border-radius:8px;display:block}

/* Scenes Generation — stateful scene cards, themed for dark AND light. */
.efl-sg-list{display:flex;flex-direction:column;gap:10px;margin:10px 0}
.efl-sg-card{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--g-line,rgba(255,255,255,.1));border-radius:12px;background:rgba(255,255,255,.03)}
html[data-theme="light"] .efl-sg-card{background:rgba(20,28,56,.03);border-color:rgba(20,28,56,.12)}
.efl-sg-card.is-done{border-color:rgba(99,102,241,.45)}
.efl-sg-card.is-off{opacity:.6}
.efl-sg-th{position:relative;flex:0 0 auto;width:72px;height:72px;border-radius:10px;overflow:hidden;background:#0b0a12;display:flex;align-items:center;justify-content:center}
.efl-sg-th img{width:100%;height:100%;object-fit:cover;display:block}
.efl-sg-th.is-empty{font-size:16px;opacity:.5;border:1px dashed var(--g-line,rgba(255,255,255,.2));background:transparent}
html[data-theme="light"] .efl-sg-th.is-empty{border-color:rgba(20,28,56,.2)}
.efl-sg-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:26px;height:26px;border-radius:50%;background:rgba(10,8,20,.72);color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;padding-left:2px}
.efl-sg-mid{flex:1;min-width:0}
.efl-sg-title{font-size:12.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.efl-sg-stat{font-size:11px;opacity:.6;margin-top:2px}
.efl-sg-acts{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;max-width:46%}
.efl-sg-a{padding:4px 9px;font-size:11px}
.efl-sg-player video{width:100%;max-height:60vh;border-radius:12px;background:#000;display:block}

/* Scene nodes on the canvas: frame first, then the card BECOMES the video preview. Themed. */
.efl-scn-note,.efl-scn-stat{font-size:11px;opacity:.62;margin:6px 0}
.efl-scn-img{border:1px solid var(--g-line,rgba(255,255,255,.1));border-radius:10px;overflow:hidden;background:#0b0a12}
.efl-scn-img img{width:100%;height:auto;max-height:190px;object-fit:cover;display:block}
.efl-scn-vid{border:1px solid var(--g-line,rgba(255,255,255,.12));border-radius:10px;overflow:hidden;background:#000;box-shadow:0 6px 16px rgba(0,0,0,.32)}
html[data-theme="light"] .efl-scn-vid{border-color:rgba(20,28,56,.14);box-shadow:0 6px 16px rgba(20,28,56,.14)}
.efl-scn-vid video{width:100%;max-height:200px;display:block;background:#000}
.efl-scn-acts{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.efl-scn-a{padding:4px 9px;font-size:11px}
.efl-scn-empty{width:56px;height:56px;border:1px dashed var(--g-line,rgba(255,255,255,.2));border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:16px;opacity:.5;margin:6px 0}
.efl-g-tile-vw{position:relative;width:116px;height:116px;border-radius:9px;overflow:hidden;background:#000;display:block}
.efl-g-tile-vid{width:100%;height:100%;object-fit:cover;display:block}

/* Storyboard ON the canvas — a cinematic shot-board: 16:9 frame cells in a grid, a brand badge,
   and a gradient progress of framed scenes. Themed for dark AND light. */
/* The CARD carries the minimum width (min-width beats the node's stored inline width), the body
   fills the card exactly, and the card's height stays auto — so the border always wraps the
   shot-board perfectly, dragging or not. */
.efl-g-node:has(.efl-sbc){min-width:352px;height:auto!important}
.efl-sbc{min-width:0;width:100%;display:flex;flex-direction:column;gap:9px}
.efl-sbc-head{display:flex;align-items:center;gap:8px}
.efl-sbc-badge{flex:0 0 auto;background:linear-gradient(135deg,#0b7bff,#8d4dff 55%,#ff33df);color:#fff;padding:3px 10px;border-radius:999px;font-size:10.5px;font-weight:700;letter-spacing:.3px;box-shadow:0 4px 12px rgba(120,80,220,.35)}
.efl-sbc-prog{flex:1;height:5px;border-radius:999px;background:var(--g-line,rgba(255,255,255,.1));overflow:hidden}
html[data-theme="light"] .efl-sbc-prog{background:rgba(20,28,56,.1)}
.efl-sbc-prog i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#0b7bff,#8d4dff 55%,#ff33df);transition:width .35s ease}
.efl-sbc-count{flex:0 0 auto;font-size:10.5px;font-weight:700;opacity:.75;font-variant-numeric:tabular-nums}
.efl-sbc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:332px;overflow-y:auto;padding:2px 4px 2px 2px}
.efl-sbc-cell{display:flex;flex-direction:column;border:1px solid var(--g-line,rgba(255,255,255,.09));border-radius:12px;background:rgba(255,255,255,.025);padding:6px;transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease}
html[data-theme="light"] .efl-sbc-cell{background:rgba(20,28,56,.03);border-color:rgba(20,28,56,.1)}
.efl-sbc-cell:hover{transform:translateY(-1px);border-color:rgba(141,77,255,.55);box-shadow:0 8px 18px rgba(20,10,50,.28)}
html[data-theme="light"] .efl-sbc-cell:hover{box-shadow:0 8px 18px rgba(20,28,56,.14)}
.efl-sbc-cell.is-framed{border-color:rgba(141,77,255,.34)}
.efl-sbc-shot{position:relative;aspect-ratio:16/9;border-radius:8px;overflow:hidden;background:#0b0a12}
.efl-sbc-shot img{width:100%;height:100%;object-fit:cover;display:block}
.efl-sbc-shot.is-empty{display:flex;align-items:center;justify-content:center;background:transparent;border:1px dashed var(--g-line,rgba(255,255,255,.22))}
html[data-theme="light"] .efl-sbc-shot.is-empty{border-color:rgba(20,28,56,.22)}
.efl-sbc-ghost{font-size:26px;font-weight:800;opacity:.14;line-height:1}
.efl-sbc-nf{position:absolute;bottom:6px;left:0;right:0;text-align:center;font-size:9.5px;opacity:.5}
.efl-sbc-num{position:absolute;top:5px;left:5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:rgba(8,6,16,.74);color:#fff;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center}
.efl-sbc-title{font-size:11px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:7px 2px 5px}
.efl-sbc-acts{display:flex;gap:5px;flex-wrap:wrap}
.efl-sbc-acts .efl-sbc-a:first-child{flex:1}
.efl-sbc-a{padding:3px 8px;font-size:10.5px}

/* Scene Trim Editor — brand-gradient handles over a filmstrip, themed for dark AND light. */
.efl-se{display:flex;flex-direction:column;gap:12px;min-width:520px;max-width:640px}
.efl-se-video{width:100%;max-height:320px;border-radius:12px;background:#000;display:block}
.efl-se-strip-wrap{position:relative;height:64px;border-radius:10px;overflow:hidden;border:1px solid var(--g-line,rgba(255,255,255,.12));user-select:none;touch-action:none}
html[data-theme="light"] .efl-se-strip-wrap{border-color:rgba(20,28,56,.14)}
.efl-se-strip{position:absolute;inset:0;display:flex}
.efl-se-cell{flex:1;display:flex;align-items:center;justify-content:center;font-size:9px;opacity:.85;color:#cfc9e6;background:linear-gradient(135deg,rgba(11,123,255,.12),rgba(141,77,255,.12) 55%,rgba(255,51,223,.12));border-right:1px solid rgba(255,255,255,.06);overflow:hidden}
html[data-theme="light"] .efl-se-cell{color:#3a4066;border-right-color:rgba(20,28,56,.08)}
.efl-se-cell img{width:100%;height:100%;object-fit:cover;display:block}
.efl-se-shade{position:absolute;top:0;bottom:0;background:rgba(6,4,14,.62);pointer-events:none;z-index:2}
html[data-theme="light"] .efl-se-shade{background:rgba(20,28,56,.4)}
.efl-se-handle{position:absolute;top:0;bottom:0;width:16px;margin-left:-8px;cursor:ew-resize;display:flex;align-items:center;justify-content:center;z-index:3}
.efl-se-handle span{width:5px;height:100%;border-radius:4px;background:linear-gradient(180deg,#0b7bff,#8d4dff 55%,#ff33df);box-shadow:0 0 0 1px rgba(255,255,255,.28),0 4px 10px rgba(120,80,220,.45)}
.efl-se-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.efl-se-row--btns{justify-content:flex-end}
.efl-se-time{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.efl-se-note{font-size:11px;opacity:.7}

/* Multi-segment editing: kept segments, gap shades, grips, and a playhead. */
.efl-se-shades,.efl-se-segs{position:absolute;inset:0;pointer-events:none}
.efl-se-segs{pointer-events:auto}
.efl-se-seg{position:absolute;top:0;bottom:0;border:2px solid rgba(141,77,255,.75);border-radius:8px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);cursor:pointer}
.efl-se-seg.is-sel{border-color:#ff33df;box-shadow:inset 0 0 0 1px rgba(255,255,255,.22),0 0 0 1px rgba(255,51,223,.35)}
.efl-se-grip{position:absolute;top:0;bottom:0;width:12px;cursor:ew-resize}
.efl-se-grip--l{left:-7px}
.efl-se-grip--r{right:-7px}
.efl-se-grip::after{content:'';position:absolute;left:50%;top:16%;bottom:16%;width:4px;margin-left:-2px;border-radius:3px;background:linear-gradient(180deg,#0b7bff,#8d4dff 55%,#ff33df);box-shadow:0 0 0 1px rgba(255,255,255,.3)}
.efl-se-ph{position:absolute;top:0;bottom:0;width:2px;background:#fff;box-shadow:0 0 6px rgba(255,255,255,.8);pointer-events:none;z-index:4}
html[data-theme="light"] .efl-se-ph{background:#1c2340;box-shadow:0 0 6px rgba(20,28,56,.6)}
.efl-se-tools{display:flex;gap:6px}
.efl-se-vol{display:flex;align-items:center;gap:8px;font-size:11px}
.efl-se-vol input{width:150px;accent-color:#8d4dff}
.efl-se-vol b{font-variant-numeric:tabular-nums;min-width:38px}

/* Final Film node — professional assembler card, themed for dark AND light. */
.efl-g-node:has(.efl-ff){min-width:372px;height:auto!important}
.efl-ff{min-width:0;width:100%;display:flex;flex-direction:column;gap:10px}
.efl-ff-head{display:flex;align-items:center}
.efl-ff-list{display:flex;flex-direction:column;max-height:236px;overflow-y:auto;border:1px solid var(--g-line,rgba(255,255,255,.08));border-radius:12px;padding:4px 6px;background:rgba(255,255,255,.02)}
html[data-theme="light"] .efl-ff-list{background:rgba(20,28,56,.03);border-color:rgba(20,28,56,.1)}
.efl-ff-row{display:flex;align-items:center;gap:8px;padding:5px 2px;border-top:1px solid var(--g-line,rgba(255,255,255,.06))}
.efl-ff-row:first-child{border-top:0}
html[data-theme="light"] .efl-ff-row{border-top-color:rgba(20,28,56,.08)}
.efl-ff-row.is-off{opacity:.42}
.efl-ff-row.is-miss .efl-ff-title{opacity:.55;font-style:italic}
.efl-ff-row input[type="checkbox"]{accent-color:#8d4dff}
.efl-ff-th{flex:0 0 auto;width:52px;height:32px;border-radius:6px;overflow:hidden;background:#0b0a12;display:flex;align-items:center;justify-content:center;font-size:11px;opacity:.9}
.efl-ff-th img{width:100%;height:100%;object-fit:cover;display:block}
.efl-ff-th.is-empty{opacity:.45;border:1px dashed var(--g-line,rgba(255,255,255,.2));background:transparent}
.efl-ff-title{flex:1;min-width:0;font-size:11.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.efl-ff-mv{display:flex;gap:3px}
.efl-ff-a{padding:2px 7px;font-size:10.5px}
.efl-ff-opts{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:11px}
.efl-ff-opt{display:flex;align-items:center;gap:6px}
.efl-ff-mname{max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;vertical-align:bottom}
.efl-ff-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.efl-ff-status.is-err{color:#ff7b9c;font-size:11px}
.efl-ff-prog{flex:1;min-width:120px;height:7px;border-radius:999px;background:var(--g-line,rgba(255,255,255,.1));overflow:hidden}
html[data-theme="light"] .efl-ff-prog{background:rgba(20,28,56,.1)}
.efl-ff-prog i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#0b7bff,#8d4dff 55%,#ff33df);transition:width .5s ease}
.efl-ff-st{font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}
.efl-ff-bgnote{flex-basis:100%;font-size:10px;opacity:.55}
.efl-ff-done{display:flex;justify-content:flex-end}
.efl-ff-render{width:100%;padding:8px 12px;font-weight:700}

/* Final Film polish — hero player, unified option shell, gradient CTA, strict dark/light parity. */
.efl-g-node:has(.efl-ff-vid){min-width:472px}
.efl-ff-vid{border-radius:14px;overflow:hidden;background:#000;box-shadow:0 14px 34px rgba(8,6,20,.5);border:1px solid rgba(255,255,255,.08)}
html[data-theme="light"] .efl-ff-vid{box-shadow:0 14px 30px rgba(20,28,56,.22);border-color:rgba(20,28,56,.12)}
.efl-ff-vid video{width:100%;max-height:420px;display:block;background:#000}
.efl-ff-row{border-radius:8px;transition:background .12s ease}
.efl-ff-row:hover{background:rgba(141,77,255,.08)}
html[data-theme="light"] .efl-ff-row:hover{background:rgba(141,77,255,.09)}
.efl-ff-a{background:transparent;border-color:transparent}
.efl-ff-a:hover{border-color:rgba(141,77,255,.5)}
.efl-ff-opts{border:1px solid var(--g-line,rgba(255,255,255,.08));border-radius:12px;padding:9px 12px;background:rgba(255,255,255,.02)}
html[data-theme="light"] .efl-ff-opts{background:rgba(20,28,56,.03);border-color:rgba(20,28,56,.1)}
.efl-ff-opt select{font:inherit;font-size:11px;background:rgba(255,255,255,.05);color:inherit;border:1px solid var(--g-line,rgba(255,255,255,.16));border-radius:8px;padding:4px 26px 4px 9px;outline:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%238d8aa8' stroke-width='1.5' stroke-linecap='round'/></svg>");background-repeat:no-repeat;background-position:right 9px center}
.efl-ff-opt select:hover{border-color:rgba(141,77,255,.45)}
.efl-ff-opt select:focus{border-color:rgba(141,77,255,.65);box-shadow:0 0 0 2px rgba(141,77,255,.2)}
.efl-ff-opt select option{background:#1a1730;color:#eceafc}
html[data-theme="light"] .efl-ff-opt select{background-color:#fff;border-color:rgba(20,28,56,.18);color:#1c2340;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round'/></svg>")}
html[data-theme="light"] .efl-ff-opt select option{background:#fff;color:#1c2340}
.efl-ff-opt input[type="range"]{accent-color:#8d4dff}
.efl-ff-status{border:1px solid var(--g-line,rgba(255,255,255,.08));border-radius:12px;padding:8px 12px;background:rgba(255,255,255,.02)}
html[data-theme="light"] .efl-ff-status{background:rgba(20,28,56,.03);border-color:rgba(20,28,56,.1)}
.efl-ff-status.is-err{border-color:rgba(255,90,130,.4);color:#ff7b9c}
html[data-theme="light"] .efl-ff-status.is-err{color:#c81e4e}
.efl-ff-render{background:linear-gradient(135deg,#0b7bff,#8d4dff 55%,#ff33df);border:0;color:#fff;border-radius:12px;box-shadow:0 10px 24px rgba(120,80,220,.4);transition:filter .15s ease,transform .12s ease}
.efl-ff-render:hover:not(:disabled){filter:brightness(1.1);transform:translateY(-1px)}
.efl-ff-render:disabled{opacity:.55;box-shadow:none}
.efl-ff-done .efl-fs-btn{border-color:rgba(141,77,255,.5);font-weight:700}
.efl-ff-bgnote{opacity:.6}
html[data-theme="light"] .efl-ff-bgnote{opacity:.65}
