:root {
  --bg: #080809;
  --bg-2: rgba(22, 22, 28, 0.98);
  --bg-banner: rgba(26, 30, 36, 0.85);
  --bg-context-menu: rgba(26, 32, 44, 0.95);
  --bg-dropdown: #242426;
  --bg-elevated: #16181c;
  --bg-header: transparent;
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-loader: #1e1e1e;
  --bg-modal: rgba(18, 18, 18, 0.85);
  --bg-node: var(--surface-node);
  --bg-node-dark: var(--surface-node);
  --bg-panel: rgba(18, 18, 22, 0.95);
  --bg-panel-card: var(--surface-node);
  --bg-panel-dark: rgba(20, 25, 35, 0.4);
  --bg-panel-solid: rgba(22, 24, 28, 0.95);
  --bg-sidebar: transparent;
  --text-1: #ffffff;
  --text-2: rgba(255, 255, 255, 0.6);
  --text-3: rgba(255, 255, 255, 0.28);
  --text-70: rgba(255, 255, 255, 0.7);
  --text-85: rgba(255, 255, 255, 0.85);
  --text-95: rgba(255, 255, 255, 0.95);
  --text-danger: var(--red);
  --text-disabled: var(--text-3);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-on-danger: rgba(255, 255, 255, 0.95);
  --text-on-icon-badge: rgba(255, 255, 255, 0.95);
  --text-on-light: var(--black-90);
  --text-on-light-strong: var(--black-95);
  --text-placeholder: var(--text-3);
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: var(--text-70);
  --text-strong: var(--text-95);
  --text-subtle: rgba(255, 255, 255, 0.35);
  --white: #ffffff;
  --white-02: rgba(255, 255, 255, 0.02);
  --white-04: rgba(255, 255, 255, 0.04);
  --white-05: rgba(255, 255, 255, 0.05);
  --white-06: rgba(255, 255, 255, 0.06);
  --white-08: rgba(255, 255, 255, 0.08);
  --white-10: rgba(255, 255, 255, 0.1);
  --white-12: rgba(255, 255, 255, 0.12);
  --white-15: rgba(255, 255, 255, 0.15);
  --white-18: rgba(255, 255, 255, 0.18);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-25: rgba(255, 255, 255, 0.25);
  --white-30: rgba(255, 255, 255, 0.3);
  --white-35: rgba(255, 255, 255, 0.35);
  --white-40: rgba(255, 255, 255, 0.4);
  --white-50: rgba(255, 255, 255, 0.5);
  --white-60: rgba(255, 255, 255, 0.6);
  --white-70: rgba(255, 255, 255, 0.7);
  --white-78: rgba(255, 255, 255, 0.78);
  --white-80: rgba(255, 255, 255, 0.8);
  --white-90: rgba(255, 255, 255, 0.9);
  --black: #000000;
  --black-10: rgba(0, 0, 0, 0.1);
  --black-15: rgba(0, 0, 0, 0.15);
  --black-20: rgba(0, 0, 0, 0.2);
  --black-30: rgba(0, 0, 0, 0.3);
  --black-40: rgba(0, 0, 0, 0.4);
  --black-45: rgba(0, 0, 0, 0.45);
  --black-50: rgba(0, 0, 0, 0.5);
  --black-60: rgba(0, 0, 0, 0.6);
  --black-65: rgba(0, 0, 0, 0.65);
  --black-70: rgba(0, 0, 0, 0.7);
  --black-80: rgba(0, 0, 0, 0.8);
  --black-82: rgba(0, 0, 0, 0.82);
  --black-90: rgba(0, 0, 0, 0.9);
  --black-95: rgba(0, 0, 0, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --border-node: var(--stroke-default);
  --stroke-05: rgba(255, 255, 255, 0.05);
  --stroke-07: rgba(255, 255, 255, 0.07);
  --stroke-08: rgba(255, 255, 255, 0.08);
  --stroke-10: rgba(255, 255, 255, 0.1);
  --stroke-11: rgba(255, 255, 255, 0.11);
  --stroke-12: rgba(255, 255, 255, 0.12);
  --stroke-14: rgba(255, 255, 255, 0.14);
  --stroke-15: rgba(255, 255, 255, 0.15);
  --stroke-default: var(--stroke-08);
  --stroke-multi-select-box: rgba(255, 255, 255, 0.35);
  --stroke-multi-select-toolbar: var(--stroke-default);
  --stroke-strong: var(--stroke-12);
  --stroke-weak: var(--stroke-05);
  --blue: #3b82f6;
  --blue-10: rgba(59, 130, 246, 0.1);
  --blue-15: rgba(59, 130, 246, 0.15);
  --blue-20: rgba(59, 130, 246, 0.2);
  --blue-25: rgba(59, 130, 246, 0.25);
  --blue-30: rgba(59, 130, 246, 0.3);
  --blue-40: rgba(59, 130, 246, 0.4);
  --blue-50: rgba(59, 130, 246, 0.5);
  --blue-60: rgba(59, 130, 246, 0.6);
  --blue-border-focus: rgba(59, 130, 246, 0.9);
  --blue-border-strong: rgba(59, 130, 246, 0.35);
  --blue-border-subtle: rgba(100, 130, 200, 0.12);
  --blue-dim: rgba(59, 130, 246, 0.25);
  --blue-glow-subtle: rgba(50, 80, 150, 0.1);
  --cyan: #06b6d4;
  --cyan-05: rgba(6, 182, 212, 0.05);
  --cyan-15: rgba(6, 182, 212, 0.15);
  --cyan-30: rgba(6, 182, 212, 0.3);
  --cyan-60: rgba(6, 182, 212, 0.6);
  --cyan-text: #22d3ee;
  --fuchsia: #d946ef;
  --gold: #f59e0b;
  --gold-05: rgba(245, 158, 11, 0.05);
  --gold-15: rgba(245, 158, 11, 0.15);
  --gold-30: rgba(245, 158, 11, 0.3);
  --gold-60: rgba(245, 158, 11, 0.6);
  --gold-text: #fbbf24;
  --green: #10b981;
  --green-05: rgba(16, 185, 129, 0.05);
  --green-10: rgba(16, 185, 129, 0.1);
  --green-15: rgba(16, 185, 129, 0.15);
  --green-20: rgba(16, 185, 129, 0.2);
  --green-30: rgba(16, 185, 129, 0.3);
  --green-60: rgba(16, 185, 129, 0.6);
  --green-btn: linear-gradient(135deg, #059669, #10b981);
  --indigo: #6366f1;
  --indigo-05: rgba(99, 102, 241, 0.05);
  --indigo-08: rgba(99, 102, 241, 0.08);
  --indigo-10: rgba(99, 102, 241, 0.1);
  --indigo-12: rgba(99, 102, 241, 0.12);
  --indigo-15: rgba(99, 102, 241, 0.15);
  --indigo-18: rgba(99, 102, 241, 0.18);
  --indigo-20: rgba(99, 102, 241, 0.2);
  --indigo-22: rgba(99, 102, 241, 0.22);
  --indigo-25: rgba(99, 102, 241, 0.25);
  --indigo-30: rgba(99, 102, 241, 0.3);
  --indigo-35: rgba(99, 102, 241, 0.35);
  --indigo-40: rgba(99, 102, 241, 0.4);
  --indigo-45: rgba(99, 102, 241, 0.45);
  --indigo-50: rgba(99, 102, 241, 0.5);
  --indigo-55: rgba(99, 102, 241, 0.55);
  --indigo-60: rgba(99, 102, 241, 0.6);
  --indigo-70: rgba(99, 102, 241, 0.7);
  --indigo-80: rgba(99, 102, 241, 0.8);
  --indigo-90: rgba(99, 102, 241, 0.9);
  --indigo-text: #a5b4fc;
  --purple: #8b5cf6;
  --purple-05: rgba(139, 92, 246, 0.05);
  --purple-10: rgba(139, 92, 246, 0.1);
  --purple-15: rgba(139, 92, 246, 0.15);
  --purple-20: rgba(139, 92, 246, 0.2);
  --purple-30: rgba(139, 92, 246, 0.3);
  --purple-60: rgba(139, 92, 246, 0.6);
  --purple-border-strong: rgba(139, 92, 246, 0.35);
  --purple-border-subtle: rgba(139, 92, 246, 0.14);
  --purple-bright: #a855f7;
  --purple-glow-subtle: rgba(139, 92, 246, 0.08);
  --purple-text: #a78bfa;
  --red: #ef4444;
  --red-05: rgba(239, 68, 68, 0.05);
  --red-10: rgba(239, 68, 68, 0.1);
  --red-15: rgba(239, 68, 68, 0.15);
  --red-20: rgba(239, 68, 68, 0.2);
  --red-30: rgba(239, 68, 68, 0.3);
  --red-35: rgba(239, 68, 68, 0.35);
  --red-40: rgba(239, 68, 68, 0.4);
  --red-60: rgba(239, 68, 68, 0.6);
  --brand-gradient: linear-gradient(135deg, var(--blue), var(--purple));
  --indigo-gradient: linear-gradient(135deg, var(--indigo), var(--purple));
  --icon-text-bg: rgba(30, 60, 80, 0.9);
  --icon-text-stroke: rgba(56, 189, 248, 0.4);
  --icon-audio-bg: rgba(30, 64, 175, 0.5);
  --icon-audio-stroke: #60a5fa;
  --icon-video-bg: rgba(30, 60, 80, 0.9);
  --icon-video-stroke: #60a5fa;
  --group-pink: #ec4899;
  --group-pink-05: rgba(236, 72, 153, 0.05);
  --group-pink-60: rgba(236, 72, 153, 0.6);
  --group-slate: #64748b;
  --group-slate-05: rgba(100, 116, 139, 0.05);
  --group-slate-60: rgba(100, 116, 139, 0.6);
  --fa-btn-glow: rgba(90, 130, 220, 0.45);
  --error-bg: rgba(239, 68, 68, 0.35);
  --error-bg-solid: rgba(239, 68, 68, 0.95);
  --error-border: rgba(239, 68, 68, 0.5);
  --error-border-dark: rgba(239, 68, 68, 0.7);
  --error-fill: #dc2626;
  --error-glow: rgba(239, 68, 68, 0.5);
  --error-shadow: rgba(239, 68, 68, 0.8);
  --error-text: #ff4d4d;
  --error-text-dark: #ff1a1a;
  --error-text-light: #ff8a8a;
  --warning-bg: rgba(250, 204, 21, 0.1);
  --warning-bg-hover: rgba(250, 204, 21, 0.2);
  --warning-border: rgba(250, 204, 21, 0.2);
  --warning-border-hover: rgba(250, 204, 21, 0.4);
  --warning-glow: rgba(250, 204, 21, 0.2);
  --warning-text: #facc15;
  --overlay-blur: 6px;
  --overlay-dim: rgba(0, 0, 0, 0.55);
  --overlay-preview: rgba(0, 0, 0, 0.9);
  --shadow-banner: 0 8px 40px var(--black-70), 0 0 0 0.5px var(--white-05) inset;
  --shadow-dialog: 0 24px 80px rgba(0, 0, 0, 0.6);
  --shadow-fab: 0 4px 20px rgba(99, 102, 241, 0.55);
  --shadow-fab-hover: 0 6px 28px rgba(99, 102, 241, 0.75);
  --shadow-mascot: 0 8px 32px var(--black-50), 0 0 0 1px var(--indigo-12);
  --shadow-menu: 0 24px 60px var(--black-70), 0 0 0 0.5px var(--white-05) inset;
  --shadow-popover: 0 12px 40px var(--black-50);
  --shadow-quote: 0 12px 50px var(--black-90);
  --shadow-save-dialog: 0 24px 64px rgba(0, 0, 0, 0.8);
  --shadow-surface: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-surface-strong: 0 16px 64px rgba(0, 0, 0, 0.9);
  --shadow-toolbar: 0 12px 48px var(--black-70);
  --action-btn-bg: rgba(70, 100, 200, 0.85);
  --action-btn-hover-bg: rgba(90, 130, 220, 0.95);
  --btn-danger-bg: var(--red);
  --btn-danger-bg-hover: var(--red);
  --conn-color: rgba(200, 200, 210, 0.5);
  --conn-hover: rgba(59, 130, 246, 0.9);
  --edge-draft-stroke: rgba(180, 180, 200, 0.7);
  --fill-active: var(--white-20);
  --fill-danger-soft: rgba(239, 68, 68, 0.15);
  --fill-hover: var(--white-05);
  --fill-hover-strong: var(--white-10);
  --fill-input: var(--bg-input);
  --muted-gray-90: rgba(200, 200, 205, 0.9);
  --stroke-danger: rgba(255, 100, 100, 0.5);
  --surface-icon-badge: rgba(0, 0, 0, 0.9);
  --surface-icon-badge-soft: rgba(255, 255, 255, 0.15);
  --annotate-blue: #0a84ff;
  --annotate-green: #34c759;
  --annotate-orange: #ff9500;
  --annotate-purple: #af52de;
  --annotate-red: #ff3b30;
  --annotate-yellow: #ffcc00;
  --blur-banner: 20px;
  --blur-mascot: 16px;
  --blur-menu: 32px;
  --blur-multi-select-toolbar: 10px;
  --blur-quote: 24px;
  --canvas-contact-sheet-bg: var(--canvas-white);
  --canvas-contact-sheet-cell-bg: #f5f7fb;
  --canvas-contact-sheet-cell-stroke: #d8dee8;
  --canvas-contact-sheet-badge-bg: rgba(15, 23, 42, 0.82);
  --canvas-contact-sheet-badge-text: var(--canvas-white);
  --canvas-white: #ffffff;
  --canvas-black: #000000;
  --surface-banner: rgba(22, 22, 30, 0.97);
  --surface-float: rgba(18, 18, 26, 0.98);
  --surface-glass: rgba(22, 24, 28, 0.75);
  --surface-menu: rgba(20, 21, 26, 0.97);
  --surface-multi-select-box: var(--bg-panel-card);
  --surface-multi-select-toolbar: var(--surface-menu);
  --surface-node: rgba(255, 255, 255, 0.05);
  --surface-panel: var(--surface-node);
  --surface-quote: rgba(20, 20, 28, 0.97);
  --surface-save-dialog: rgba(20, 20, 28, 0.98);
  --surface-stroke: var(--stroke-05);
  --surface-video-btn: rgba(55, 55, 58, 0.92);
  --surface-video-btn-hover: rgba(80, 80, 86, 0.92);
  --surface-video-track: rgba(18, 18, 18, 0.92);
  --about-dialog-bg: rgba(22, 22, 32, 0.95);
  --about-dialog-radius: 20px;
  --about-dialog-shadow: var(--shadow-dialog);
  --about-overlay-bg: rgba(0, 0, 0, 0.65);
  --avatar-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  --sidebar-btn-hover-bg: var(--fill-hover-strong);
  --sidebar-pill-bg: #1c1c1e;
  --sidebar-pill-border: var(--stroke-05);
  --sidebar-pill-shadow: var(--shadow-surface);
  --sidebar-sep: rgba(255, 255, 255, 0.1);
  --sidebar-settings-btn-size: var(--space-40);
  --sidebar-settings-icon-size: var(--font-24);
  --header-left-coverage: 90%;
  --header-h: 52px;
  --node-r: var(--radius-14);
  --panel-w: 340px;
  --sidebar-w: 56px;
  --font-11: 11px;
  --font-12: 12px;
  --font-13: 13px;
  --font-14: 14px;
  --font-15: 15px;
  --font-16: 16px;
  --font-17: 17px;
  --font-18: 18px;
  --font-24: 24px;
  --font-28: 28px;
  --radius-4: 4px;
  --radius-6: 6px;
  --radius-7: 7px;
  --radius-8: 8px;
  --radius-9: 9px;
  --radius-10: 10px;
  --radius-12: 12px;
  --radius-14: 14px;
  --radius-16: 16px;
  --radius-18: 18px;
  --radius-20: 20px;
  --radius-22: 22px;
  --radius-30: 30px;
  --radius-40: 40px;
  --radius-999: 999px;
  --radius-sm: var(--radius-4);
  --radius-md: var(--radius-8);
  --radius-lg: var(--radius-16);
  --space-2: 2px;
  --space-3: 3px;
  --space-4: 4px;
  --space-5: 5px;
  --space-6: 6px;
  --space-8: 8px;
  --space-9: 9px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-18: 18px;
  --space-20: 20px;
  --space-22: 22px;
  --space-24: 24px;
  --space-28: 28px;
  --space-32: 32px;
  --space-40: 40px;
  --label-inv: 1;
  --plus-scale: 1.5;
  --zoom-inv: 1;
  --zoom-inv-raw: 1;
  --toast-bg: var(--surface-float);
  --toast-border: var(--stroke-default);
  --toast-error-border: var(--red);
  --toast-error-text: var(--red);
  --toast-shadow: var(--shadow-surface);
  --toast-success-border: var(--green);
  --toast-success-text: var(--green);
  --toast-text: var(--text-primary);
  --toast-warn-border: var(--gold);
  --toast-warn-text: var(--gold);
  --tooltip-bg: rgba(255, 255, 255, 0.98);
  --tooltip-shadow: 0 4px 16px var(--black-20);
  --tooltip-text: rgba(0, 0, 0, 0.9);
  --preset-menu-bg: var(--surface-node);
  --preset-menu-border: var(--stroke-default);
  --preset-menu-radius: var(--radius-lg);
  --preset-menu-shadow: var(--shadow-toolbar);
  --preset-menu-blur: 32px;
  --preset-menu-header-text: var(--text-secondary);
  --preset-menu-custom-title: var(--blue);
  --preset-menu-badge-bg: var(--gold);
  --preset-menu-badge-text: var(--black-90);
}
:root,
[data-theme='dark'] {
  --bg: #080809;
  --bg-header: transparent;
  --bg-sidebar: transparent;
  --bg-2: rgba(22, 22, 28, 0.98);
  --bg-panel: rgba(18, 18, 22, 0.95);
  --bg-panel-card: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-node: #16161a;
  --bg-node-dark: #121214;
  --bg-loader: #1e1e1e;
  --text-1: #ffffff;
  --text-2: rgba(255, 255, 255, 0.6);
  --text-3: rgba(255, 255, 255, 0.28);
  --text-70: rgba(255, 255, 255, 0.7);
  --text-85: rgba(255, 255, 255, 0.85);
  --text-95: rgba(255, 255, 255, 0.95);
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-strong: var(--text-95);
  --text-secondary: var(--text-70);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-subtle: rgba(255, 255, 255, 0.35);
  --text-placeholder: var(--text-3);
  --text-disabled: var(--text-3);
  --white: #ffffff;
  --white-02: rgba(255, 255, 255, 0.02);
  --white-05: rgba(255, 255, 255, 0.05);
  --white-10: rgba(255, 255, 255, 0.1);
  --white-20: rgba(255, 255, 255, 0.2);
  --white-50: rgba(255, 255, 255, 0.5);
  --white-90: rgba(255, 255, 255, 0.9);
  --black: #000000;
  --black-20: rgba(0, 0, 0, 0.2);
  --black-50: rgba(0, 0, 0, 0.5);
  --black-70: rgba(0, 0, 0, 0.7);
  --black-90: rgba(0, 0, 0, 0.9);
  --black-95: rgba(0, 0, 0, 0.95);
  --border: rgba(255, 255, 255, 0.08);
  --border-node: rgba(255, 255, 255, 0.1);
  --stroke-05: rgba(255, 255, 255, 0.05);
  --stroke-07: rgba(255, 255, 255, 0.07);
  --stroke-08: rgba(255, 255, 255, 0.08);
  --stroke-10: rgba(255, 255, 255, 0.1);
  --stroke-11: rgba(255, 255, 255, 0.11);
  --stroke-12: rgba(255, 255, 255, 0.12);
  --stroke-14: rgba(255, 255, 255, 0.14);
  --stroke-15: rgba(255, 255, 255, 0.15);
  --stroke-weak: var(--stroke-05);
  --stroke-default: var(--stroke-08);
  --stroke-strong: var(--stroke-12);
  --stroke-multi-select-box: rgba(255, 255, 255, 0.35);
  --stroke-multi-select-toolbar: var(--stroke-default);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.25);
  --green: #10b981;
  --green-btn: linear-gradient(135deg, #059669, #10b981);
  --indigo: #6366f1;
  --purple: #8b5cf6;
  --fuchsia: #d946ef;
  --red: #ef4444;
  --red-10: rgba(239, 68, 68, 0.1);
  --red-15: rgba(239, 68, 68, 0.15);
  --red-35: rgba(239, 68, 68, 0.35);
  --red-40: rgba(239, 68, 68, 0.4);
  --cyan: #06b6d4;
  --gold: #f59e0b;
  --green-15: rgba(16, 185, 129, 0.15);
  --cyan-15: rgba(6, 182, 212, 0.15);
  --purple-15: rgba(139, 92, 246, 0.15);
  --indigo-15: rgba(99, 102, 241, 0.15);
  --gold-15: rgba(245, 158, 11, 0.15);
  --cyan-text: #22d3ee;
  --purple-text: #a78bfa;
  --gold-text: #fbbf24;
  --indigo-text: #a5b4fc;
  --brand-gradient: linear-gradient(135deg, var(--blue), var(--purple));
  --indigo-gradient: linear-gradient(135deg, var(--indigo), var(--purple));
  --indigo-10: rgba(99, 102, 241, 0.1);
  --indigo-12: rgba(99, 102, 241, 0.12);
  --indigo-18: rgba(99, 102, 241, 0.18);
  --indigo-30: rgba(99, 102, 241, 0.3);
  --indigo-35: rgba(99, 102, 241, 0.35);
  --indigo-45: rgba(99, 102, 241, 0.45);
  --indigo-50: rgba(99, 102, 241, 0.5);
  --indigo-55: rgba(99, 102, 241, 0.55);
  --indigo-70: rgba(99, 102, 241, 0.7);
  --shadow-fab: 0 4px 20px rgba(99, 102, 241, 0.55);
  --shadow-fab-hover: 0 6px 28px rgba(99, 102, 241, 0.75);
  --shadow-surface: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-surface-strong: 0 16px 64px rgba(0, 0, 0, 0.9);
  --shadow-dialog: 0 24px 80px rgba(0, 0, 0, 0.6);
  --shadow-menu: 0 24px 60px var(--black-70), 0 0 0 0.5px var(--white-05) inset;
  --shadow-quote: 0 12px 50px var(--black-90);
  --shadow-banner: 0 8px 40px var(--black-70), 0 0 0 0.5px var(--white-05) inset;
  --shadow-save-dialog: 0 24px 64px rgba(0, 0, 0, 0.8);
  --shadow-toolbar: 0 12px 48px var(--black-70);
  --shadow-mascot: 0 8px 32px var(--black-50), 0 0 0 1px var(--indigo-12);
  --shadow-popover: 0 12px 40px var(--black-50);
  --overlay-dim: rgba(0, 0, 0, 0.55);
  --overlay-preview: rgba(0, 0, 0, 0.9);
  --overlay-blur: 6px;
  --blur-menu: 32px;
  --blur-quote: 24px;
  --blur-banner: 20px;
  --blur-mascot: 16px;
  --blur-multi-select-toolbar: 10px;
  --surface-float: rgba(18, 18, 26, 0.98);
  --surface-stroke: var(--stroke-05);
  --surface-menu: rgba(20, 21, 26, 0.97);
  --surface-quote: rgba(20, 20, 28, 0.97);
  --surface-save-dialog: rgba(20, 20, 28, 0.98);
  --surface-banner: rgba(22, 22, 30, 0.97);
  --surface-panel: rgba(28, 28, 36, 0.97);
  --surface-video-track: rgba(18, 18, 18, 0.92);
  --surface-video-btn: rgba(55, 55, 58, 0.92);
  --surface-video-btn-hover: rgba(80, 80, 86, 0.92);
  --surface-multi-select-box: var(--bg-panel-card);
  --surface-multi-select-toolbar: var(--surface-menu);
  --fill-hover: var(--white-05);
  --fill-hover-strong: var(--white-10);
  --fill-hover-on-light: rgba(240, 240, 240, 0.92);
  --fill-active: var(--white-20);
  --fill-input: var(--bg-input);
  --fill-danger-soft: rgba(239, 68, 68, 0.15);
  --btn-danger-bg: var(--red);
  --btn-danger-bg-hover: var(--red);
  --stroke-danger: rgba(255, 100, 100, 0.5);
  --text-on-danger: rgba(255, 255, 255, 0.95);
  --text-danger: var(--red);
  --surface-icon-badge: rgba(0, 0, 0, 0.9);
  --surface-icon-badge-soft: rgba(255, 255, 255, 0.15);
  --text-on-icon-badge: rgba(255, 255, 255, 0.95);
  --muted-gray-90: rgba(200, 200, 205, 0.9);
  --action-btn-bg: rgba(70, 100, 200, 0.85);
  --action-btn-hover-bg: rgba(90, 130, 220, 0.95);
  --sidebar-pill-bg: #1c1c1e;
  --sidebar-pill-border: var(--stroke-05);
  --sidebar-pill-shadow: var(--shadow-surface);
  --sidebar-btn-hover-bg: var(--fill-hover-strong);
  --sidebar-sep: rgba(255, 255, 255, 0.1);
  --avatar-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  --about-overlay-bg: rgba(0, 0, 0, 0.65);
  --about-dialog-bg: rgba(22, 22, 32, 0.95);
  --about-dialog-radius: 20px;
  --about-dialog-shadow: var(--shadow-dialog);
  --conn-color: rgba(200, 200, 210, 0.5);
  --conn-hover: rgba(59, 130, 246, 0.9);
  --debug-header-bg: rgba(255, 165, 0, 0.1);
  --debug-header-border: rgba(255, 165, 0, 0.2);
  --debug-header-text: #facc15;
  --debug-body-bg: rgba(0, 0, 0, 0.4);
  --debug-body-text: #a78bfa;
}
[data-theme='light'] {
  --bg: #f0f0f5;
  --bg-header: rgba(255, 255, 255, 0.9);
  --bg-sidebar: rgba(255, 255, 255, 0.8);
  --bg-2: #ffffff;
  --bg-panel: rgba(255, 255, 255, 0.98);
  --bg-panel-card: rgba(0, 0, 0, 0.04);
  --bg-input: rgba(0, 0, 0, 0.06);
  --bg-node: #f8f8fa;
  --bg-node-dark: #e8e8ec;
  --bg-loader: #e0e0e5;
  --text-1: #000000;
  --text-2: rgba(0, 0, 0, 0.6);
  --text-3: rgba(0, 0, 0, 0.35);
  --text-70: rgba(0, 0, 0, 0.7);
  --text-85: rgba(0, 0, 0, 0.85);
  --text-95: rgba(0, 0, 0, 0.95);
  --text-primary: rgba(0, 0, 0, 0.9);
  --text-strong: var(--text-95);
  --text-secondary: var(--text-70);
  --text-muted: rgba(0, 0, 0, 0.5);
  --text-subtle: rgba(0, 0, 0, 0.35);
  --text-placeholder: var(--text-3);
  --text-disabled: var(--text-3);
  --white: #000000;
  --white-02: rgba(0, 0, 0, 0.02);
  --white-05: rgba(0, 0, 0, 0.05);
  --white-10: rgba(0, 0, 0, 0.1);
  --white-20: rgba(0, 0, 0, 0.2);
  --white-50: rgba(0, 0, 0, 0.5);
  --white-90: rgba(0, 0, 0, 0.9);
  --black: #000000;
  --black-20: rgba(0, 0, 0, 0.2);
  --black-50: rgba(0, 0, 0, 0.5);
  --black-70: rgba(0, 0, 0, 0.7);
  --black-90: rgba(0, 0, 0, 0.9);
  --black-95: rgba(0, 0, 0, 0.95);
  --border: rgba(0, 0, 0, 0.12);
  --border-node: rgba(0, 0, 0, 0.18);
  --stroke-05: rgba(0, 0, 0, 0.06);
  --stroke-07: rgba(0, 0, 0, 0.08);
  --stroke-08: rgba(0, 0, 0, 0.1);
  --stroke-10: rgba(0, 0, 0, 0.12);
  --stroke-11: rgba(0, 0, 0, 0.14);
  --stroke-12: rgba(0, 0, 0, 0.16);
  --stroke-14: rgba(0, 0, 0, 0.18);
  --stroke-15: rgba(0, 0, 0, 0.2);
  --stroke-weak: var(--stroke-05);
  --stroke-default: var(--stroke-08);
  --stroke-strong: var(--stroke-12);
  --stroke-multi-select-box: rgba(0, 0, 0, 0.35);
  --stroke-multi-select-toolbar: var(--stroke-default);
  --blue: #3b82f6;
  --blue-dim: rgba(59, 130, 246, 0.25);
  --green: #10b981;
  --green-btn: linear-gradient(135deg, #059669, #10b981);
  --indigo: #6366f1;
  --purple: #8b5cf6;
  --fuchsia: #d946ef;
  --red: #ef4444;
  --red-10: rgba(239, 68, 68, 0.1);
  --red-15: rgba(239, 68, 68, 0.15);
  --red-35: rgba(239, 68, 68, 0.35);
  --red-40: rgba(239, 68, 68, 0.4);
  --cyan: #06b6d4;
  --gold: #f59e0b;
  --green-15: rgba(16, 185, 129, 0.15);
  --cyan-15: rgba(6, 182, 212, 0.15);
  --purple-15: rgba(139, 92, 246, 0.15);
  --indigo-15: rgba(99, 102, 241, 0.15);
  --gold-15: rgba(245, 158, 11, 0.15);
  --cyan-text: #0891b2;
  --purple-text: #7c3aed;
  --gold-text: #d97706;
  --indigo-text: #4f46e5;
  --brand-gradient: linear-gradient(135deg, var(--blue), var(--purple));
  --indigo-gradient: linear-gradient(135deg, var(--indigo), var(--purple));
  --indigo-10: rgba(99, 102, 241, 0.1);
  --indigo-12: rgba(99, 102, 241, 0.12);
  --indigo-18: rgba(99, 102, 241, 0.18);
  --indigo-30: rgba(99, 102, 241, 0.3);
  --indigo-35: rgba(99, 102, 241, 0.35);
  --indigo-45: rgba(99, 102, 241, 0.45);
  --indigo-50: rgba(99, 102, 241, 0.5);
  --indigo-55: rgba(99, 102, 241, 0.55);
  --indigo-70: rgba(99, 102, 241, 0.7);
  --shadow-fab: 0 4px 20px rgba(99, 102, 241, 0.4);
  --shadow-fab-hover: 0 6px 28px rgba(99, 102, 241, 0.55);
  --shadow-surface: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-surface-strong: 0 16px 64px rgba(0, 0, 0, 0.2);
  --shadow-dialog: 0 24px 80px rgba(0, 0, 0, 0.2);
  --shadow-menu: 0 24px 60px var(--black-20), 0 0 0 0.5px var(--white-10) inset;
  --shadow-quote: 0 12px 50px var(--black-20);
  --shadow-banner: 0 8px 40px var(--black-20), 0 0 0 0.5px var(--white-10) inset;
  --shadow-save-dialog: 0 24px 64px rgba(0, 0, 0, 0.25);
  --shadow-toolbar: 0 12px 48px var(--black-20);
  --shadow-mascot: 0 8px 32px var(--black-20), 0 0 0 1px var(--indigo-12);
  --shadow-popover: 0 12px 40px var(--black-20);
  --overlay-dim: rgba(0, 0, 0, 0.35);
  --overlay-preview: rgba(0, 0, 0, 0.75);
  --overlay-blur: 6px;
  --blur-menu: 32px;
  --blur-quote: 24px;
  --blur-banner: 20px;
  --blur-mascot: 16px;
  --blur-multi-select-toolbar: 10px;
  --surface-float: rgba(255, 255, 255, 0.98);
  --surface-stroke: var(--stroke-05);
  --surface-menu: rgba(255, 255, 255, 0.97);
  --surface-quote: rgba(255, 255, 255, 0.97);
  --surface-save-dialog: rgba(255, 255, 255, 0.98);
  --surface-banner: rgba(255, 255, 255, 0.97);
  --surface-panel: rgba(255, 255, 255, 0.97);
  --surface-video-track: rgba(240, 240, 240, 0.92);
  --surface-video-btn: rgba(220, 220, 220, 0.92);
  --surface-video-btn-hover: rgba(200, 200, 200, 0.92);
  --surface-multi-select-box: var(--bg-panel-card);
  --surface-multi-select-toolbar: var(--surface-menu);
  --fill-hover: var(--white-05);
  --fill-hover-strong: var(--white-10);
  --fill-hover-on-light: rgba(240, 240, 240, 0.92);
  --fill-active: var(--white-20);
  --fill-input: var(--bg-input);
  --fill-danger-soft: rgba(239, 68, 68, 0.15);
  --btn-danger-bg: var(--red);
  --btn-danger-bg-hover: var(--red);
  --stroke-danger: rgba(255, 100, 100, 0.5);
  --text-on-danger: rgba(255, 255, 255, 0.95);
  --text-danger: var(--red);
  --surface-icon-badge: rgba(0, 0, 0, 0.9);
  --surface-icon-badge-soft: rgba(0, 0, 0, 0.08);
  --text-on-icon-badge: rgba(255, 255, 255, 0.95);
  --muted-gray-90: rgba(100, 100, 105, 0.9);
  --action-btn-bg: rgba(70, 100, 200, 0.85);
  --action-btn-hover-bg: rgba(90, 130, 220, 0.95);
  --sidebar-pill-bg: #e8e8ec;
  --sidebar-pill-border: var(--stroke-05);
  --sidebar-pill-shadow: var(--shadow-surface);
  --sidebar-btn-hover-bg: var(--fill-hover-strong);
  --sidebar-sep: rgba(0, 0, 0, 0.1);
  --avatar-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  --about-overlay-bg: rgba(0, 0, 0, 0.35);
  --about-dialog-bg: rgba(255, 255, 255, 0.95);
  --about-dialog-radius: 20px;
  --about-dialog-shadow: var(--shadow-dialog);
  --conn-color: rgba(100, 100, 110, 0.5);
  --conn-hover: rgba(59, 130, 246, 0.9);
  --debug-header-bg: rgba(255, 165, 0, 0.1);
  --debug-header-border: rgba(255, 165, 0, 0.2);
  --debug-header-text: #ca8a04;
  --debug-body-bg: rgba(0, 0, 0, 0.05);
  --debug-body-text: #7c3aed;
}
*,
::after,
::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
[hidden] {
  display: none !important;
}
body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 13px;
  user-select: none;
  -webkit-user-select: none;
}
#v2-server-disconnect-alert {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  background-color: var(--red);
  color: #fff;
  text-align: center;
  font-weight: 500;
  font-size: var(--font-14);
  z-index: 999999;
  box-shadow: 0 4px 12px var(--red-40);
  pointer-events: none;
}
#v2-initial-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-loader);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}
.loader-brand {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-strong);
}
.v2-svg-defs {
  position: absolute;
  width: 0;
  height: 0;
}
.gooey-loader {
  position: relative;
  width: 200px;
  height: 120px;
  filter: url('#goo');
  display: flex;
  justify-content: center;
  align-items: center;
}
.gooey-dot {
  position: absolute;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  border-radius: 50%;
  top: 30px;
}
.gooey-dot-left {
  left: 30px;
  animation: morph-left 1.4s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95) alternate;
}
.gooey-dot-right {
  right: 30px;
  background: linear-gradient(135deg, var(--purple), var(--fuchsia));
  animation: morph-right 1.4s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95) alternate;
}
@keyframes morph-left {
  0% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(40px) scale(1.5);
  }
  100% {
    transform: translateX(75px) scale(0.8);
  }
}
@keyframes morph-right {
  0% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(-40px) scale(1.5);
  }
  100% {
    transform: translateX(-75px) scale(0.8);
  }
}
#v2-debug {
  display: none;
}
.fab-btn {
  position: absolute;
  bottom: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-gradient);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-fab);
  z-index: 30;
  transition: all 0.25s;
  animation: fabPulse 3s ease-in-out infinite;
}
.fab-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-fab-hover);
}
@keyframes fabPulse {
  0%,
  100% {
    box-shadow: var(--shadow-fab);
  }
  50% {
    box-shadow:
      0 4px 30px var(--indigo-80),
      0 0 0 10px var(--indigo-08);
  }
}
.sidebar-floating .sidebar-logo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.sidebar-floating .sidebar-logo-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--indigo-18);
  border: 1px solid var(--indigo-35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s;
  padding: 0;
}
.sidebar-floating .sidebar-logo-btn:hover {
  background: var(--indigo-35);
  border-color: var(--indigo-60);
}
.canvas-proj-dropdown {
  display: none;
  position: fixed;
  width: 340px;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-18);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
}
.canvas-proj-dropdown.open {
  display: flex;
}
.cpd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--stroke-07);
}
.cpd-title {
  color: var(--white-78);
  font-size: 18px;
  font-weight: 600;
}
.cpd-close {
  background: 0 0;
  border: none;
  color: var(--white-40);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}
.cpd-close:hover {
  color: var(--white);
}
.cpd-list {
  flex: 1;
  max-height: 400px;
  overflow-y: auto;
  padding: 6px 0;
}
.cpd-empty,
.cpd-loading {
  padding: 16px;
  color: var(--white-30);
  font-size: 16px;
  text-align: center;
}
.cpd-item {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  cursor: pointer;
  gap: 10px;
  transition: background 0.15s;
}
.cpd-item:hover {
  background: var(--stroke-07);
}
.cpd-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--indigo-20);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cpd-item-info {
  flex: 1;
  overflow: hidden;
}
.cpd-item-name {
  color: var(--white-80);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cpd-item-left {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.cpd-item-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-shrink: 0;
}
.cpd-item-delete {
  padding: var(--space-6);
  cursor: pointer;
  border-radius: var(--radius-4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition:
    background 0.2s,
    opacity 0.2s;
  background: 0 0;
}
.cpd-item-delete:hover {
  opacity: 1;
  background: var(--fill-danger-soft);
}
.cpd-confirm-panel {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}
.cpd-confirm-btn {
  padding: var(--space-4) var(--space-10);
  font-size: var(--font-13);
  font-weight: 500;
  border-radius: var(--radius-4);
  cursor: pointer;
  border: 1px solid var(--stroke-default);
  background: var(--fill-hover-strong);
  color: var(--text-primary);
}
.cpd-confirm-btn--danger {
  background: var(--btn-danger-bg);
  border-color: var(--stroke-danger);
  color: var(--text-on-danger);
}
.cpd-confirm-btn--danger:hover {
  background: var(--btn-danger-bg-hover);
}
.cpd-confirm-btn--neutral:hover {
  background: var(--fill-active);
}
.cpd-item-date {
  color: var(--white-30);
  font-size: 16px;
  margin-top: 1px;
}
.cpd-footer {
  border-top: 1px solid var(--stroke-07);
  padding: 8px 10px;
}
.cpd-new-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--indigo-20);
  border: 1px solid var(--indigo-35);
  color: var(--indigo-text);
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.cpd-new-btn:hover {
  background: var(--indigo-35);
  color: var(--white);
}
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg-header);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  pointer-events: none;
}
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  width: var(--header-left-coverage);
  max-width: var(--header-left-coverage);
  min-width: 0;
}
.logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}
.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}
.logo-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}
.project-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
#projectNameEl {
  display: none;
}
body.in-gallery #btnBackToGallery,
body.in-gallery #projectNameEl {
  display: none;
}
.project-name:hover {
  background: var(--white-06);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-community,
.btn-credits,
.btn-tapies {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-tapies {
  background: var(--gold-15);
  border-color: var(--gold-15);
  color: var(--gold);
}
.btn-tapies:hover {
  background: var(--gold-15);
}
.btn-credits {
  background: var(--indigo-12);
  border-color: var(--indigo-25);
  color: var(--indigo-text);
  font-weight: 600;
}
.btn-credits:hover {
  background: var(--indigo-20);
}
.btn-community {
  background: 0 0;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-community:hover {
  color: var(--text-primary);
  background: var(--white-05);
}
.btn-share {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--stroke-07);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-share:hover {
  background: var(--white-12);
  color: var(--text-primary);
}
.btn-icon {
  width: 30px;
  height: 30px;
  background: 0 0;
  border: none;
  color: var(--text-secondary);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.btn-icon:hover {
  background: var(--white-08);
  color: var(--text-primary);
}
.add-menu {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--white-10);
  border-radius: 14px;
  width: 200px;
  padding: 8px;
  box-shadow: 0 10px 40px var(--black-60);
  display: none;
  z-index: 1000;
  transform: scale(1.5);
  transform-origin: top left;
}
.main-layout {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
}
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 0;
  z-index: 50;
}
.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
}
.sidebar-sep {
  width: 28px;
  height: 1px;
  background: var(--border);
}
.sidebar-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  color: var(--text-secondary);
  background: 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.sidebar-btn:hover {
  background: var(--white-08);
  color: var(--text-primary);
}
.sidebar-btn.active {
  background: var(--white-12);
  color: var(--text-primary);
}
.add-btn {
  width: 36px;
  height: 36px;
  background: var(--white-10);
  border-radius: 10px;
  margin-bottom: 4px;
}
.add-btn:hover {
  background: var(--white-18);
}
.connect-btn {
  width: 34px;
  height: 34px;
  background: var(--green-btn);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 14px var(--green-30);
}
.connect-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 20px var(--green-30);
}
.connect-btn.active {
  box-shadow:
    0 0 0 3px var(--green-30),
    0 5px 20px var(--green-30);
}
.canvas-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  background-image: radial-gradient(circle, var(--white-06) 1px, transparent 1px);
  background-size: 22px 22px;
  cursor: grab;
}
.canvas-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, var(--blue-10) 0, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.canvas-wrapper:active {
  cursor: grabbing;
}
.canvas {
  position: absolute;
  transform-origin: 0 0;
  will-change: transform;
}
.connections-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}
.node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  cursor: default;
  z-index: 10;
}
.node.selected {
  z-index: 100;
}
.node.dragging {
  z-index: 200;
  cursor: grabbing;
}
.node.selected .node-label {
  color: var(--white-80);
}
.node-card {
  background: var(--bg-node);
  border: 1.5px solid var(--border-node);
  border-radius: var(--node-r);
  width: 220px;
  min-width: 160px;
  min-height: 100px;
  position: relative;
  transition: border-color 0.2s;
}
.media-card {
  width: auto;
  min-width: 100px;
  max-width: none;
}
.media-card .node-img,
.media-card video {
  max-width: none;
  min-height: 100px;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.node.selected:not(.comment-note-node) .node-card {
  border-color: var(--blue);
  box-shadow:
    0 0 0 2px var(--blue-50),
    0 10px 40px var(--blue-30);
}
.node.selected:not(.comment-note-node) .node-card.media-card {
  border-color: transparent;
  box-shadow: none;
}
.node:not(.selected) .node-card:hover {
  border-color: var(--white-20);
}
.node-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--node-r) - 1.5px) calc(var(--node-r) - 1.5px) 0 0;
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.node-upload-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}
.img-node-preview:hover .node-upload-hint,
.node-card:hover .node-upload-hint {
  opacity: 1;
}
.upload-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--black-70);
  border: 1px solid var(--white-18);
  color: var(--white-90);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.upload-btn:hover {
  background: var(--bg-panel-card);
}
.node-port {
  display: none;
}
.out-port {
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
}
.in-port {
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--green);
}
.text-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 260px;
  height: 260px;
  min-width: unset;
  border: 1px solid transparent;
  transition: border-color 0.2s;
  background: var(--bg);
  border-radius: 18px;
}
.text-card-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--white-70);
  outline: 0;
  cursor: text;
  overflow-y: auto;
  max-height: 100%;
}
.node-group {
  position: absolute;
  border: 1.5px solid var(--indigo-60);
  background: var(--indigo-05);
  border-radius: 14px;
  z-index: 2;
  pointer-events: auto;
  cursor: grab;
  display: flex;
  flex-direction: column;
  opacity: 0.92;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}
.node-group:hover {
  border-color: var(--indigo-70);
  background: var(--indigo-08);
  opacity: 1;
}
.node-group.selected {
  background: var(--indigo-15);
  z-index: 3;
  opacity: 1;
}
.node-group.selected::after {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border: 9px solid var(--current-group-color, var(--indigo-30));
  opacity: 0.8;
  border-radius: 22px;
  pointer-events: none;
  box-shadow: 0 0 35px var(--indigo-50);
}
.node-group-title {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 4px;
  font-size: 23px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 2px 4px;
  white-space: nowrap;
  transition: all 0.2s;
  user-select: text;
  cursor: text;
  transform-origin: bottom left;
  transform: scale(var(--zoom-inv, 1));
  z-index: 101;
}
.node-group:hover .node-group-title {
  color: var(--text-primary);
}
.node-group.selected .node-group-title {
  color: var(--white-80);
}
.node-group.highlight-contain {
  border-color: var(--indigo-60);
  background: var(--indigo-08);
  box-shadow: 0 0 30px var(--indigo-35);
}
.group-resizer {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
  z-index: 10;
  opacity: 0.4;
  transition: opacity 0.2s;
  background-image: linear-gradient(
    135deg,
    transparent 50%,
    var(--white-40) 50%,
    var(--white-40) 60%,
    transparent 60%,
    transparent 70%,
    var(--white-40) 70%
  );
}
.node-group:hover .group-resizer,
.v2-node:hover .group-resizer {
  opacity: 0.85;
}
.group-resizer:hover {
  opacity: 1;
  transform: scale(1.3);
}
.node-group.resizing {
  border-color: var(--white-40);
  cursor: nwse-resize;
}
.group-toolbar {
  position: absolute;
  bottom: calc(100% + 36px);
  left: 50%;
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel-card);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--white-12);
  box-shadow: 0 12px 48px var(--black-70);
  z-index: 100;
  pointer-events: auto;
  transform-origin: bottom center;
}
.node-group.selected .group-toolbar {
  display: flex;
}
.gt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: 0 0;
  border: none;
  border-radius: 8px;
  color: var(--white-78);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.gt-btn:hover {
  background: var(--white-06);
  color: var(--white);
}
.gt-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.gt-btn-sep {
  width: 1px;
  height: 16px;
  background: var(--white-10);
  margin: 0 2px;
}
.gt-color-wrap {
  position: relative;
}
.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--white-30);
}
.gt-color-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--surface-float);
  border: 1px solid var(--white-15);
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 12px 32px var(--black-60);
  z-index: 101;
}
.gt-color-menu.show {
  display: grid;
}
.color-option {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--white-10);
  cursor: pointer;
  transition: transform 0.2s;
}
.color-option:hover {
  transform: scale(1.15);
  border-color: var(--white-40);
}
.gt-btn-run {
  color: var(--indigo-text);
}
.gt-btn-run:hover {
  background: var(--indigo-15);
}
.gt-btn-workflow {
  color: var(--indigo-text);
  opacity: 1;
}
.gt-btn-workflow:hover {
  background: var(--indigo-15);
}
.gt-btn-ungroup {
  color: var(--red-light);
}
.gt-btn-ungroup:hover {
  background: var(--red-10);
}
.source-text-card {
  position: relative;
  padding: 8px;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--white-06);
  border-left: 3px solid var(--cyan-30);
  background: linear-gradient(135deg, var(--bg-panel-card), var(--bg-panel-card));
  border-radius: 14px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.source-text-card:hover {
  border-color: var(--cyan-15);
}
.source-text-content {
  font-size: var(--prompt-font-size, 13px);
  line-height: 1.65;
  color: var(--white-50);
  outline: 0;
  overflow-y: auto;
  width: 100%;
  height: auto;
  min-height: 40px;
  word-wrap: break-word;
  white-space: pre-wrap;
  padding: 10px;
}
.source-text-content,
.v2-rt-editor {
  word-break: break-word;
}
.source-text-content h1,
.v2-rt-editor h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: var(--text-primary);
}
.source-text-content h2,
.v2-rt-editor h2 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: var(--text-primary);
}
.source-text-content h3,
.v2-rt-editor h3 {
  font-size: 1.17em;
  margin-bottom: 0.5em;
  font-weight: 600;
  color: var(--text-primary);
}
.source-text-content p,
.v2-rt-editor p {
  margin-bottom: 1em;
}
.source-text-content ol,
.source-text-content ul,
.v2-rt-editor ol,
.v2-rt-editor ul {
  margin-bottom: 1em;
  padding-left: 2em;
}
.source-text-content hr,
.v2-rt-editor hr {
  border: none;
  border-top: 1px solid var(--stroke-10);
  margin: 2em 0;
}
.source-text-content:focus {
  color: var(--white-80);
}
.source-text-footer {
  position: absolute;
  bottom: 6px;
  right: 10px;
  pointer-events: none;
  z-index: 5;
}
.source-text-info {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--white-20);
  background: var(--bg-panel-card);
  padding: 2px 6px;
  border-radius: 6px;
}
.node.source-text-node.selected .source-text-card {
  border-color: var(--cyan-30);
  border-left-color: var(--cyan-30);
  box-shadow:
    0 8px 36px var(--black-80),
    0 0 20px var(--cyan-15);
}
.node.source-text-editing .source-text-card {
  border-color: var(--cyan-30);
  border-left-color: var(--cyan);
  box-shadow:
    0 8px 36px var(--black-80),
    0 0 24px var(--cyan-15);
}
.node.source-text-editing .source-text-content,
.source-text-content:focus {
  color: var(--white);
}
.source-text-content[contenteditable='false'] {
  cursor: default;
}
.text-prompt-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px) scale(var(--zoom-inv));
  transform-origin: top center;
  width: 616px;
  background: var(--bg-elevated);
  border: 1px solid var(--white-08);
  border-radius: 18px;
  padding: 8px 12px 10px;
  box-shadow: 0 8px 36px var(--black-70);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.node-ref-bar {
  position: relative;
  width: 100%;
  background: 0 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  transition: all 0.3s ease;
  border-radius: 16px 16px 0 0;
}
.node-ref-bar.active {
  border-bottom: none;
  padding: 10px 0;
  margin-bottom: 0;
  overflow: visible;
}
.ref-thumb-container {
  display: flex;
  gap: 8px;
  overflow: visible;
  flex: 1;
}
.ref-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ref-thumb-wrap:hover {
  z-index: 30;
}
.ref-thumb-wrap .ref-thumb-media {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--black);
  object-fit: cover;
  border: 1.5px solid var(--white-10);
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ref-thumb-wrap .ref-thumb-audio,
.ref-thumb-wrap .ref-thumb-text {
  background: 0 0;
  border: none;
  box-shadow: none;
}
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: 0 0;
}
::-webkit-scrollbar-thumb {
  background: var(--white-10);
  border-radius: 4px;
}
.canvas-wrapper.space-pan {
  cursor: grab;
}
.canvas-wrapper.space-pan:active {
  cursor: grabbing;
}
.ref-thumb-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  overflow: visible;
}
.side-plus-btn {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-panel-card);
  border: 1.5px solid var(--white-25);
  color: var(--white-40);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition:
    transform 80ms ease-out,
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow: 0 3px 14px var(--black-50);
  font-family: inherit;
}
.side-plus-btn.active,
.side-plus-btn:hover {
  background: var(--blue-15);
  border-color: var(--blue-30);
  color: var(--blue-light);
  transform: scale(1.12);
  box-shadow: 0 4px 18px var(--blue-30);
}
#nodePickerOverlay {
  z-index: 700;
}
#nodePicker > div {
  position: relative;
}
#nodePicker > div:hover > div:first-child {
  color: var(--white-90);
}
@keyframes menuPop {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
  }
}
.node.selected .node-card {
  border-color: var(--blue);
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
}
.skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}
.skeleton-bar {
  height: 12px;
  background: var(--white-10);
  border-radius: 6px;
  animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    opacity: 0.6;
  }
}
.node-resizer {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  cursor: nwse-resize;
  z-index: 110;
  opacity: 0;
  transition: opacity 0.2s;
}
.node-resizer:hover,
.node.resizing .node-resizer {
  opacity: 1;
}
.node-resizer::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  border-right: 2.5px solid var(--white-90);
  border-bottom: 2.5px solid var(--white-90);
  border-radius: 0 0 12px 0;
  pointer-events: none;
}
.conn-hover-path {
  cursor: pointer;
  pointer-events: stroke;
}
.conn-scissor-btn {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--white-10);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 1001;
  pointer-events: auto;
  box-shadow: 0 4px 12px var(--black-40);
  animation: connBtnFade 0.2s ease-out;
  transition:
    transform 0.2s,
    background 0.2s;
}
.conn-scissor.plus-btn {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--white-10);
  border: 1px solid var(--white-20);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  transform: scale(var(--plus-scale));
}
.conn-scissor-btn:hover {
  background: var(--bg-elevated);
  transform: translate(-50%, -50%) scale(1.1);
}
.conn-scissor-btn svg {
  pointer-events: none;
}
.conn-path-highlight {
  stroke: var(--white-80);
  stroke-width: 3px;
  filter: drop-shadow(0 0 6px var(--white-40));
}
@keyframes connBtnFade {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
.conn-drag-path {
  pointer-events: none;
  stroke-dasharray: 4;
}
.img-node-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: 0 0;
}
.img-top-block {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}
.img-bottom-block {
  background: var(--surface-float);
  border: 1px solid var(--white-08);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 260px;
  box-sizing: border-box;
}
.img-node-preview {
  width: 260px;
  height: 260px;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
  flex-shrink: 0;
  overflow: hidden;
}
.img-node-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white-20);
  pointer-events: none;
  user-select: none;
}
#btnBackToGallery {
  margin-right: -4px;
}
.project-name {
  display: flex;
  align-items: center;
  gap: 2px;
}
#projectNameText {
  outline: 0;
  min-width: 40px;
}
#projectNameText:focus {
  background: var(--white-05);
}
#btnCreateNewProjectHeader {
  opacity: 0.5;
  width: 20px;
  height: 20px;
  padding: 0;
  transition: all 0.2s;
  margin-left: 8px;
  background: var(--white-05);
}
#btnCreateNewProjectHeader:hover {
  opacity: 1;
  background: var(--white-10);
}
.at-mention-menu {
  position: fixed;
  background: var(--bg-elevated);
  border: 1px solid var(--white-10);
  box-shadow: 0 8px 32px var(--black-80);
  border-radius: 12px;
  padding: 6px;
  z-index: 10000;
  display: none;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
}
.at-mention-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 15px;
  transition: background 0.1s;
}
.at-mention-item.active,
.at-mention-item:hover {
  background: var(--white-20);
  color: #fff;
  box-shadow:
    inset 0 0 0 1px var(--white-30),
    inset 0 0 16px var(--white-15),
    0 0 12px var(--white-15);
}
.at-mention-thumb {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--white-10);
}
.at-mention-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
}
.dev-mode-only {
  display: none;
}
body.dev-mode .dev-mode-only {
  display: inline-flex;
}
.preview-mode-only {
  display: none;
}
body.preview-mode .preview-mode-only {
  display: inline-flex;
}
body.dev-mode .prompt-dev-tool {
  display: flex;
}
.dev-entry-wrap {
  position: fixed;
  top: var(--space-10);
  right: var(--space-10);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.dev-entry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 36px;
  padding: 0 var(--space-10);
  border: 1px solid var(--white-12);
  border-radius: var(--radius-10);
  background: var(--bg-panel-card);
  color: var(--text-primary);
  font-size: var(--font-12);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px var(--black-30);
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
}
.dev-entry-btn:hover {
  background: var(--fill-hover);
  border-color: var(--white-20);
  transform: translateY(-1px);
}
.dev-entry-btn:active {
  transform: translateY(0);
}
.dev-entry-btn.is-active {
  background: var(--indigo-80);
  border-color: var(--indigo-45);
  box-shadow: 0 10px 36px var(--indigo-30);
}
.preview-node .preview-card {
  background: var(--bg-panel-card);
  border: 1px solid var(--purple-20);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    transform 0.3s,
    border-color 0.3s;
  will-change: transform;
}
.preview-node.receiving .preview-card {
  border-color: var(--purple-30);
  transform: scale(1.01);
}
.preview-header {
  background: var(--purple-10);
  border-bottom: 1px solid var(--purple-15);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--purple-light);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.preview-content-area {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  position: relative;
  min-height: 200px;
}
.preview-content-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-20);
  font-size: 13px;
  font-weight: 500;
  animation: placeholderShimmer 2s infinite linear;
  pointer-events: none;
}
@keyframes placeholderShimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
.preview-content-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.preview-content-text {
  width: 100%;
  height: 100%;
  padding: 18px;
  color: var(--white-80);
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  overflow-y: auto;
  white-space: pre-wrap;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: var(--purple-20) transparent;
}
.preview-content-text::-webkit-scrollbar {
  width: 6px;
}
.preview-content-text::-webkit-scrollbar-thumb {
  background: var(--purple-20);
  border-radius: 3px;
}
.preview-node .node-port.in-port {
  background: var(--purple-light);
  box-shadow: 0 0 10px var(--purple-30);
}
.prompt-dev-tool {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--purple-15);
  border: 1px solid var(--purple-30);
  color: var(--purple-light);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.prompt-dev-tool:hover {
  background: var(--purple-25);
  border-color: var(--purple-30);
  transform: scale(1.05);
}
.prompt-dev-tool:active {
  transform: scale(0.95);
}
.custom-confirm-overlay {
  position: fixed;
  inset: 0;
  background: var(--black-60);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.custom-confirm-box {
  background: var(--bg-node);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 320px;
  padding: 24px;
  box-shadow: 0 20px 50px var(--black-50);
  animation: confirmPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.confirm-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
  text-align: center;
}
.confirm-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.5;
}
.confirm-btns {
  display: flex;
  gap: 12px;
}
.confirm-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.confirm-cancel {
  background: var(--white-05);
  color: #fff;
}
.confirm-cancel:hover {
  background: var(--white-10);
}
.confirm-ok {
  background: var(--red);
  color: #fff;
}
.confirm-ok:hover {
  background: var(--red);
}
@keyframes confirmPop {
  from {
    transform: scale(0.9) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.pc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}
.pc-time {
  background: var(--white-05);
  padding: 2px 8px;
  border-radius: 6px;
  color: var(--white-50);
}
.pc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pc-text-snippet {
  padding: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  height: 100%;
  background: var(--white-02);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}
.sidebar-floating {
  position: fixed;
  left: var(--space-20);
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-node);
  border-radius: var(--radius-18);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  z-index: 1000;
  box-shadow: var(--shadow-menu);
  border: 1px solid var(--stroke-default);
}
.sidebar-floating .avatar-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 5px;
}
.sidebar-floating .avatar-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface-float);
  border: 1px solid var(--white-10);
  border-radius: 10px;
  padding: 6px;
  min-width: 130px;
  box-shadow: 0 12px 36px var(--black-70);
  z-index: 800;
  animation: menuPop 0.15s ease;
}
.sidebar-floating #avatarMenu {
  bottom: 0;
  top: auto;
  left: calc(100% + 4px);
  right: auto;
}
.sidebar-floating .avatar-menu.open {
  display: block;
}
.sidebar-floating .avatar-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  background: 0 0;
  border: none;
  color: var(--white-78);
  font-family: inherit;
  padding: 8px 10px;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.sidebar-floating #avatarMenu .avatar-menu-item {
  font-size: 16px;
}
.sidebar-floating .avatar-menu-item:hover {
  background: var(--stroke-07);
  color: #fff;
}
.sidebar-floating .sidebar-flex-spacer {
  flex: 1;
}
.sidebar-floating .sidebar-btn-v3 {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-20);
  background: 0 0;
  color: var(--text-secondary);
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.sidebar-floating .sidebar-btn-v3:hover {
  color: #fff;
  background: var(--sidebar-btn-hover-bg);
}
.sidebar-floating #btnAssets svg {
  transition: transform 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: 50% 50%;
}
.sidebar-floating #btnAssets:hover svg {
  transform: rotate(90deg);
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-floating #btnAssets svg {
    transition: none;
  }
  .sidebar-floating #btnAssets:hover svg {
    transform: none;
  }
}
.sidebar-floating .add-btn-v3 {
  background: #fff;
  color: #000;
  margin-bottom: var(--space-6);
}
.sidebar-floating .add-btn-v3:hover {
  background: #fff;
  color: #000;
  transform: scale(1.05);
}
.sidebar-floating .sidebar-sep-v3 {
  width: 20px;
  height: 1px;
  background: var(--sidebar-sep);
  margin: var(--space-4) 0;
}
.sidebar-floating .user-avatar-v3 {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-18);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 2px solid transparent;
  padding: 0;
  transition: all 0.2s;
  box-shadow: var(--avatar-shadow);
}
.sidebar-floating .user-avatar-v3:hover {
  transform: scale(1.05);
}
.sidebar-floating .user-gear-plain {
  width: var(--sidebar-settings-btn-size);
  height: var(--sidebar-settings-btn-size);
  display: flex;
  justify-content: center;
  align-items: center;
  background: 0 0;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--sidebar-settings-icon-size);
  font-family: inherit;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.sidebar-floating .user-gear-plain:hover {
  color: var(--text-strong);
}
.canvas-controls-floating {
  position: fixed;
  bottom: var(--space-24);
  left: var(--space-20);
  background: var(--surface-node);
  border-radius: var(--radius-18);
  padding: var(--space-8) var(--space-14);
  display: flex;
  align-items: center;
  gap: var(--space-10);
  z-index: 1000;
  box-shadow: var(--shadow-menu);
  border: 1px solid var(--stroke-default);
}
.cc-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-20);
  background: 0 0;
  color: var(--text-secondary);
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}
.cc-btn:hover {
  color: #fff;
  background: var(--fill-hover-strong);
}
.cc-btn.active {
  color: var(--text-strong);
  background: var(--fill-active);
}
[data-tooltip] {
  position: relative;
}
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  box-shadow: var(--tooltip-shadow);
  font-weight: 500;
  opacity: 0;
  animation: tooltipFadeIn 0.2s forwards;
  animation-delay: 0.1s;
}
[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: var(--tooltip-bg) transparent transparent transparent;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  animation: tooltipFadeIn 0.2s forwards;
  animation-delay: 0.1s;
}
@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
[data-tooltip-right] {
  position: relative;
}
[data-tooltip-right]:hover::after {
  content: attr(data-tooltip-right);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  box-shadow: var(--tooltip-shadow);
  font-weight: 500;
  opacity: 0;
  animation: tooltipRightFadeIn 0.2s forwards;
  animation-delay: 0.1s;
}
[data-tooltip-right]:hover::before {
  content: '';
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-style: solid;
  border-color: transparent var(--tooltip-bg) transparent transparent;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  animation: tooltipRightFadeIn 0.2s forwards;
  animation-delay: 0.1s;
}
@keyframes tooltipRightFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}
.cc-divider {
  width: 1px;
  height: 18px;
  background: var(--white-10);
  margin: 0 4px;
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 6px;
}
.zoom-slider {
  width: 140px;
  height: 6px;
  border-radius: 3px;
  background: var(--white-20);
  -webkit-appearance: none;
  outline: 0;
}
.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 6px var(--black-40);
}
.zoom-percent {
  color: var(--white-90);
  font-size: 14px;
  font-weight: 600;
  min-width: 45px;
}
.minimap-wrapper {
  position: fixed;
  bottom: calc(var(--space-24) + 54px + 5px);
  left: var(--space-20);
  width: 200px;
  height: 140px;
  background: var(--surface-node);
  border-radius: var(--radius-18);
  z-index: 990;
  overflow: hidden;
  box-shadow: var(--shadow-menu);
  border: 1px solid var(--stroke-default);
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.minimap-wrapper.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.minimap {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--white-02);
}
.minimap-viewport {
  position: absolute;
  border: 1.5px solid var(--stroke-30);
  background: var(--white-05);
  cursor: move;
  z-index: 10;
}
.minimap-node {
  position: absolute;
  background: var(--white-20);
  border-radius: 2px;
  pointer-events: none;
}
.minimap-node.image {
  background: var(--blue-30);
}
.minimap-node.text {
  background: var(--gold-30);
}
.minimap-node.video {
  background: var(--purple-30);
}
.minimap-node.audio {
  background: var(--cyan-30);
}
.sidebar-floating .avatar-menu-sep {
  height: 1px;
  background: var(--stroke-08);
  margin: 4px 8px;
}
.about-overlay#aboutOverlay {
  display: none;
}
.about-overlay {
  position: fixed;
  inset: 0;
  background: var(--about-overlay-bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: aboutFadeIn 0.25s ease;
}
@keyframes aboutFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.about-dialog {
  position: relative;
  width: 360px;
  background: var(--about-dialog-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-20);
  padding: var(--space-40) var(--space-32) var(--space-28);
  text-align: center;
  box-shadow: var(--about-dialog-shadow);
  animation: aboutSlideIn 0.3s cubic-bezier(0.2, 0, 0.2, 1);
}
@keyframes aboutSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.about-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: 0 0;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s;
}
.about-close:hover {
  background: var(--white-10);
  color: #fff;
}
.about-logo {
  margin-bottom: 16px;
}
.about-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}
.about-version {
  display: inline-block;
  padding: 4px 16px;
  background: linear-gradient(135deg, var(--blue-15), var(--purple-15));
  border: 1px solid var(--blue-25);
  border-radius: 20px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  cursor: default;
  user-select: none;
  transition: all 0.2s;
}
.about-version:hover {
  border-color: var(--blue-30);
}
.about-author {
  font-size: 15px;
  color: var(--white-70);
  margin-bottom: 16px;
}
.about-author strong {
  color: var(--white-90);
  font-weight: 600;
}
.about-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--blue-10);
  border: 1px solid var(--blue-25);
  border-radius: 12px;
  color: var(--blue-bright);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 24px;
}
.about-link:hover {
  background: var(--blue-20);
  border-color: var(--blue-30);
  transform: translateY(-1px);
}
.about-footer {
  font-size: 11px;
  color: var(--white-25);
  border-top: 1px solid var(--white-06);
  padding-top: 16px;
}
.about-dev-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 28px;
  background: var(--bg-panel-card);
  border: 1px solid var(--purple-30);
  border-radius: 12px;
  color: var(--purple-light);
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 10px 40px var(--black-50);
  animation: aboutToastIn 0.3s ease;
}
@keyframes aboutToastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
.canvas-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
  pointer-events: auto;
  margin-left: 8px;
  flex: 1;
  min-width: 0;
}
.canvas-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 1 auto;
  width: auto;
  max-width: calc(100% - 34px);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.canvas-tabs::-webkit-scrollbar {
  display: none;
}
.canvas-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 500;
  color: var(--white-50);
  background: 0 0;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s;
  user-select: none;
  min-width: 60px;
  max-width: 160px;
  position: relative;
}
.canvas-tab:hover {
  color: var(--white-80);
  background: var(--white-06);
}
.canvas-tab.active {
  color: var(--white);
  background: var(--indigo-18);
  border-color: var(--indigo-35);
}
.canvas-tab-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  outline: 0;
}
.canvas-tab-name[contenteditable='true'] {
  background: var(--white-08);
  border-radius: 3px;
  padding: 1px 4px;
  min-width: 40px;
  cursor: text;
}
.canvas-tab-close {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: 0 0;
  border: none;
  color: var(--white-30);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  transition:
    color 0.15s,
    background 0.15s;
  flex-shrink: 0;
}
.canvas-tab-close:hover {
  color: var(--red);
  background: var(--red-15);
}
.canvas-tab-add {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--indigo-12);
  border: 1px solid var(--indigo-40);
  color: var(--white-80);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.15s,
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}
body.in-gallery .canvas-tabs-wrap {
  display: none;
}
.sidebar-floating .sidebar-btn-v3,
.sidebar-floating .sidebar-canvas-btn {
  position: relative;
}
.sidebar-floating .sidebar-btn-v3 .ico-hover,
.sidebar-floating .sidebar-btn-v3 .ico-normal,
.sidebar-floating .sidebar-canvas-btn .ico-hover,
.sidebar-floating .sidebar-canvas-btn .ico-normal {
  transition:
    opacity 0.2s ease,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0) scale(1);
  pointer-events: none;
}
.sidebar-floating .sidebar-btn-v3 .ico-hover,
.sidebar-floating .sidebar-canvas-btn .ico-hover {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);
}
.sidebar-floating .add-btn-v3:hover .ico-normal {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.5);
}
.sidebar-floating .add-btn-v3:hover .ico-hover {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0) scale(1);
}
.sidebar-floating .sidebar-canvas-btn:hover .ico-normal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}
.sidebar-floating .sidebar-canvas-btn:hover .ico-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.source-text-content[data-placeholder]::before {
  content: attr(data-placeholder);
  color: var(--white-35);
  pointer-events: none;
  cursor: text;
}
#v2-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  cursor: var(--pointer-cursor);
  background-color: var(--bg);
  background-size: 22px 22px;
  background-position: var(--bg-x, 0) var(--bg-y, 0);
}
#v2-wrap.has-grid-dots {
  background-image: radial-gradient(circle, var(--white-04) 1px, transparent 1px);
}
#v2-wrap.is-video-keying-mode > :not(#v2-canvas) {
  opacity: 0.12;
  filter: saturate(0.6);
  pointer-events: none;
}
#v2-wrap.is-video-keying-mode #v2-canvas .v2-node {
  opacity: 0.12;
  filter: saturate(0.6);
}
#v2-wrap.is-video-keying-mode #v2-canvas .v2-node.is-video-keying-target {
  opacity: 1;
  filter: none;
}
#v2-wrap.is-video-keying-mode .text-prompt-panel {
  opacity: 0.12;
  filter: saturate(0.6);
  pointer-events: none;
}
#v2-wrap.is-video-keying-mode #v2-canvas #v2-edges-wrapper {
  opacity: 0.12;
}
#v2-wrap.is-video-clip-mode > :not(#v2-canvas) {
  opacity: 0.12;
  filter: saturate(0.6);
  pointer-events: none;
}
#v2-wrap.is-video-clip-mode #v2-canvas .v2-node {
  opacity: 0.12;
  filter: saturate(0.6);
}
#v2-wrap.is-video-clip-mode #v2-canvas .v2-node.is-video-clip-target {
  opacity: 1;
  filter: none;
}
#v2-wrap.is-video-clip-mode .text-prompt-panel {
  opacity: 0.12;
  filter: saturate(0.6);
  pointer-events: none;
}
#v2-wrap.is-video-clip-mode #v2-canvas #v2-edges-wrapper {
  opacity: 0.12;
}
#v2-wrap.is-audio-clip-mode > :not(#v2-canvas) {
  opacity: 0.12;
  filter: saturate(0.6);
  pointer-events: none;
}
#v2-wrap.is-audio-clip-mode #v2-canvas .v2-node {
  opacity: 0.12;
  filter: saturate(0.6);
}
#v2-wrap.is-audio-clip-mode #v2-canvas .v2-node.is-audio-clip-target {
  opacity: 1;
  filter: none;
}
#v2-wrap.is-audio-clip-mode .text-prompt-panel {
  opacity: 0.12;
  filter: saturate(0.6);
  pointer-events: none;
}
#v2-wrap.is-audio-clip-mode #v2-canvas #v2-edges-wrapper {
  opacity: 0.12;
}
#v2-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, var(--blue-10) 0, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
#v2-wrap.theme-light {
  background-color: var(--bg-elevated);
  background-image: radial-gradient(circle, var(--black-10) 1px, transparent 1px);
}
#v2-wrap.theme-light::before {
  display: none;
}
.empty-hint {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  pointer-events: none;
  z-index: 2;
  user-select: none;
}
.empty-hint.hidden {
  display: none;
}
.empty-hint-main {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
}
.hint-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white-08);
  padding: 12px 28px;
  border-radius: 40px;
  color: #fff;
}
.empty-hint-pills {
  display: flex;
  align-items: center;
  gap: 20px;
  pointer-events: auto;
}
.v2-empty-hint-title {
  font-weight: 500;
  font-size: var(--font-28);
}
.v2-empty-hint-subtitle {
  color: var(--text-secondary);
  font-size: var(--font-28);
}
.pill-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white-05);
  border: 1px solid var(--white-10);
  border-radius: 40px;
  color: var(--text-secondary);
  padding: 14px 26px;
  font-size: 24px;
  cursor: var(--link-cursor);
  font-family: inherit;
  transition: all 0.2s;
}
.pill-btn:hover {
  background: var(--white-10);
  color: var(--text-primary);
  border-color: var(--white-18);
}
.v2-multi-select-box {
  position: absolute;
  background: var(--surface-multi-select-box);
  border: calc(1.5px * var(--zoom-inv, 1)) dashed var(--stroke-multi-select-box);
  border-radius: calc(var(--radius-12) * var(--zoom-inv, 1));
  transform-origin: 0 0;
  z-index: 120;
  pointer-events: none;
  display: none;
  will-change: width, height, transform;
}
.v2-multi-select-tab {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(calc(-50px * var(--zoom-inv, 1))) scale(var(--zoom-inv, 1));
  display: flex;
  width: max-content;
  flex-wrap: nowrap;
  gap: var(--space-8);
  background: var(--surface-multi-select-toolbar);
  padding: var(--space-6) var(--space-14);
  border-radius: var(--radius-8);
  border: 1px solid var(--stroke-multi-select-toolbar);
  pointer-events: auto;
  backdrop-filter: blur(var(--blur-multi-select-toolbar));
  transform-origin: bottom center;
  will-change: transform;
}
.v2-multi-select-btn {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--space-6);
  white-space: nowrap;
  background: 0 0;
  color: var(--text-primary);
  border: none;
  cursor: var(--link-cursor);
  font-size: var(--font-14);
  font-weight: 500;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-6);
  transition: background 0.2s;
}
.v2-multi-select-btn:hover {
  background: var(--fill-hover);
}
.v2-multi-select-btn:active {
  background: var(--fill-hover-strong);
}
.v2-align-center-btn.is-disabled,
.v2-multi-select-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.v2-align-center-panel {
  position: absolute;
  left: 0;
  top: 0;
  width: 228px;
  height: 228px;
  pointer-events: none;
  z-index: 220;
  transform: translate(-50%, -50%) scale(var(--zoom-inv, 1));
  transform-origin: center center;
  will-change: transform;
}
.v2-align-center-btn {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 1px solid var(--white-12);
  border-radius: var(--radius-8);
  background: var(--black-80);
  color: var(--white-90);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: var(--link-cursor);
  pointer-events: auto;
  box-shadow: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}
.v2-align-center-btn:hover {
  background: var(--black-65);
  border-color: var(--indigo-55);
  transform: translateY(-1px);
}
.v2-align-center-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.v2-align-center-btn.slot-1 {
  left: 14px;
  top: 14px;
}
.v2-align-center-btn.slot-2 {
  left: 93px;
  top: 14px;
}
.v2-align-center-btn.slot-3 {
  left: 172px;
  top: 14px;
}
.v2-align-center-btn.slot-4 {
  left: 14px;
  top: 93px;
}
.v2-align-center-btn.slot-6 {
  left: 172px;
  top: 93px;
}
.v2-align-center-btn.slot-7 {
  left: 14px;
  top: 172px;
}
.v2-align-center-btn.slot-8 {
  left: 93px;
  top: 172px;
}
.v2-align-center-btn.slot-9 {
  left: 172px;
  top: 172px;
}
.v2-snap-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
}
.v2-snap-guide-line {
  position: absolute;
  background: var(--indigo-80);
  box-shadow: 0 0 6px var(--indigo-40);
}
.v2-snap-guide-line.is-vertical {
  width: 1px;
  transform: translateX(-0.5px);
}
.v2-snap-guide-line.is-horizontal {
  height: 1px;
  transform: translateY(-0.5px);
}
.v2-crop-overlay {
  position: fixed;
  inset: 0;
  background: 0 0;
  z-index: 5000;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: translateZ(0);
}
.v2-crop-overlay.visible {
  opacity: 1;
}
.v2-crop-container {
  position: relative;
  transform: translateZ(0);
  overflow: hidden;
  border-radius: 16px;
  will-change: transform;
}
.v2-crop-dim-mask {
  position: fixed;
  inset: 0;
  background: var(--black-82);
  pointer-events: none;
  z-index: 5001;
}
.v2-crop-box {
  position: absolute;
  border: 2px solid var(--white-35);
  box-sizing: border-box;
  cursor: move;
  z-index: 5002;
  will-change: transform, width, height;
  transform: translate3d(0, 0, 0);
  box-shadow: inset 0 0 0 9999px var(--white-10);
  transform-origin: 0 0;
}
.v2-crop-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--white-08);
  pointer-events: none;
}
.v2-crop-handle {
  position: absolute;
  width: 26px;
  height: 26px;
  background: 0 0;
  border: none;
  box-sizing: border-box;
  z-index: 5001;
}
.v2-crop-handle.tl {
  top: -2px;
  left: -2px;
  cursor: nwse-resize;
}
.v2-crop-handle.tr {
  top: -2px;
  right: -2px;
  cursor: nesw-resize;
}
.v2-crop-handle.bl {
  bottom: -2px;
  left: -2px;
  cursor: nesw-resize;
}
.v2-crop-handle.br {
  bottom: -2px;
  right: -2px;
  cursor: nwse-resize;
}
.v2-crop-handle.tm {
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
  width: 44px;
  height: 14px;
}
.v2-crop-handle.bm {
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
  width: 44px;
  height: 14px;
}
.v2-crop-handle.lm {
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
  width: 14px;
  height: 44px;
}
.v2-crop-handle.rm {
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
  width: 14px;
  height: 44px;
}
.v2-crop-handle.bl::after,
.v2-crop-handle.br::after,
.v2-crop-handle.tl::after,
.v2-crop-handle.tr::after {
  content: '';
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border-radius: 0;
}
.v2-crop-handle.tl::after {
  border-left: 4px solid var(--canvas-white);
  border-top: 4px solid var(--canvas-white);
}
.v2-crop-handle.tr::after {
  border-right: 4px solid var(--canvas-white);
  border-top: 4px solid var(--canvas-white);
}
.v2-crop-handle.bl::after {
  border-left: 4px solid var(--canvas-white);
  border-bottom: 4px solid var(--canvas-white);
}
.v2-crop-handle.br::after {
  border-right: 4px solid var(--canvas-white);
  border-bottom: 4px solid var(--canvas-white);
}
.v2-crop-handle.bm::after,
.v2-crop-handle.lm::after,
.v2-crop-handle.rm::after,
.v2-crop-handle.tm::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}
.v2-crop-handle.bm::after,
.v2-crop-handle.tm::after {
  width: 32px;
  height: 6px;
  background: var(--canvas-white);
}
.v2-crop-handle.lm::after,
.v2-crop-handle.rm::after {
  width: 6px;
  height: 32px;
  background: var(--canvas-white);
}
.v2-crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
}
.v2-crop-grid > div {
  border: 1px solid var(--white-20);
}
.v2-annotate-overlay {
  position: fixed;
  inset: 0;
  background: var(--black-70);
  z-index: 5200;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.v2-annotate-overlay.visible {
  opacity: 1;
}
.v2-annotate-container {
  position: fixed;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 80px var(--black-60);
}
.v2-annotate-stage {
  position: relative;
  width: 100%;
  height: 100%;
}
.v2-annotate-stage.is-whiteboard {
  background: var(--canvas-white);
}
.v2-annotate-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
.v2-annotate-stage.is-whiteboard .v2-annotate-img {
  opacity: 0;
}
.v2-annotate-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: crosshair;
}
.v2-annotate-cursor {
  position: fixed;
  left: 0;
  top: 0;
  border: 1.5px solid var(--canvas-white);
  border-radius: 999px;
  background: 0 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5350;
  mix-blend-mode: normal;
  box-shadow: none;
}
.v2-annotate-cursor.is-erase-brush {
  border-color: var(--white-90);
  background:
    linear-gradient(
      45deg,
      var(--white-10) 25%,
      transparent 25%,
      transparent 75%,
      var(--white-10) 75%
    ),
    linear-gradient(
      45deg,
      var(--white-10) 25%,
      transparent 25%,
      transparent 75%,
      var(--white-10) 75%
    );
  background-position:
    0 0,
    6px 6px;
  background-size: 12px 12px;
  box-shadow:
    inset 0 0 0 1px var(--black-15),
    0 0 0 1px var(--black-15);
  mix-blend-mode: normal;
}
.v2-annotate-text-input {
  position: fixed;
  z-index: 5360;
  min-width: 48px;
  max-width: 320px;
  height: calc(var(--annotate-text-input-size, 14px) + 4px);
  line-height: calc(var(--annotate-text-input-size, 14px) + 4px);
  padding: 0 2px;
  border-radius: 8px;
  border: 1px solid var(--blue-border-focus);
  background: var(--bg-panel-card);
  color: var(--annotate-text-input-color, var(--text-primary));
  font-size: var(--annotate-text-input-size, 14px);
  font-weight: 600;
  caret-color: var(--annotate-text-input-color, var(--text-primary));
  outline: 0;
  box-shadow:
    0 0 0 1px var(--blue-25),
    0 8px 20px var(--black-45);
}
.v2-annotate-text-input::placeholder {
  color: var(--text-secondary);
}
.v2-annotate-toolbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel-card);
  border: 1px solid var(--white-12);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 12px 48px var(--black-70);
  z-index: 5300;
}
.v2-annotate-toolbar.v2-annotate-generation-toolbar {
  background: var(--bg-panel-card);
  border: 1px solid var(--white-12);
  border-radius: 14px;
  padding: 6px 10px;
  gap: 6px;
  box-shadow: 0 12px 48px var(--black-70);
  z-index: 5300;
}
.v2-annotate-toolbar.v2-annotate-generation-toolbar .v2-expand-toolbar-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--white-78);
}
.v2-annotate-gen-prompt-wrap {
  display: flex;
  align-items: center;
  min-width: 240px;
  flex: 1 1 240px;
}
.v2-annotate-gen-prompt-input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--white-12);
  background: var(--white-06);
  color: var(--white-90);
  font-size: 13px;
  outline: 0;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}
.v2-annotate-gen-prompt-input::placeholder {
  color: var(--text-secondary);
}
.v2-annotate-gen-prompt-input:hover {
  background: var(--white-08);
}
.v2-annotate-gen-prompt-input:focus {
  border-color: var(--blue-border-focus);
  background: var(--white-08);
  box-shadow: 0 0 0 3px var(--blue-15);
}
.v2-annotate-toolbar.v2-annotate-generation-toolbar .v2-expand-toolbar-btn:focus-visible,
.v2-annotate-toolbar.v2-annotate-generation-toolbar .v2-expand-toolbar-btn:hover {
  background: var(--white-10);
  color: var(--white);
}
.v2-annotate-toolbar.v2-annotate-generation-toolbar .v2-expand-divider {
  height: 14px;
  background: var(--white-15);
  margin: 0 2px;
}
.v2-annotate-toolbar.v2-annotate-generation-toolbar .model-text,
.v2-annotate-toolbar.v2-annotate-generation-toolbar .ratio-text,
.v2-annotate-toolbar.v2-annotate-generation-toolbar .size-text {
  color: inherit;
}
.v2-annotate-toolbar.v2-annotate-generation-toolbar .v2-expand-toolbar-btn.go {
  background: var(--action-btn-hover-bg);
  color: var(--text-strong);
  border: 1px solid var(--blue-border-focus);
  box-shadow:
    0 0 0 1px var(--blue-25),
    0 10px 24px var(--blue-40),
    0 0 28px var(--blue-20);
}
.v2-annotate-toolbar.v2-annotate-generation-toolbar .v2-expand-toolbar-btn.go:focus-visible,
.v2-annotate-toolbar.v2-annotate-generation-toolbar .v2-expand-toolbar-btn.go:hover {
  background: var(--blue-border-focus);
  color: var(--canvas-white);
  box-shadow:
    0 0 0 1px var(--blue-40),
    0 12px 28px var(--blue-50),
    0 0 36px var(--blue-25);
}
.v2-annotate-btn {
  display: flex;
  height: 36px;
  padding: 0 12px;
  background: 0 0;
  border: none;
  border-radius: 10px;
  color: var(--white-78);
  font-size: 14px;
  font-weight: 500;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}
.v2-annotate-btn.icon-only {
  width: 36px;
  padding: 0;
}
.v2-annotate-btn.icon-only svg {
  display: block;
}
.v2-annotate-toolbar .v2-annotate-btn.act-cancel {
  color: var(--text-danger);
}
.v2-annotate-toolbar .v2-annotate-btn.act-cancel:active,
.v2-annotate-toolbar .v2-annotate-btn.act-cancel:hover {
  background: var(--fill-danger-soft);
  color: var(--text-danger);
}
.v2-annotate-btn:hover {
  background: var(--white-10);
  color: var(--white);
}
.v2-annotate-btn.active {
  background: var(--indigo-20);
  border: 1px solid var(--indigo-50);
  color: var(--white);
  box-shadow: 0 0 12px var(--indigo-30);
}
.v2-annotate-divider {
  width: 1px;
  height: 14px;
  background: var(--white-15);
  margin: 0 2px;
}
.v2-annotate-colorwrap {
  position: relative;
  display: flex;
  align-items: center;
}
.v2-annotate-color-toggle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--white-06);
  border: 1px solid var(--white-12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-annotate-color-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--black-20);
  background: var(--annotate-red);
  box-sizing: border-box;
}
.v2-annotate-color-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-save-dialog);
  border: 1px solid var(--white-12);
  box-shadow: 0 12px 48px var(--black-70);
  display: none;
  z-index: 5400;
}
.v2-annotate-colorwrap.open .v2-annotate-color-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}
.v2-annotate-swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--black-20);
  background: var(--swatch, var(--white));
  box-sizing: border-box;
}
.v2-annotate-swatch[data-color='var(--white)'] {
  border-color: var(--white-25);
}
.v2-annotate-swatch.active {
  box-shadow: 0 0 0 2px var(--white-90);
}
.v2-annotate-swatch[data-color] {
  background: var(--swatch, var(--white));
}
.v2-annotate-swatch[data-color='red'] {
  background: var(--annotate-red);
}
.v2-annotate-swatch[data-color='orange'] {
  background: var(--annotate-orange);
}
.v2-annotate-swatch[data-color='yellow'] {
  background: var(--annotate-yellow);
}
.v2-annotate-swatch[data-color='green'] {
  background: var(--annotate-green);
}
.v2-annotate-swatch[data-color='blue'] {
  background: var(--annotate-blue);
}
.v2-annotate-swatch[data-color='purple'] {
  background: var(--annotate-purple);
}
.v2-annotate-swatch[data-color='white'] {
  background: var(--canvas-white);
}
.v2-annotate-size {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--white-06);
  border: 1px solid var(--white-12);
}
.v2-annotate-size-value {
  min-width: 30px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--white-90);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  flex: 0 0 30px;
}
.v2-annotate-size-range {
  width: 120px;
}
.v2-annotate-save {
  background: var(--canvas-white);
  color: var(--bg);
}
.v2-annotate-save:hover {
  background: var(--white-90);
  color: var(--bg);
  box-shadow: inset 0 0 0 1px var(--white-35);
}
.v2-matting-overlay {
  position: fixed;
  inset: 0;
  background: var(--black-70);
  z-index: 5050;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.v2-matting-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.v2-matting-container {
  position: fixed;
  pointer-events: auto;
  z-index: 5100;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 80px var(--black-60);
}
.v2-matting-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}
.v2-matting-canvas {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: crosshair;
}
.v2-matting-cursor {
  position: fixed;
  left: 0;
  top: 0;
  border: 1.5px solid var(--white-90);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5350;
  mix-blend-mode: difference;
  box-shadow: 0 0 0 1px var(--black-15);
}
.v2-matting-toolbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel-card);
  border: 1px solid var(--white-12);
  border-radius: 14px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 12px 48px var(--black-70);
  z-index: 5300;
}
.v2-matting-btn {
  display: flex;
  height: 36px;
  padding: 0 12px;
  background: 0 0;
  border: 1px solid transparent;
  box-sizing: border-box;
  border-radius: 10px;
  color: var(--white-78);
  font-size: 14px;
  font-weight: 500;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  white-space: nowrap;
}
.v2-matting-btn.icon-only {
  width: 36px;
  padding: 0;
}
.v2-matting-btn.icon-only svg {
  display: block;
}
.v2-matting-toolbar .v2-matting-btn.act-cancel {
  color: var(--text-danger);
}
.v2-matting-toolbar .v2-matting-btn.act-cancel:active,
.v2-matting-toolbar .v2-matting-btn.act-cancel:hover {
  background: var(--fill-danger-soft);
  color: var(--text-danger);
}
.v2-matting-btn:hover {
  background: var(--white-10);
  color: var(--white);
}
.v2-matting-btn:disabled,
.v2-matting-btn[aria-disabled='true'] {
  opacity: 0.45;
  color: var(--white-35);
  cursor: not-allowed;
}
.v2-matting-btn:disabled:hover,
.v2-matting-btn[aria-disabled='true']:hover {
  background: 0 0;
  color: var(--white-35);
}
.v2-matting-btn.active {
  background: var(--indigo-20);
  border: 1px solid var(--indigo-50);
  color: var(--white);
  box-shadow: 0 0 12px var(--indigo-30);
}
.v2-matting-divider {
  width: 1px;
  height: 14px;
  background: var(--white-15);
  margin: 0 2px;
}
.v2-matting-size {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--white-06);
  border: 1px solid var(--white-12);
}
.v2-matting-size-value {
  width: 32px;
  flex: 0 0 32px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--white-90);
  font-variant-numeric: tabular-nums;
}
.v2-matting-size-range {
  width: 120px;
}
.v2-matting-save {
  background: var(--canvas-white);
  color: var(--bg);
}
.v2-matting-save:hover {
  background: var(--white-90);
  color: var(--bg);
  box-shadow: inset 0 0 0 1px var(--white-35);
}
.v2-expand-overlay {
  position: fixed;
  inset: 0;
  background: var(--black-82);
  z-index: 5000;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.v2-expand-overlay.visible {
  opacity: 1;
}
.v2-expand-frame {
  position: fixed;
  border: 2px solid var(--white-35);
  border-radius: 18px;
  box-sizing: border-box;
  box-shadow: 0 18px 80px var(--black-60);
  pointer-events: auto;
  cursor: move;
  touch-action: none;
}
.v2-expand-frame::after,
.v2-expand-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
}
.v2-expand-frame::before {
  border: 1px solid var(--white-08);
}
.v2-expand-handle {
  position: absolute;
  width: 26px;
  height: 26px;
  background: 0 0;
  border: none;
  box-sizing: border-box;
  z-index: 5001;
}
.v2-expand-handle.tl {
  top: -2px;
  left: -2px;
  cursor: nwse-resize;
}
.v2-expand-handle.tr {
  top: -2px;
  right: -2px;
  cursor: nesw-resize;
}
.v2-expand-handle.bl {
  bottom: -2px;
  left: -2px;
  cursor: nesw-resize;
}
.v2-expand-handle.br {
  bottom: -2px;
  right: -2px;
  cursor: nwse-resize;
}
.v2-expand-handle.tm {
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
  width: 44px;
  height: 14px;
  opacity: 1;
}
.v2-expand-handle.bm {
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  cursor: ns-resize;
  width: 44px;
  height: 14px;
  opacity: 1;
}
.v2-expand-handle.lm {
  top: 50%;
  left: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
  width: 14px;
  height: 44px;
  opacity: 1;
}
.v2-expand-handle.rm {
  top: 50%;
  right: -7px;
  transform: translateY(-50%);
  cursor: ew-resize;
  width: 14px;
  height: 44px;
  opacity: 1;
}
.v2-expand-handle.bl::after,
.v2-expand-handle.br::after,
.v2-expand-handle.tl::after,
.v2-expand-handle.tr::after {
  content: '';
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border-radius: 0;
}
.v2-expand-handle.tl::after {
  border-left: 4px solid var(--canvas-white);
  border-top: 4px solid var(--canvas-white);
}
.v2-expand-handle.tr::after {
  border-right: 4px solid var(--canvas-white);
  border-top: 4px solid var(--canvas-white);
}
.v2-expand-handle.bl::after {
  border-left: 4px solid var(--canvas-white);
  border-bottom: 4px solid var(--canvas-white);
}
.v2-expand-handle.br::after {
  border-right: 4px solid var(--canvas-white);
  border-bottom: 4px solid var(--canvas-white);
}
.v2-expand-handle.bm::after,
.v2-expand-handle.lm::after,
.v2-expand-handle.rm::after,
.v2-expand-handle.tm::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}
.v2-expand-handle.bm::after,
.v2-expand-handle.tm::after {
  width: 32px;
  height: 6px;
  background: var(--canvas-white);
}
.v2-expand-handle.lm::after,
.v2-expand-handle.rm::after {
  width: 6px;
  height: 32px;
  background: var(--canvas-white);
}
.v2-expand-img {
  position: fixed;
  border-radius: 14px;
  box-shadow: 0 12px 60px var(--black-65);
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}
.v2-crop-size-label,
.v2-expand-size-label {
  position: fixed;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke-default);
  box-shadow: var(--shadow-popover);
  pointer-events: none;
  white-space: nowrap;
  z-index: 5003;
}
body.is-dragging #v2-canvas,
body.is-dragging #v2-canvas *,
body.is-panning #v2-canvas,
body.is-panning #v2-canvas *,
body.is-zooming #v2-canvas,
body.is-zooming #v2-canvas * {
  transition: none;
}
body.is-panning #v2-canvas .side-plus-btn {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
body.is-dragging #v2-side-plus-holder {
  display: none;
}
body.is-dragging #v2-side-plus-holder.is-selection-plus-visible {
  display: block;
}
body.is-zooming #v2-canvas .side-plus-btn {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
body.is-dragging #v2-canvas .connection-main,
body.is-edge-interaction-lite #v2-canvas .connection-main,
body.is-panning #v2-canvas .connection-main {
  filter: none;
  transition: none;
}
body.is-dragging #v2-canvas .connection-bg,
body.is-edge-interaction-lite #v2-canvas .connection-bg,
body.is-panning #v2-canvas .connection-bg {
  display: none;
}
body.is-dragging #v2-canvas #v2-edges,
body.is-edge-interaction-lite #v2-canvas #v2-edges,
body.is-panning #v2-canvas #v2-edges {
  shape-rendering: optimizeSpeed;
}
body.is-dragging #v2-canvas .connection-group.connection-highlighted .connection-main,
body.is-dragging #v2-canvas .connection-group:hover .connection-main,
body.is-edge-interaction-lite #v2-canvas .connection-group.connection-highlighted .connection-main,
body.is-edge-interaction-lite #v2-canvas .connection-group:hover .connection-main,
body.is-panning #v2-canvas .connection-group.connection-highlighted .connection-main,
body.is-panning #v2-canvas .connection-group:hover .connection-main {
  stroke-width: 2px;
  filter: none;
}
body.is-panning #v2-canvas .node-card {
  box-shadow: none;
}
body.is-zooming #v2-canvas .connection-main {
  filter: none;
}
body.is-zooming #v2-canvas .connection-bg {
  display: none;
}
body.is-zooming #v2-canvas #v2-edges {
  opacity: 0.7;
  shape-rendering: optimizeSpeed;
}
body.is-zooming #v2-canvas .node-card {
  box-shadow: none;
}
body.is-viewport-animating #v2-canvas .node-card {
  box-shadow: none;
}
body.is-viewport-animating #v2-canvas .v2-multi-select-tab,
body.is-zooming #v2-canvas .v2-multi-select-tab {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
body.is-viewport-animating #v2-canvas .v2-align-center-btn,
body.is-zooming #v2-canvas .v2-align-center-btn {
  box-shadow: none;
}
body.is-panning #v2-canvas .v2-node.selected .node-floating-toolbar,
body.is-panning #v2-canvas .v2-node.selected .text-prompt-panel,
body.is-viewport-animating #v2-canvas .v2-node.selected .node-floating-toolbar,
body.is-viewport-animating #v2-canvas .v2-node.selected .text-prompt-panel,
body.is-zooming #v2-canvas .v2-node.selected .node-floating-toolbar,
body.is-zooming #v2-canvas .v2-node.selected .text-prompt-panel {
  pointer-events: auto;
}
body.is-viewport-animating #v2-canvas .node-floating-toolbar,
body.is-viewport-animating #v2-canvas .text-prompt-panel {
  transition: none;
}
body.is-zoom-low #v2-canvas .node-card {
  box-shadow: none;
}
body.is-zoom-low #v2-canvas .v2-node:not(.selected):not(.conn-src) .comment-note-content,
body.is-zoom-low #v2-canvas .v2-node:not(.selected):not(.conn-src) .node-ref-bar,
body.is-zoom-low #v2-canvas .v2-node:not(.selected):not(.conn-src) .prompt-textarea,
body.is-zoom-low #v2-canvas .v2-node:not(.selected):not(.conn-src) .source-text-content,
body.is-zoom-low #v2-canvas .v2-node:not(.selected):not(.conn-src) .source-text-footer,
body.is-zoom-low #v2-canvas .v2-node:not(.selected):not(.conn-src) .text-output-content,
body.is-zoom-low #v2-canvas .v2-node:not(.selected):not(.conn-src) .text-prompt-panel {
  display: none;
}
.node-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  font-size: 21px;
  font-weight: 500;
  color: var(--white-40);
  padding: 4px 8px;
  white-space: nowrap;
  cursor: var(--grab-cursor);
  user-select: none;
  pointer-events: auto;
  z-index: 10;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 6px;
  transition: all 0.2s;
  background: 0 0;
  border: 1px solid transparent;
  transform-origin: left bottom;
  transform: scale(var(--node-label-comp, 1));
}
.node-label[data-label-kind]::before {
  content: '';
  display: inline-block;
  margin-right: 6px;
  opacity: 0.8;
  transform: translateY(-0.5px);
  font-size: 16px;
  line-height: 1;
}
.node-label[data-label-kind='text']::before {
  content: 'T';
}
.node-label[data-label-kind='image']::before {
  content: '';
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A//www.w3.org/2000/svg'%20viewBox%3D'0%200%2024%2024'%3E%3Crect%20x%3D'3.5'%20y%3D'5.5'%20width%3D'17'%20height%3D'13'%20rx%3D'2'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'/%3E%3Ccircle%20cx%3D'9'%20cy%3D'10'%20r%3D'1.5'%20fill%3D'black'/%3E%3Cpath%20d%3D'M6.5%2016.5l4-4%203%203%202-2%202.5%202.5'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A//www.w3.org/2000/svg'%20viewBox%3D'0%200%2024%2024'%3E%3Crect%20x%3D'3.5'%20y%3D'5.5'%20width%3D'17'%20height%3D'13'%20rx%3D'2'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'/%3E%3Ccircle%20cx%3D'9'%20cy%3D'10'%20r%3D'1.5'%20fill%3D'black'/%3E%3Cpath%20d%3D'M6.5%2016.5l4-4%203%203%202-2%202.5%202.5'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'/%3E%3C/svg%3E");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}
.node-label[data-label-kind='video']::before {
  content: '▶';
}
.node-label[contenteditable='true'][data-label-kind]::before {
  opacity: 0.55;
}
.v2-node-beta-pill {
  display: inline-flex;
  align-items: center;
  font-size: var(--font-11);
  font-weight: 700;
  color: var(--toast-error-text);
  background: var(--surface-panel-card);
  border: 1px solid var(--toast-error-border);
  border-radius: var(--radius-999);
  padding: 1px var(--space-6);
  margin-left: var(--space-6);
  vertical-align: middle;
  letter-spacing: 0.4px;
}
.node-timer {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 2px 8px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 10;
  max-width: 100%;
  border-radius: 6px;
  transition: all 0.2s;
  background: 0 0;
  border: 1px solid transparent;
}
.node-video-meta {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  font-size: var(--font-12);
  font-weight: 600;
  color: var(--white-40);
  padding: 2px 8px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  z-index: 10;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 6px;
  transition: all 0.2s;
  background: 0 0;
  border: 1px solid transparent;
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  transform-origin: center top;
  font-variant-numeric: tabular-nums;
}
.node-video-meta[data-visible='0'] {
  display: none;
}
.v2-node.selected .node-video-meta {
  color: var(--white-90);
}
.v2-node-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-panel-card);
  border: 1px dashed var(--stroke-default);
  color: var(--text-primary);
  font-size: var(--font-12);
  border-radius: var(--radius-6);
  padding: var(--space-8);
  box-sizing: border-box;
  text-align: center;
}
.node-label:hover {
  color: var(--white-80);
  background: var(--white-08);
}
.v2-node.selected .node-label {
  color: var(--white-90);
  text-shadow: 0 0 10px var(--white-30);
}
.v2-node.selection-related:not(.selected) {
  --selection-related-color: var(--white);
  --selection-related-glow-strong: var(--white-60);
  --selection-related-glow-soft: var(--white-30);
  box-shadow:
    0 0 0 2px var(--selection-related-color),
    0 0 24px var(--selection-related-glow-strong),
    0 0 44px var(--selection-related-glow-soft);
  border-radius: var(--radius-12);
}
.v2-node.selection-related-color-blue:not(.selected) {
  --selection-related-color: var(--blue);
  --selection-related-glow-strong: var(--blue-60);
  --selection-related-glow-soft: var(--blue-30);
}
.v2-node.selection-related-color-green:not(.selected) {
  --selection-related-color: var(--green);
  --selection-related-glow-strong: var(--green-60);
  --selection-related-glow-soft: var(--green-30);
}
.v2-node.selection-related-color-cyan:not(.selected) {
  --selection-related-color: var(--cyan);
  --selection-related-glow-strong: var(--cyan-60);
  --selection-related-glow-soft: var(--cyan-30);
}
.v2-node.selection-related-color-purple:not(.selected) {
  --selection-related-color: var(--purple);
  --selection-related-glow-strong: var(--purple-60);
  --selection-related-glow-soft: var(--purple-30);
}
.v2-node.selection-related-color-red:not(.selected) {
  --selection-related-color: var(--red);
  --selection-related-glow-strong: var(--red-60);
  --selection-related-glow-soft: var(--red-30);
}
.v2-node.selection-related-color-yellow:not(.selected) {
  --selection-related-color: var(--warning-text);
  --selection-related-glow-strong: var(--warning-border-hover);
  --selection-related-glow-soft: var(--warning-glow);
}
.v2-node.selection-related:not(.selected) .node-label {
  color: var(--white-90);
  text-shadow: 0 0 10px var(--selection-related-glow-strong);
}
.node-label:active {
  cursor: var(--grab-cursor);
}
.node-label[contenteditable='true'] {
  background: var(--bg);
  color: var(--white);
  outline: 0;
  box-shadow: 0 0 0 1.5px var(--indigo);
  cursor: var(--text-cursor);
  user-select: text;
  min-width: 60px;
}
.node-label[contenteditable='true']:hover {
  background: var(--white-05);
}
.node-label[contenteditable='true']:focus {
  background: var(--surface-quote);
  color: #fff;
  outline: 0;
  box-shadow: 0 2px 10px var(--black-50);
}
.connection-group {
  cursor: var(--link-cursor);
}
.connection-bg {
  fill: none;
  stroke: white;
  stroke-width: 20px;
  stroke-opacity: 0;
  pointer-events: stroke;
}
.connection-main {
  fill: none;
  stroke: var(--white-40);
  stroke-width: 2px;
  transition: stroke 0.16s;
  pointer-events: none;
}
.connection-group.connection-highlighted .connection-main,
.connection-group:hover .connection-main {
  stroke: var(--white-90);
  stroke-width: 3px;
}
.connection-delete-btn {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  transform-origin: 0 0;
}
.connection-delete-btn.show-scissor {
  opacity: 1;
  pointer-events: auto;
}
.connection-delete-btn:hover .scissor-bg {
  fill: var(--error-fill);
  filter: drop-shadow(0 4px 12px var(--error-glow));
}
@keyframes pick-banner-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-7px);
  }
}
.v2-pick-connect-banner {
  animation: pick-banner-float 2.4s ease-in-out infinite;
}
.v2-pick-connect-banner .pc-text {
  font-size: 17px;
}
.v2-pick-connect-banner .pc-esc {
  font-size: 16px;
}
.conn-drag-path {
  fill: none;
  stroke: var(--white-70);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  stroke-linecap: round;
  pointer-events: none;
}
.v2-node {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 16px;
  user-select: none;
  cursor: var(--grab-cursor);
  z-index: 10;
  overflow: visible;
}
.v2-node.image-node.is-ratio-animating {
  transition: none;
  will-change: transform;
}
.v2-node.is-dragging {
  cursor: var(--grab-cursor);
  z-index: 999;
}
.v2-node.is-ui-hidden .node-floating-toolbar,
.v2-node.is-ui-hidden .text-prompt-panel {
  display: none;
}
.v2-node.is-renaming-label .node-floating-toolbar {
  display: none;
}
.empty-hint,
.empty-hint * {
  cursor: var(--link-cursor);
}
.ai-send,
.ai-start-btn,
.ai-tip-got,
.btn,
.btn-community,
.btn-credits,
.btn-icon,
.btn-tapies,
.clickable,
.fab-btn,
.ftb-btn,
.logo,
.nam-item,
.nam-upload,
.node-card,
.pill-btn,
.project-name,
.sidebar-btn,
.upload-btn,
.user-avatar,
.zoom-btn,
[role='button'],
a,
button,
input[type='button'],
input[type='reset'],
input[type='submit'],
select {
  cursor: var(--link-cursor);
}
.ai-textarea,
.prompt-textarea,
.text-card-content,
input[type='password'],
input[type='text'] {
  cursor: var(--text-cursor);
}
.connection-status-bar {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--surface-float);
  border: 1.5px solid var(--blue-50);
  border-radius: 100px;
  box-shadow:
    0 10px 40px var(--black-60),
    0 0 20px var(--blue-20);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  pointer-events: auto;
  white-space: nowrap;
  animation:
    conn-bubble-enter 0.6s cubic-bezier(0.19, 1, 0.22, 1),
    conn-bubble-float 3s ease-in-out infinite 0.6s;
}
@keyframes conn-bubble-enter {
  from {
    transform: translate(-50%, -100px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}
@keyframes conn-bubble-float {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -6px);
  }
}
.csb-exit-btn {
  background: 0 0;
  border: none;
  color: var(--error-text);
  padding: 0;
  cursor: var(--link-cursor);
  font-size: 17px;
  font-weight: 700;
  transition: all 0.2s;
  margin-left: 20px;
  text-shadow: 0 0 12px var(--error-glow);
}
.ftb-btn.ftb-btn-exit {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text-light);
  box-shadow: 0 0 12px var(--error-glow);
}
.ftb-btn.ftb-btn-exit:hover {
  background: var(--error-bg-solid);
  border-color: var(--error-border-dark);
  transform: translateY(-1px);
}
.csb-exit-btn:hover {
  color: var(--error-text-dark);
  text-shadow: 0 0 18px var(--error-shadow);
}
.is-connecting-active svg,
.is-connecting-source .prompt-attachment-btn svg {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ref-thumb-wrap.dragging {
  opacity: 0;
  pointer-events: none;
  transition: none;
  border: none;
}
:root {
  --pointer-cursor:
    url('../images/pointer-small.cur'), url('../images/pointer-small.png') 0 0, default;
  --link-cursor: url('../images/link-small.cur'), url('../images/link-small.png') 8 2, pointer;
  --grab-cursor:
    url('../images/pointer-small.cur'), url('../images/pointer-small.png') 0 0, grabbing;
  --text-cursor: url('../images/beam-small.cur'), url('../images/beam-small.png') 16 16, text;
  --cut-cursor: url('../images/scissors.svg') 16 16, crosshair;
  --connect-cursor: var(--link-cursor);
}
body,
html {
  cursor: var(--pointer-cursor);
}
html.is-cutting-mode {
  --pointer-cursor: var(--cut-cursor);
  --link-cursor: var(--cut-cursor);
  --grab-cursor: var(--cut-cursor);
  --text-cursor: var(--cut-cursor);
}
html.is-connecting-mode {
  --pointer-cursor: var(--connect-cursor);
  --link-cursor: var(--connect-cursor);
  --grab-cursor: var(--connect-cursor);
  --text-cursor: var(--connect-cursor);
}
.ai-send,
.ai-start-btn,
.ai-tip-got,
.btn-icon,
.cc-btn,
.clickable,
.cursor-size-btn,
.fab-btn,
.logo,
.nam-item,
.nam-upload,
.pill-btn,
.project-name,
.settings-close,
.settings-nav-item,
.settings-save-btn,
.zoom-btn,
[role='button'],
a,
button,
select {
  cursor: var(--link-cursor);
}
#v2-wrap.is-panning,
.v2-node.dragging,
body.is-dragging,
body.is-panning {
  --pointer-cursor: var(--grab-cursor);
  --link-cursor: var(--grab-cursor);
  --text-cursor: var(--grab-cursor);
}
.ai-textarea,
.settings-input,
input[type='password'],
input[type='text'] {
  cursor: var(--text-cursor);
}
button.debug-wrench-btn,
button.prompt-submit.debug-wrench-btn {
  padding: 8px;
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  margin-right: 6px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
body:not(.dev-mode) button.debug-wrench-btn,
body:not(.dev-mode) button.prompt-submit.debug-wrench-btn {
  display: none;
}
body.dev-mode button.debug-wrench-btn,
body.dev-mode button.prompt-submit.debug-wrench-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}
body.dev-mode button.debug-wrench-btn:hover,
body.dev-mode button.prompt-submit.debug-wrench-btn:hover {
  background: var(--warning-bg-hover);
  border-color: var(--warning-border-hover);
  box-shadow: 0 0 12px var(--warning-glow);
}
.side-plus-btn {
  position: absolute;
  border-radius: 50%;
  background: var(--white-04);
  border: 1px solid var(--white-12);
  color: var(--white-60);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px var(--black-30);
  z-index: 2;
  pointer-events: auto;
  line-height: 1;
}
.side-plus-btn:hover {
  background: var(--white-15);
  border-color: var(--white-40);
  color: var(--white);
  transform: scale(1.15);
  box-shadow:
    0 6px 20px var(--black-50),
    0 0 15px var(--white-20);
}
.side-plus-btn:active {
  transform: scale(0.95);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
}
.node-floating-toolbar.v2-comment-toolbar,
.node-floating-toolbar.v2-img-toolbar,
.node-floating-toolbar.v2-text-toolbar,
.node-floating-toolbar.v2-video-toolbar {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: 12px;
  padding: 4px 8px;
}
.node-floating-toolbar .ftb-btn.is-dev {
  opacity: 0.5;
}
.node-floating-toolbar .ftb-divider {
  width: 1px;
  height: 14px;
  background: var(--stroke-15);
  margin: 0 4px;
}
.node-floating-toolbar.v2-img-toolbar {
  overflow: visible;
}
.v2-img-toolbar .v2-img-toolbar-main {
  display: flex;
  align-items: center;
  gap: 6px;
}
.v2-img-toolbar .v2-img-toolbar-zone {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}
.v2-img-toolbar .v2-img-toolbar-zone-primary,
.v2-img-toolbar .v2-img-toolbar-zone-secondary {
  flex-wrap: nowrap;
}
.v2-img-toolbar .act-more-tools.is-active {
  background: var(--white-15);
}
.v2-img-toolbar .v2-img-toolbar-more-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: 12px;
  box-shadow: var(--shadow-toolbar);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  width: max-content;
  max-width: calc(100vw - 24px);
  overflow: visible;
}
.v2-img-toolbar .v2-img-toolbar-more-menu[hidden] {
  display: none;
}
.v2-img-toolbar .v2-img-toolbar-more-title {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 0 4px;
}
.v2-img-toolbar .v2-img-toolbar-more-inline {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
.v2-img-toolbar .v2-img-toolbar-zone-more {
  flex-wrap: nowrap;
}
.v2-img-toolbar .v2-img-toolbar-customize-toggle {
  min-width: 92px;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  justify-content: center;
  flex: 0 0 auto;
}
.v2-img-toolbar .v2-img-toolbar-customize-toggle.is-active {
  background: var(--white-15);
  border-color: var(--indigo-50);
}
.v2-img-toolbar.is-toolbar-customizing .v2-img-toolbar-zone .ftb-btn {
  cursor: var(--grab-cursor);
}
.v2-img-toolbar.is-toolbar-customizing .v2-img-toolbar-zone .ftb-btn.is-toolbar-draggable {
  background: var(--white-08);
  border-color: var(--indigo-50);
  box-shadow: 0 0 0 1px var(--indigo-20) inset;
}
.v2-img-toolbar .v2-img-toolbar-zone .ftb-btn.is-toolbar-draggable:hover {
  background: var(--white-15);
}
.v2-img-toolbar .v2-img-toolbar-zone .ftb-btn.is-toolbar-dragging {
  opacity: 0.4;
}
.v2-img-toolbar .v2-img-toolbar-zone.is-drop-target {
  border-radius: 8px;
  background: var(--white-08);
}
.node-floating-toolbar.v2-comment-toolbar {
  top: auto;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 6px;
  width: auto;
  max-width: none;
  padding: 6px;
  border-radius: 10px;
  box-shadow: var(--shadow-toolbar);
  overflow: visible;
}
.comment-toolbar-divider {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
  padding: 0 2px;
  user-select: none;
}
.comment-toolbar-jump-wrap {
  position: relative;
}
.comment-toolbar-jump-wrap.is-recording .comment-toolbar-jump-trigger {
  border-color: var(--indigo-50);
  background: var(--white-10);
}
.comment-toolbar-jump-popup {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-float);
  border: 1px solid var(--white-15);
  box-shadow: 0 12px 32px var(--black-60);
  z-index: 6;
  overflow: visible;
}
.comment-toolbar-jump-wrap.is-open .comment-toolbar-jump-popup {
  display: flex;
}
.comment-toolbar-jump-clear-btn {
  position: absolute;
  right: 0;
  top: 0;
  transform: translate(45%, -45%);
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--surface-float);
  border: 1px solid var(--stroke-default);
  box-shadow: 0 2px 8px var(--black-40);
  z-index: 3;
  padding: 0;
  cursor: var(--link-cursor);
  appearance: none;
  -webkit-appearance: none;
}
.comment-toolbar-jump-clear-btn:hover {
  color: var(--text-primary);
  border-color: var(--stroke-strong);
  background: var(--surface-node);
}
.comment-toolbar-jump-binding-row {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  column-gap: 10px;
}
.comment-toolbar-jump-binding-label {
  font-size: 12px;
  color: var(--text-secondary);
}
.comment-toolbar-jump-binding-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.comment-toolbar-jump-binding {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--stroke-default);
  border-radius: 8px;
  height: 30px;
  min-width: 140px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-primary);
  background: var(--surface-node);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: var(--link-cursor);
  font-family: inherit;
  line-height: 1;
  outline: 0;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}
.comment-toolbar-jump-binding:hover {
  border-color: var(--stroke-strong);
  background: var(--white-10);
}
.comment-toolbar-jump-binding.is-recording {
  color: var(--warning-text);
  border-color: var(--indigo-50);
  background: var(--white-10);
}
.comment-toolbar-jump-zoom-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}
.comment-toolbar-jump-zoom-input {
  width: 100%;
  min-width: 0;
  height: 6px;
  border-radius: 999px;
  border: 0;
  background: var(--white-15);
  color: var(--text-primary);
  padding: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: var(--link-cursor);
}
.comment-toolbar-jump-zoom-input:focus {
  box-shadow: 0 0 0 2px var(--indigo-20);
}
.comment-toolbar-jump-zoom-input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--white-15);
}
.comment-toolbar-jump-zoom-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--blue-50);
  background: var(--blue);
  box-shadow: 0 0 6px var(--blue-50);
  margin-top: -5px;
  cursor: var(--link-cursor);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}
.comment-toolbar-jump-zoom-input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--white-15);
}
.comment-toolbar-jump-zoom-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--blue-50);
  background: var(--blue);
  box-shadow: 0 0 6px var(--blue-50);
  cursor: var(--link-cursor);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}
.comment-toolbar-jump-zoom-input:hover::-webkit-slider-thumb {
  transform: scale(1.08);
  border-color: var(--blue);
  background: var(--blue);
}
.comment-toolbar-jump-zoom-input:hover::-moz-range-thumb {
  transform: scale(1.08);
  border-color: var(--blue);
  background: var(--blue);
}
.comment-toolbar-jump-zoom-input:active::-webkit-slider-thumb {
  transform: scale(1.14);
}
.comment-toolbar-jump-zoom-input:active::-moz-range-thumb {
  transform: scale(1.14);
}
.comment-toolbar-jump-zoom-unit {
  color: var(--text-secondary);
  min-width: 34px;
  text-align: right;
}
.comment-toolbar-color-wrap {
  position: relative;
}
.comment-toolbar-color-trigger {
  position: relative;
}
.comment-toolbar-color-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border-radius: 8px;
  background: var(--comment-toolbar-dot-color, var(--white-20));
  border: 1px solid var(--stroke-default);
  pointer-events: none;
}
.comment-toolbar-color-dot.is-transparent {
  background: 0 0;
  border-style: dashed;
}
.comment-toolbar-color-popup {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-float);
  border: 1px solid var(--white-15);
  box-shadow: 0 12px 32px var(--black-60);
  z-index: 5;
}
.comment-toolbar-color-wrap.is-open .comment-toolbar-color-popup {
  display: grid;
}
.v2-comment-toolbar .comment-toolbar-color-item {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--stroke-default);
  background: var(--comment-toolbar-swatch-color, var(--white-20));
}
.comment-toolbar-color-item[data-value='red'] {
  --comment-toolbar-swatch-color: var(--red);
}
.comment-toolbar-color-item[data-value='orange'] {
  --comment-toolbar-swatch-color: var(--gold);
}
.comment-toolbar-color-item[data-value='yellow'] {
  --comment-toolbar-swatch-color: var(--warning-text);
}
.comment-toolbar-color-item[data-value='green'] {
  --comment-toolbar-swatch-color: var(--green);
}
.comment-toolbar-color-item[data-value='blue'] {
  --comment-toolbar-swatch-color: var(--blue);
}
.comment-toolbar-color-item[data-value='purple'] {
  --comment-toolbar-swatch-color: var(--purple);
}
.comment-toolbar-color-item[data-value='cyan'] {
  --comment-toolbar-swatch-color: var(--cyan);
}
.comment-toolbar-color-item[data-value='pink'] {
  --comment-toolbar-swatch-color: var(--group-pink);
}
.comment-toolbar-color-item[data-value='gray'] {
  --comment-toolbar-swatch-color: var(--group-slate);
}
.comment-toolbar-color-item[data-value='white'] {
  --comment-toolbar-swatch-color: var(--canvas-white);
  border-color: var(--white-25);
  box-shadow: inset 0 0 0 1px var(--black-20);
}
.comment-toolbar-color-item[data-value='transparent'] {
  --comment-toolbar-swatch-color: var(--white-02);
  background:
    linear-gradient(
      45deg,
      var(--white-08) 25%,
      transparent 25%,
      transparent 75%,
      var(--white-08) 75%
    ),
    linear-gradient(
      45deg,
      var(--white-08) 25%,
      transparent 25%,
      transparent 75%,
      var(--white-08) 75%
    ),
    var(--white-02);
  background-size: 8px 8px;
  background-position:
    0 0,
    4px 4px,
    0 0;
  border-style: dashed;
  position: relative;
}
.comment-toolbar-color-item[data-value='transparent']::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 11px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
  transform: rotate(-35deg);
}
.v2-comment-toolbar .comment-toolbar-color-item.is-active,
.v2-comment-toolbar .comment-toolbar-color-item:hover {
  border-color: var(--stroke-strong);
  box-shadow: 0 0 0 1px var(--stroke-strong);
  background: var(--comment-toolbar-swatch-color, var(--white-20));
  transform: scale(1.15);
}
.comment-toolbar-danger {
  color: var(--error-text);
}
.comment-toolbar-danger:hover {
  background: var(--error-bg);
  color: var(--error-text-dark);
}
.v2-comment-toolbar .ftb-btn.is-active {
  background: var(--fill-active);
  border-color: var(--stroke-strong);
  color: var(--text-primary);
}
.node.selected:not(.text-node) .img-node-preview {
  border-color: var(--blue-40);
}
.img-node-preview .v2-media-preview {
  cursor: var(--link-cursor);
}
.aigen-node-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: visible;
  pointer-events: auto;
  cursor: default;
}
.img-node-preview.aigen-node-preview-fill {
  width: 100%;
  height: 100%;
  flex: 0 0 auto;
}
.img-node-preview.aigen-image-preview,
.img-node-preview.aigen-text-preview {
  background: var(--white-05);
  border: 1px solid var(--stroke-10);
  border-radius: 18px;
  position: relative;
  transition: none;
}
.img-node-preview.aigen-image-preview {
  min-height: 260px;
  overflow: hidden;
}
.img-node-preview.aigen-text-preview {
  min-height: 200px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  padding: 14px 16px;
  box-sizing: border-box;
}
.img-node-preview .aigen-image-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  position: absolute;
  inset: 0;
}
.aigen-image-mask-overlay {
  pointer-events: none;
}
.img-node-placeholder.aigen-media-placeholder {
  gap: 8px;
  color: var(--text-muted);
}
.img-node-placeholder.aigen-text-placeholder {
  position: absolute;
  inset: 0;
  justify-content: center;
  font-size: 14px;
}
.node-img-mask-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: none;
  z-index: 2;
}
.multi-images-container {
  contain: layout paint;
}
.multi-images-container img {
  backface-visibility: hidden;
  transform: translateZ(0);
}
.multi-flyout-panel > div {
  will-change: transform, opacity;
}
.v2-node .text-output-content {
  color: var(--text-muted);
  cursor: var(--pointer-cursor);
  outline: 0;
  transition:
    background 0.2s,
    padding 0.2s;
  border-radius: 8px;
}
.v2-node .text-output-content[contenteditable='true'] {
  color: var(--text-primary);
  background: 0 0;
  padding: 0;
  box-shadow: none;
  cursor: var(--text-cursor);
}
.v2-node .text-output-content[contenteditable='false'] {
  background: 0 0;
  padding: 0;
  box-shadow: none;
}
.v2-node .text-output-content.aigen-text-output {
  width: 100%;
  height: auto;
  max-height: 100%;
  min-height: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: var(--prompt-font-size, 14px);
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
  display: none;
  user-select: none;
  -webkit-user-select: none;
}
.comment-note-node {
  min-width: 160px;
  min-height: 90px;
}
.comment-note-node .node-label {
  display: none;
}
.comment-note-card {
  width: 100%;
  height: 100%;
  min-width: 160px;
  min-height: 90px;
  padding: 0;
  background: var(--comment-note-bg-color, transparent);
  border: 1px solid transparent;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: none;
}
.v2-node.comment-note-node.selected
  .v2-node-component:not(.comment-note-editing)
  .comment-note-card,
.v2-node.comment-note-node.v2-selected
  .v2-node-component:not(.comment-note-editing)
  .comment-note-card {
  border-color: transparent;
  box-shadow: none;
}
.comment-note-card.comment-note-card--transparent {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.comment-note-content {
  width: 100%;
  height: 100%;
  padding: 18px 22px;
  box-sizing: border-box;
  color: var(--comment-note-text-color, var(--canvas-white));
  font-size: var(--comment-note-font-size, 24px);
  line-height: 1.45;
  letter-spacing: 0.01em;
  outline: 0;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: pre-wrap;
  word-break: break-word;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.comment-note-content::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.comment-note-content[contenteditable='true'] {
  cursor: var(--text-cursor);
  overflow: auto;
}
.comment-note-content[contenteditable='false'] {
  cursor: var(--pointer-cursor);
  overflow: hidden;
}
.comment-note-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-placeholder);
  text-shadow: none;
}
.comment-note-editing .comment-note-card {
  background: var(--comment-note-bg-color, transparent);
  box-shadow: 0 0 0 1px var(--indigo-45);
}
.v2-node.comment-note-node .group-resizer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.v2-node.comment-note-node.selected .group-resizer,
.v2-node.comment-note-node.v2-selected .group-resizer {
  opacity: 0.85;
  visibility: visible;
  pointer-events: auto;
}
@keyframes img-charge-fill {
  0% {
    width: 0%;
  }
  85% {
    width: 90%;
  }
  100% {
    width: 92%;
  }
}
@keyframes img-shimmer-sweep {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(200%);
  }
}
.img-preview-loading {
  position: relative;
  overflow: hidden;
}
.img-preview-loading > :not(.img-loading-overlay):not(.dreamina-status-overlay) {
  filter: blur(8px);
  transition: filter 0.4s ease;
}
.img-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: var(--white-50);
  overflow: hidden;
  animation: img-charge-fill 30s linear forwards;
  pointer-events: none;
  z-index: 10;
}
.img-loading-shimmer {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 55%;
  background: linear-gradient(90deg, transparent 0, var(--white-50) 50%, transparent 100%);
  animation: img-shimmer-sweep 1.4s ease-in-out infinite;
  will-change: transform;
}
.img-preview-loading.img-preview-loading--static > :not(.img-loading-overlay) {
  filter: none;
  transition: none;
}
.img-preview-loading.img-preview-loading--static .img-loading-overlay {
  width: 100%;
  animation: none;
  background: var(--white-20);
}
.img-node-panel {
  margin-top: var(--space-6);
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-16);
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  width: 260px;
  box-sizing: border-box;
}
.img-panel-row {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.img-panel-top {
  align-items: flex-start;
}
.img-panel-magic-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-8);
  background: var(--white-05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}
.btn-reset-v2 {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  background: var(--white-05);
  border: 1px solid var(--stroke-10);
  border-radius: var(--radius-8);
  padding: var(--space-6) var(--space-14);
  color: var(--text-secondary);
  font-size: var(--font-12);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-reset-v2:hover {
  background: var(--white-10);
  color: var(--text-primary);
  border-color: var(--white-20);
}
.v2-video-clipbar,
.v2-video-keyingbar {
  position: absolute;
  left: 50%;
  top: calc(100% + var(--space-12));
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  transform-origin: center top;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  z-index: 9999;
  pointer-events: auto;
}
.v2-video-cliprow,
.v2-video-keyingrow {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}
.v2-video-clipbtn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  border: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    filter 0.18s ease;
  cursor: pointer;
}
.v2-video-clipbtn.cancel {
  background: var(--surface-video-btn);
  color: var(--text-primary);
}
.v2-video-clipbtn.confirm {
  background: var(--white-90);
  color: var(--black-90);
}
.v2-video-clipbtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px var(--black-50);
}
.v2-video-clipbtn.cancel:hover {
  background: var(--surface-video-btn-hover);
}
.v2-video-clipbtn.confirm:hover {
  background: var(--fill-hover-on-light);
}
.v2-video-clipbtn.confirm:disabled,
.v2-video-clipbtn.confirm[data-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}
.v2-video-keyingrow .debug-wrench-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}
.v2-video-keyingbar .prompt-submit.img-gen-btn {
  width: 36px;
  height: 36px;
}
.v2-video-keyingbar .prompt-submit.img-gen-btn svg {
  width: 16px;
  height: 16px;
}
.rh-keying-settings-wrap .v2-video-clipbtn:hover,
.rh-maskmode-menu-wrap .v2-video-clipbtn:hover {
  transform: none;
}
.v2-video-cliptrack {
  position: relative;
  width: 560px;
  max-width: min(84vw, 720px);
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-video-track);
  box-shadow: 0 12px 40px var(--black-50);
}
.v2-audio-clipwave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.v2-audio-clipwave svg {
  width: 100%;
  height: 100%;
}
.v2-audio-clipwave-path {
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.65;
}
.v2-audio-clipwave-mid {
  stroke: var(--blue);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.25;
}
.v2-video-keyingtrack {
  position: relative;
  width: 560px;
  max-width: min(84vw, 720px);
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-video-track);
  box-shadow: 0 12px 40px var(--black-50);
  touch-action: none;
}
.v2-video-clipthumbs {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0.6;
  z-index: 1;
}
.v2-video-clipthumb {
  flex: 1;
  background: linear-gradient(135deg, var(--white-05), var(--white-02));
  border-right: 1px solid var(--black-20);
  background-size: cover;
  background-position: center;
}
.v2-video-clipthumb:last-child {
  border-right: none;
}
.v2-video-keyingthumbs {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0.6;
  z-index: 1;
}
.v2-video-keyingthumb {
  flex: 1;
  background: linear-gradient(135deg, var(--white-05), var(--white-02));
  border-right: 1px solid var(--black-20);
  background-size: cover;
  background-position: center;
}
.v2-video-keyingthumb:last-child {
  border-right: none;
}
.v2-video-cliprange {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  border-radius: 6px;
  overflow: hidden;
}
.v2-video-clipselection {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  border-radius: 4px;
  background: 0 0;
  border: 2px solid var(--white-90);
  box-shadow: 0 0 0 9999px var(--black-60);
  pointer-events: auto;
  cursor: grab;
  transition: border-color 0.2s;
  z-index: 3;
}
.is-audio-clipping .v2-video-clipselection {
  box-shadow: none;
}
.v2-video-clipselection:hover {
  border-color: var(--white);
}
.v2-video-clipselection:active {
  cursor: grabbing;
  border-color: var(--white);
}
.v2-video-clipselection::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -10px;
  width: 20px;
  cursor: ew-resize;
  z-index: 9;
}
.v2-video-clipselection::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: -10px;
  width: 20px;
  cursor: ew-resize;
  z-index: 9;
}
.v2-video-cliphandle {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 3px;
  background: var(--white-90);
  box-shadow: 0 0 4px var(--black-30);
  z-index: 10;
  pointer-events: none;
  transition:
    height 0.2s,
    background-color 0.2s,
    box-shadow 0.2s,
    opacity 0.2s,
    width 0.2s;
}
.v2-video-cliphandle.left.hover-active,
.v2-video-clipselection:active .v2-video-cliphandle.left {
  height: 32px;
  background: var(--white);
  box-shadow: 0 0 8px var(--white-80);
  width: 8px;
  transform: translate(-50%, -50%);
}
.v2-video-cliphandle.right.hover-active,
.v2-video-clipselection:active .v2-video-cliphandle.right {
  height: 32px;
  background: var(--white);
  box-shadow: 0 0 8px var(--white-80);
  width: 8px;
  transform: translate(-50%, -50%);
}
.v2-video-cliphandle.left {
  left: 0;
  transform: translate(-50%, -50%);
}
.v2-video-cliphandle.right {
  left: 100%;
  transform: translate(-50%, -50%);
}
.v2-video-clipplayhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: var(--white-90);
  border-radius: 0;
  pointer-events: none;
  z-index: 12;
}
.v2-video-keyingplayhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  transform: translateX(-50%);
  background: var(--white-90);
  border-radius: 0;
  pointer-events: auto;
  cursor: ew-resize;
  z-index: 12;
}
.v2-video-cliplabel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  background: var(--black-70);
  padding: 2px 10px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 11;
  backdrop-filter: blur(4px);
}
.v2-video-clipticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background-image: radial-gradient(circle, var(--white-20) 1px, transparent 1.6px);
  background-size: 16px 2px;
  background-repeat: repeat-x;
  opacity: 0.9;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 1;
}
.v2-video-keyingticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background-image: radial-gradient(circle, var(--white-20) 1px, transparent 1.6px);
  background-size: 16px 2px;
  background-repeat: repeat-x;
  opacity: 0.9;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 1;
}
.v2-video-cliphelper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 560px;
  max-width: min(84vw, 720px);
  margin-top: var(--space-12);
}
.v2-video-cliphelper-left {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 13px;
  position: relative;
  height: 24px;
  flex: 1;
  overflow: hidden;
}
.v2-video-cliphelper-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  white-space: nowrap;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.v2-video-cliphelper-msg.hide {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
.v2-video-cliphelper-msg.hide-up {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
.v2-video-cliphelper-msg.hide-down {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}
.v2-video-cliphelperkbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white-10);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: monospace;
}
.v2-video-clip-smartbtn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-video-btn);
  border: none;
  border-radius: 16px;
  padding: 6px 14px;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.v2-video-clip-smartbtn:hover {
  background: var(--surface-video-btn-hover);
}
.v2-video-clip-smartwrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.v2-video-clip-smartpanel {
  position: absolute;
  right: 0;
  bottom: calc(100% + var(--space-8));
  min-width: 260px;
  background: var(--surface-video-track);
  border: 1px solid var(--stroke-10);
  border-radius: var(--radius-12);
  padding: var(--space-12);
  box-shadow: 0 18px 50px var(--black-60);
  display: none;
  z-index: 10001;
}
.v2-video-clip-smartpanel.is-open {
  display: block;
}
.v2-video-clip-smartpanel-title {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: var(--space-10);
}
.v2-video-clip-smartpanel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  margin-bottom: var(--space-10);
}
.v2-video-clip-smartpanel-label {
  color: var(--text-secondary);
  font-size: 12px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.v2-video-clip-modegroup {
  display: flex;
  gap: var(--space-6);
  background: var(--white-05);
  border: 1px solid var(--stroke-10);
  border-radius: var(--radius-12);
  padding: var(--space-4);
}
.v2-video-clip-modebtn {
  border: none;
  background: 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-10);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.v2-video-clip-modebtn:hover {
  background: var(--white-10);
  color: var(--text-primary);
}
.v2-video-clip-modebtn.is-active {
  background: var(--white-15);
  color: var(--text-primary);
}
.v2-video-clip-maxsegwrap {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.v2-video-clip-maxseg {
  width: 84px;
  height: 30px;
  border-radius: var(--radius-10);
  border: 1px solid var(--stroke-10);
  background: var(--white-05);
  color: var(--text-primary);
  padding: 0 10px;
  font-size: 12px;
  outline: 0;
}
.v2-video-clip-maxseg:focus {
  border-color: var(--white-30);
}
.v2-video-clip-maxseg-suffix {
  color: var(--text-secondary);
  font-size: 12px;
}
.v2-video-clip-smartpanel-hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  margin-top: var(--space-4);
  margin-bottom: var(--space-12);
}
.v2-video-clip-smartpanel-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-8);
}
.v2-video-clip-panelbtn {
  border: 1px solid var(--stroke-10);
  background: var(--white-05);
  color: var(--text-primary);
  border-radius: var(--radius-10);
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.v2-video-clip-panelbtn:hover {
  background: var(--white-10);
  border-color: var(--white-20);
}
.v2-video-clip-panelbtn.primary {
  background: var(--white-90);
  color: var(--black-90);
  border-color: transparent;
}
.v2-video-clip-panelbtn.primary:hover {
  background: var(--fill-hover-on-light);
}
.v2-video-keyinghelper-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 560px;
  max-width: min(84vw, 720px);
  margin-top: var(--space-12);
}
.v2-video-keyinghelper-left {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 13px;
  position: relative;
  height: 24px;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.v2-video-keyinghelper-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: 12px;
  height: 24px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.v2-video-keyinghint {
  position: absolute;
  left: 50%;
  top: calc(-1 * var(--space-24));
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  transform-origin: center bottom;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-12);
  background: var(--surface-video-track);
  border: 1px solid var(--stroke-10);
  color: var(--text-strong);
  font-size: var(--font-16);
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10000;
}
.v2-video-keyinghint--pos {
  color: var(--annotate-green);
}
.v2-video-keyinghint--neg {
  color: var(--annotate-red);
}
.v2-video-keyinghint-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--white-10);
  border: 1px solid var(--white-10);
  color: var(--text-strong);
  font-size: var(--font-14);
  font-weight: 700;
  line-height: 1;
}
.v2-video-keying-erasebar.v2-annotate-toolbar {
  position: absolute;
  left: 50%;
  top: calc(-1 * (var(--space-40) + var(--space-20)));
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  transform-origin: center bottom;
  z-index: 10000;
  pointer-events: auto;
}
.v2-video-keying-erasebar .v2-annotate-size-range {
  width: 96px;
}
.v2-video-keying-marklayer {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: crosshair;
  z-index: 50;
}
.v2-video-keying-marklayer.is-remove-mode {
  cursor: crosshair;
}
.v2-video-keying-paintcanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.v2-video-keying-marklayer .v2-annotate-cursor.v2-video-keying-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.v2-video-keying-mark {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: var(--annotate-green);
  box-shadow: 0 0 0 1px var(--canvas-white);
}
.v2-video-keying-mark--background {
  background: var(--annotate-red);
}
.v2-video-keyingbar {
  pointer-events: none;
}
.v2-video-clipbtn,
.v2-video-keyingplayhead,
.v2-video-keyingrow,
.v2-video-keyingtrack {
  pointer-events: auto;
}
.v2-video-keyinghelper-row {
  pointer-events: none;
}
.is-video-keying-target .node-floating-toolbar {
  display: none;
}
.is-video-keying-target .video-center-indicator {
  display: none;
}
.is-video-clip-target .node-floating-toolbar {
  display: none;
}
.is-audio-clip-target .node-floating-toolbar {
  display: none;
}
.is-video-keying .video-controls {
  display: none;
}
.is-video-keying .video-mute-btn {
  display: none;
}
.is-video-keying .node-upload-hint {
  display: none;
}
.is-video-keying .gen-video-center-indicator {
  display: none;
}
.is-video-keying .multi-toggle-btn {
  display: none;
}
.is-audio-clipping .audio-controls {
  display: none;
}
.is-audio-clipping .node-upload-hint {
  display: none;
}
.v2-video-toolbar .ftb-btn.is-dev {
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--white-70);
}
.v2-video-toolbar .ftb-btn.is-dev:hover {
  opacity: 0.85;
}
.btn-reset-v2 svg {
  opacity: 0.6;
}
.img-prompt-textarea {
  flex: 1;
  background: 0 0;
  border: none;
  outline: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: Inter, sans-serif;
  line-height: 1.6;
  resize: none;
  min-height: 50px;
  max-height: 100px;
  overflow-y: auto;
  cursor: text;
  padding: var(--space-6) 0;
}
.img-prompt-textarea::placeholder {
  color: var(--text-muted);
}
.img-panel-bottom {
  align-items: center;
  gap: var(--space-6);
}
.img-model-wrap {
  flex: 1;
}
.img-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  background: 0 0;
  padding: var(--space-6) var(--space-8);
  border-radius: var(--radius-22);
  border: none;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  font-family: Inter, sans-serif;
  cursor: pointer;
  transition:
    color 0.15s,
    background-color 0.15s,
    box-shadow 0.15s;
  white-space: nowrap;
  box-shadow: none;
  flex-shrink: 0;
  vertical-align: middle;
}
.img-pill-btn svg {
  display: block;
  flex-shrink: 0;
}
.img-pill-btn:hover {
  color: var(--text-primary);
  background-color: var(--white-05);
  border-radius: var(--radius-6);
  border: none;
  box-shadow: 0 0 0 1px var(--white-10);
}
.image-node .prompt-submit,
.text-node .prompt-submit,
.video-node .prompt-submit {
  background: var(--action-btn-bg);
  color: #fff;
  width: 26px;
  height: 26px;
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-node .prompt-submit:hover,
.text-node .prompt-submit:hover,
.video-node .prompt-submit:hover {
  background: var(--action-btn-hover-bg);
  box-shadow: 0 0 12px var(--blue-40);
  transform: scale(1.05);
}
.img-model-btn {
  width: 100%;
  box-sizing: border-box;
}
.img-batch-wrap select.img-batch-select {
  background: var(--stroke-07);
  border: 1px solid var(--white-10);
  border-radius: 22px;
  color: var(--white-90);
  font-size: 15px;
  font-family: Inter, sans-serif;
  padding: 10px 16px;
  cursor: pointer;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s;
}
.img-batch-select:hover {
  background: var(--white-12);
}
.img-gen-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--action-btn-bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-strong);
  flex-shrink: 0;
  transition:
    transform 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.img-gen-btn:hover {
  background: var(--action-btn-hover-bg);
  box-shadow: 0 0 12px var(--blue-40);
  transform: scale(1.05);
}
.img-gen-btn:disabled,
.img-gen-btn[disabled] {
  background: var(--white-15);
  color: var(--white-40);
  cursor: not-allowed;
  box-shadow: none;
}
.img-gen-btn:disabled:hover,
.img-gen-btn[disabled]:hover {
  transform: none;
  background: var(--white-15);
  box-shadow: none;
}
.image-node .img-pill-btn,
.text-node .img-pill-btn {
  font-size: 15px;
}
.image-node .img-pill-btn svg,
.text-node .img-pill-btn svg {
  width: 14px;
  height: 14px;
}
.image-node .prompt-submit.img-gen-btn,
.text-node .prompt-submit.img-gen-btn,
.video-node .prompt-submit.img-gen-btn {
  font-size: 16px;
  width: 36px;
  height: 36px;
}
.image-node .prompt-submit.img-gen-btn svg,
.text-node .prompt-submit.img-gen-btn svg,
.video-node .prompt-submit.img-gen-btn svg {
  width: 16px;
  height: 16px;
}
.image-node .floating-menu-item,
.text-node .floating-menu-item {
  font-size: 15px;
}
.image-node .img-rp-section-label,
.text-node .img-rp-section-label {
  font-size: 11px;
}
.image-node .img-rp-quality-item,
.text-node .img-rp-quality-item {
  font-size: 14px;
}
.image-node .img-ratio-popup .img-rp-large-adaptive span,
.image-node .img-ratio-popup .img-rp-ratio-item span,
.text-node .img-ratio-popup .img-rp-large-adaptive span,
.text-node .img-ratio-popup .img-rp-ratio-item span {
  font-size: inherit;
}
@keyframes menuSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes menuSlideUpCenter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
.floating-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 260px;
  background: var(--bg-node-dark);
  border: 1px solid var(--white-08);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 36px var(--black-70);
  z-index: 1000;
  display: none;
  animation: menuSlideUp 0.25s cubic-bezier(0.2, 0, 0.2, 1);
  pointer-events: auto;
}
.floating-menu.show {
  display: block;
}
.floating-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 10px;
  background: 0 0;
  border: none;
  color: var(--white-80);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.floating-menu-item:hover {
  background: var(--white-06);
  color: var(--white-90);
}
.floating-menu-item.active {
  background: var(--white-10);
  color: var(--white);
}
.floating-menu-item[data-disabled='true'] {
  opacity: 0.55;
  cursor: not-allowed;
}
.floating-menu-item[data-disabled='true']:hover {
  background: 0 0;
  color: var(--white-80);
}
.floating-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}
.floating-menu-badge-danger {
  color: var(--error-text-light);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}
.floating-menu-badge-warning {
  color: var(--warning-text);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
}
.floating-menu-badge-success {
  color: var(--green);
  background: var(--green-10);
  border: 1px solid var(--green-30);
}
.floating-menu-badge-inline {
  position: static;
  right: auto;
  top: auto;
  transform: none;
  margin-left: auto;
  align-self: center;
}
.floating-menu-label {
  flex: 1;
}
.floating-menu-time {
  font-size: 11px;
  color: var(--white-40);
}
.fmi-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fmi-title {
  font-size: 14px;
  color: var(--white-90);
  transform: translateY(7px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.fmi-sub {
  font-size: 12px;
  color: var(--white-40);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.floating-menu-item:hover .fmi-title {
  transform: translateY(-2px);
}
.floating-menu-item:hover .fmi-sub {
  opacity: 1;
  transform: translateY(0);
}
.img-ratio-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 330px;
  background: var(--bg-node-dark);
  border: 1px solid var(--white-08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 36px var(--black-70);
  z-index: 1000;
  display: none;
  animation: menuSlideUp 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}
.rh-res-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 260px;
  background: var(--bg-node-dark);
  border: 1px solid var(--white-08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 36px var(--black-70);
  z-index: 1000;
  display: none;
  animation: menuSlideUp 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}
.rh-res-title {
  font-size: 11px;
  color: var(--white-40);
  margin-bottom: 10px;
}
.rh-res-slider {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--white-10);
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
}
.rh-res-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white-80);
  border: 2px solid var(--white-15);
  cursor: pointer;
  -webkit-appearance: none;
}
.rh-res-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white-80);
  border: 2px solid var(--white-15);
  cursor: pointer;
}
.rh-res-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 10px;
  color: var(--white-40);
}
.img-rp-quality-area {
  margin-bottom: 20px;
}
.img-rp-quality-segmented {
  display: flex;
  align-items: center;
  background: 0 0;
  border-radius: 12px;
  padding: 0;
  width: 100%;
}
.img-rp-quality-item {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  color: var(--white-40);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  background: 0 0;
  border: none;
  outline: 0;
}
.img-rp-quality-item:hover {
  color: var(--white);
  background: var(--white-06);
}
.img-rp-quality-item.active {
  background: var(--white-10);
  color: var(--white);
}
.img-rp-quality-item.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
}
.img-rp-ratio-area {
  display: flex;
  flex-direction: column;
}
.img-rp-ratio-split {
  display: flex;
  gap: 12px;
}
.img-rp-ratio-left {
  flex: 0 0 100px;
}
.img-rp-ratio-right {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
}
.img-rp-large-adaptive {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: 0 0;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--white-40);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.img-rp-large-adaptive:hover {
  background: var(--white-06);
  color: var(--white);
}
.img-rp-large-adaptive.active {
  background: var(--white-10);
  border-color: var(--white-20);
  color: var(--white);
}
.img-rp-ratio-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: 0 0;
  border: none;
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 6px;
}
.img-rp-ratio-item:hover {
  background: var(--white-06);
}
.img-rp-ratio-item:hover span {
  color: var(--white);
}
.img-rp-ratio-item.active {
  background: var(--white-10);
}
.img-rp-ratio-item.active span {
  color: var(--white);
}
.img-rp-ratio-item.active .img-rp-icon {
  border-color: var(--white);
  background: var(--white-15);
}
.img-rp-ratio-item span {
  font-size: 10px;
  color: var(--white-40);
  transition: color 0.2s;
}
.img-rp-ratio-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.img-rp-ratio-item.disabled span {
  color: var(--white-25);
}
.img-rp-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--white-60);
  border-radius: 2px;
  transition: all 0.2s;
}
.img-rp-sq {
  width: 14px;
  height: 14px;
}
.img-rp-tall {
  width: 10px;
  height: 16px;
}
.img-rp-wide {
  width: 16px;
  height: 10px;
}
.img-rp-p34 {
  width: 11px;
  height: 15px;
}
.img-rp-l43 {
  width: 15px;
  height: 11px;
}
.img-rp-p14 {
  width: 6px;
  height: 16px;
}
.img-rp-l41 {
  width: 16px;
  height: 6px;
}
.img-rp-p18 {
  width: 4px;
  height: 16px;
}
.img-rp-l81 {
  width: 16px;
  height: 4px;
}
.img-rp-l32 {
  width: 16px;
  height: 11px;
}
.img-rp-p23 {
  width: 11px;
  height: 16px;
}
.img-rp-l54 {
  width: 15px;
  height: 12px;
}
.img-rp-p45 {
  width: 12px;
  height: 15px;
}
.img-rp-ultra {
  width: 18px;
  height: 8px;
}
.batch-menu {
  width: 100px;
  min-width: 80px;
  left: auto;
  right: 0;
}
.img-rp-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.img-rp-quality-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: var(--stroke-07);
  border: 1px solid var(--white-10);
  border-radius: 8px;
  color: var(--white-80);
  font-size: 13px;
  font-family: Inter, sans-serif;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.img-rp-quality-btn:hover {
  background: var(--white-10);
}
.img-rp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.img-rp-ratio-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border-radius: 8px;
  background: 0 0;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--white-50);
  font-size: 10px;
  font-family: Inter, sans-serif;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.img-rp-ratio-item:hover {
  background: var(--stroke-07);
  color: var(--white-80);
}
.img-rp-ratio-item.active {
  background: var(--white-10);
  border-color: var(--white-20);
  color: var(--white);
}
.img-rp-icon {
  display: inline-block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.img-rp-sq {
  width: 16px;
  height: 16px;
}
.img-rp-tall {
  width: 9px;
  height: 16px;
}
.img-rp-wide {
  width: 20px;
  height: 11px;
}
.img-rp-p34 {
  width: 12px;
  height: 16px;
}
.img-rp-l43 {
  width: 16px;
  height: 12px;
}
.img-rp-p14 {
  width: 7px;
  height: 18px;
}
.img-rp-l41 {
  width: 18px;
  height: 7px;
}
.img-rp-p18 {
  width: 5px;
  height: 18px;
}
.img-rp-l81 {
  width: 18px;
  height: 5px;
}
.img-rp-l32 {
  width: 18px;
  height: 12px;
}
.img-rp-p23 {
  width: 12px;
  height: 18px;
}
.img-rp-l54 {
  width: 16px;
  height: 13px;
}
.img-rp-p45 {
  width: 13px;
  height: 16px;
}
.img-rp-ultra {
  width: 22px;
  height: 9px;
}
.popover-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 280px;
  background: var(--surface-float);
  border: 1px solid var(--white-08);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 12px 48px var(--black-70);
  z-index: 1000;
  display: none;
  flex-direction: column;
  gap: 4px;
  animation: menuFloatUp 0.1s ease-out;
}
@keyframes menuFloatUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.popover-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.popover-item:hover {
  background: var(--white-05);
}
.popover-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--white-04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.popover-item-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.popover-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--white-90);
}
.popover-item-desc {
  font-size: 11px;
  color: var(--white-35);
}
.popover-item-meta {
  font-size: 10px;
  color: var(--white-25);
  background: var(--white-04);
  padding: 1px 6px;
  border-radius: 5px;
}
.prompt-panel-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  padding-bottom: 2px;
  min-height: 32px;
}
.rh-adv-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-node-dark);
  border: 1px solid var(--white-08);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 8px 36px var(--black-70);
  display: none;
  z-index: 1002;
  align-items: center;
  gap: 12px;
}
.rh-adv-panel.show {
  display: flex;
}
.rh-adv-title {
  white-space: nowrap;
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 500;
}
.rh-adv-panel .img-rp-quality-segmented {
  width: auto;
}
.rh-adv-panel .img-rp-quality-item {
  flex: 0 0 auto;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}
.rh-vram-adv-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface-float);
  border: 1px solid var(--white-08);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 36px var(--black-70);
  display: none;
  z-index: 1002;
  flex-direction: column;
  gap: 10px;
}
.rh-vram-adv-panel.show {
  display: flex;
}
.rh-vram-adv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rh-vram-adv-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}
.rh-adv-seg {
  width: auto;
}
.rh-adv-control-line {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}
.rh-vram-adv-panel .rh-adv-control-seg {
  width: auto;
  padding: 2px 4px;
  border-radius: 12px;
  background: var(--white-06);
  border: 1px solid var(--white-10);
}
.rh-vram-adv-panel .rh-adv-control-split {
  width: 1px;
  height: 18px;
  background: var(--white-10);
  margin: 0 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  opacity: 0.8;
}
.rh-vram-adv-panel .rh-adv-single-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 12px;
  background: 0 0;
  border: 1px solid transparent;
}
.rh-vram-adv-panel .rh-adv-single-group.active {
  border-color: var(--white-20);
  background: var(--white-07);
}
.rh-vram-adv-panel .rh-adv-single-title {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  flex: 0 0 auto;
}
.rh-vram-adv-panel .rh-adv-single-group.active .rh-adv-single-title {
  color: var(--text-secondary);
}
.rh-vram-adv-panel .rh-adv-single-colon {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  flex: 0 0 auto;
}
.rh-vram-adv-panel .rh-adv-single-group.active .rh-adv-single-colon {
  color: var(--text-secondary);
}
.rh-vram-adv-panel .rh-adv-single-group .rh-adv-control-seg {
  padding: 0;
  background: 0 0;
  border: none;
}
.rh-vram-adv-panel .rh-adv-multi-group {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: 0 0;
  border: none;
  border-radius: 0;
}
.rh-maskmode-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  flex: 0 0 auto;
}
.rh-maskmode-hovermenu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);
  min-width: 220px;
  background: var(--surface-float);
  border: 1px solid var(--white-08);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 36px var(--black-70);
  display: none;
  z-index: 1005;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  animation: menuSlideUpCenter 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}
.rh-maskmode-hovermenu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
}
.rh-maskmode-menu-wrap:focus-within .rh-maskmode-hovermenu,
.rh-maskmode-menu-wrap:hover .rh-maskmode-hovermenu {
  display: flex;
}
.rh-maskmode-hovermenu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 6px;
}
.rh-maskmode-hovermenu-title {
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 600;
  white-space: nowrap;
}
.rh-maskmode-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  background: 0 0;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.rh-maskmode-item:hover {
  background: var(--white-06);
  color: var(--text-primary);
}
.rh-maskmode-item.active {
  background: var(--white-10);
  color: var(--text-primary);
}
.rh-keying-settings-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  flex: 0 0 auto;
}
.rh-keying-settings-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 8px);
  min-width: 280px;
  max-width: min(78vw, 360px);
  background: var(--surface-float);
  border: 1px solid var(--white-08);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 36px var(--black-70);
  display: none;
  z-index: 1006;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  animation: menuSlideUpCenter 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}
.rh-keying-settings-wrap.show .rh-keying-settings-menu {
  display: flex;
}
.rh-keying-settings-menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
}
.rh-keying-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 2px;
}
.rh-keying-settings-title {
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 600;
  white-space: nowrap;
}
.rh-v5-fps-seg {
  gap: 10px;
}
.rh-v5-fps-seg .img-rp-quality-item {
  min-width: 62px;
}
.rh-keying-vram-seg {
  gap: 10px;
}
.rh-keying-vram-seg .img-rp-quality-item {
  min-width: 62px;
}
.rh-keying-maskmode-seg {
  gap: 10px;
}
.rh-keying-maskmode-seg .img-rp-quality-item {
  min-width: 62px;
  font-size: 12px;
  padding: 6px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.rh-vram-adv-panel .img-rp-quality-item.rh-adv-seg-btn[data-key='rhMaskMode'] {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.05;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.node-ref-bar.rh-v5-refbar {
  padding: 10px 0;
}
.rh-v5-ref-container {
  flex-wrap: nowrap;
}
.rh-v5-ref-box {
  cursor: pointer;
}
.node-ref-bar.rh-v5-refbar .ref-upload-slot {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 0;
  white-space: normal;
  word-break: break-all;
  line-height: 1.1;
  text-align: center;
}
.node-ref-bar.rh-v5-refbar .ref-upload-label {
  display: block;
}
.node-ref-bar.rh-v5-refbar .ref-thumb-wrap[draggable='true'] {
  cursor: grab;
}
.node-ref-bar.rh-v5-refbar .ref-thumb-wrap.is-dragging {
  opacity: 0.35;
  cursor: grabbing;
}
.node-ref-bar.rh-v5-refbar .ref-thumb-wrap.is-drop-allow {
  box-shadow: 0 0 0 2px var(--blue-40);
  background: var(--white-06);
}
.rh-v5-ref-media-fallback {
  background: var(--white-03);
  display: flex;
  align-items: center;
  justify-content: center;
}
.rh-vram-adv-panel .img-rp-quality-item {
  flex: 0 0 auto;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}
.rh-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: 0 0;
  border: 1px solid var(--white-10);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: help;
  flex: 0 0 auto;
  user-select: none;
}
.rh-tip:hover {
  background: var(--white-06);
  border-color: var(--white-25);
}
.rh-tip:focus {
  outline: 0;
  box-shadow: 0 0 0 2px var(--white-10);
}
.rh-tip[data-tooltip]:hover::after {
  white-space: pre-line;
  width: 240px;
  max-width: 280px;
  line-height: 1.45;
  text-align: left;
}
.rh-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rh-v5-source-framecount {
  min-width: 54px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-muted);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 12px;
  user-select: none;
}
.rh-stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: var(--white-06);
  border: 1px solid var(--white-10);
  color: var(--white-80);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.rh-stepper-btn:hover {
  background: var(--white-10);
  border-color: var(--white-20);
}
.rh-stepper-value {
  width: 54px;
  min-width: 54px;
  flex: 0 0 auto;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--white-06);
  border: 1px solid var(--white-10);
  color: var(--white-85);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 12px;
  cursor: ew-resize;
  user-select: none;
  box-sizing: border-box;
}
.rh-stepper-value.is-dragging {
  background: var(--white-10);
  border-color: var(--white-20);
}
.rh-stepper-input {
  width: 54px;
  min-width: 54px;
  flex: 0 0 auto;
  height: 26px;
  border-radius: 10px;
  background: var(--white-06);
  border: 1px solid var(--white-20);
  color: var(--white-90);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 12px;
  text-align: center;
  outline: 0;
  appearance: textfield;
  box-sizing: border-box;
}
.rh-stepper-input::-webkit-inner-spin-button,
.rh-stepper-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.rh-stepper-input[type='number'] {
  -moz-appearance: textfield;
}
.footer-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--white-05);
  border: 1px solid var(--white-04);
  border-radius: 9px;
  color: var(--white-80);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.footer-pill:hover {
  background: var(--white-10);
  border-color: var(--white-08);
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-credits-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--white-04);
  padding: 3px 4px 3px 8px;
  border-radius: 12px;
}
.credits-val {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--white-50);
}
.submit-arrow-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--white-08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  color: var(--white-70);
}
.submit-arrow-btn:hover {
  background: var(--white-15);
  color: #fff;
}
.canvas-wrapper.is-connecting .node {
  transition:
    opacity 0.3s,
    filter 0.3s;
}
.canvas-wrapper.is-connecting .node.conn-invalid {
  opacity: 0.3;
  filter: grayscale(80%) brightness(0.4);
  pointer-events: auto;
  cursor: not-allowed;
}
.canvas-wrapper.is-connecting .node.conn-invalid * {
  pointer-events: none;
  cursor: not-allowed;
}
.canvas-wrapper.is-connecting .node.conn-invalid .text-prompt-panel {
  display: none;
  opacity: 0;
}
body.is-panning {
  --pointer-cursor: var(--grab-cursor);
  --link-cursor: var(--grab-cursor);
  --text-cursor: var(--grab-cursor);
}
.source-node-edit-modal {
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.58);
  z-index: 20000;
}
.source-node-edit-modal .settings-modal-content {
  width: min(92vw, 820px);
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--surface-float);
  border: 1px solid var(--stroke-12);
  border-radius: 18px;
  box-shadow: var(--shadow-dialog);
  overflow: hidden;
}
.source-node-edit-modal .settings-modal-header,
.source-node-edit-modal .settings-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--stroke-08);
}
.source-node-edit-modal .settings-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text-primary);
}
.source-node-edit-modal .settings-modal-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.source-node-edit-modal .settings-modal-body {
  padding: 18px 20px;
  overflow: auto;
}
.source-node-edit-modal .settings-modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--stroke-08);
  border-bottom: none;
}
.source-node-edit-modal .settings-btn {
  border: 1px solid var(--stroke-10);
  border-radius: 10px;
  padding: 8px 16px;
  color: var(--text-primary);
  background: var(--white-05);
  cursor: pointer;
}
.source-node-edit-modal .settings-btn-primary {
  background: var(--white-90);
  color: var(--black-90);
  border-color: transparent;
}
.source-node-edit-modal .settings-btn-secondary:hover,
.source-node-edit-modal .settings-btn-primary:hover {
  filter: brightness(1.06);
}
.canvas-wrapper.space-pan:active,
.node.dragging,
body.is-grabbing {
  --pointer-cursor: var(--grab-cursor);
  --link-cursor: var(--grab-cursor);
  --text-cursor: var(--grab-cursor);
}
.settings-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--surface-float);
  border: none;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  overflow: hidden;
  color: #fff;
}
.settings-nav {
  width: 200px;
  flex-shrink: 0;
  background: var(--white-02);
  border-right: 1px solid var(--stroke-07);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.settings-nav-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--white-30);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px 12px;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: 0 0;
  border: none;
  color: var(--white-50);
  font-size: 13.5px;
  font-family: inherit;
  padding: 9px 12px;
  border-radius: 9px;
  text-align: left;
  transition:
    background 0.15s,
    color 0.15s;
  width: 100%;
}
.settings-nav-item:hover {
  background: var(--white-06);
  color: var(--white-80);
}
.settings-nav-item.active {
  background: var(--indigo-18);
  color: var(--indigo-text);
}
.settings-content {
  flex: 1;
  padding: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.settings-close {
  position: absolute;
  top: 26px;
  right: 28px;
  background: 0 0;
  border: none;
  color: var(--white-40);
  transition: color 0.15s;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  z-index: 100;
}
.settings-close:hover {
  color: #fff;
  background: var(--white-06);
}
.settings-pane {
  display: none;
  height: 100%;
  overflow: hidden;
  padding: 0;
}
.settings-pane.active {
  display: flex;
  flex-direction: column;
}
.settings-pane-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 32px 28px 32px;
}
.settings-pane-footer {
  flex-shrink: 0;
  padding: 14px 32px 18px 32px;
  background: var(--surface-float);
  border-top: 1px solid var(--white-06);
}
.settings-pane-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 18px 0;
  padding: 26px 32px 20px 32px;
  background: var(--surface-float);
  border-bottom: 1px solid var(--white-06);
}
.settings-section {
  margin-bottom: 28px;
}
.settings-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-80);
  margin-bottom: 4px;
}
.settings-desc {
  font-size: 12px;
  color: var(--white-35);
  margin-bottom: 14px;
}
.settings-input {
  width: 100%;
  padding: 10px 13px;
  background: var(--white-05);
  border: 1px solid var(--white-10);
  border-radius: 9px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  box-sizing: border-box;
  outline: 0;
  transition: border-color 0.2s;
  margin-top: 10px;
}
.settings-input:focus {
  border-color: var(--indigo-50);
  box-shadow: 0 0 0 3px var(--indigo-10);
}
.settings-save-row {
  display: flex;
  justify-content: flex-end;
}
.settings-save-btn {
  padding: 9px 22px;
  background: var(--indigo-gradient);
  border: none;
  border-radius: 9px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition:
    opacity 0.2s,
    transform 0.15s;
  box-shadow: 0 4px 14px var(--indigo-35);
}
.settings-save-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.cursor-size-group {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
}
.cursor-size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--white-05);
  border: 1.5px solid var(--white-10);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--white-50);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 60px;
}
.cursor-size-btn:hover {
  background: var(--indigo-10);
  border-color: var(--indigo-30);
  color: var(--white-80);
}
.cursor-size-btn.active {
  background: var(--indigo-18);
  border-color: var(--indigo-55);
  color: var(--indigo-text);
  box-shadow: 0 0 0 3px var(--indigo-12);
}
.project-gallery {
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: var(--bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 32px 64px;
  overflow-y: auto;
  transition:
    opacity 0.3s,
    visibility 0.3s;
}
.project-gallery.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.pg-tabs {
  display: flex;
  gap: 24px;
}
.pg-tab {
  background: 0 0;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  position: relative;
  transition: color 0.25s;
}
.pg-tab.active {
  color: var(--text-primary);
}
.pg-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}
.pg-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pg-search {
  background: var(--white-04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 240px;
}
.pg-search input {
  background: 0 0;
  border: none;
  color: var(--text-primary);
  outline: 0;
  width: 100%;
}
.pg-control-btn {
  background: var(--white-04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.pg-control-btn:hover {
  background: var(--white-08);
  color: var(--text-primary);
}
.pg-control-btn.icon-only {
  padding: 8px;
}
.pg-view-toggle {
  display: flex;
  background: var(--white-04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}
.pg-view-toggle button {
  background: 0 0;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.pg-view-toggle button.active {
  background: var(--white-08);
  color: var(--text-primary);
}
.pg-btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 12px var(--blue-20);
}
.pg-btn-primary:hover {
  background: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--blue-30);
}
.pg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  aspect-ratio: 16/10;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--black-40);
}
.pc-preview {
  flex: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background-image: radial-gradient(circle, var(--white-02) 1px, transparent 1px);
  background-size: 12px 12px;
}
.pc-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}
.new-project-card {
  border: 1.5px dashed var(--border);
  background: var(--white-02);
}
.new-project-card:hover {
  border-color: var(--blue);
  background: var(--blue-10);
}
.new-project-preview {
  background: 0 0;
  color: var(--blue);
}
.pc-info {
  padding: 12px 16px;
  background: var(--bg-panel-card);
  border-top: 1px solid var(--border);
}
.pc-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pc-delete {
  color: var(--error-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition:
    background 0.2s,
    color 0.2s;
  position: relative;
  z-index: 9999;
  pointer-events: auto;
}
.pc-delete:hover {
  background: var(--error-bg);
  color: var(--error-text);
}
.sc-preset-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.sc-preset-label {
  font-size: 12px;
  color: var(--white-50);
  white-space: nowrap;
  flex-shrink: 0;
}
.sc-preset-select {
  background: var(--stroke-07);
  border: 1px solid var(--white-12);
  border-radius: 8px;
  color: var(--white-80);
  font-size: 13px;
  padding: 6px 28px 6px 12px;
  cursor: pointer;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='var(--white-40)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition:
    border-color 0.15s,
    background-color 0.15s;
  min-width: 140px;
}
.sc-preset-select:hover {
  border-color: var(--indigo-50);
  background-color: var(--indigo-10);
}
.sc-preset-select:focus {
  border-color: var(--indigo-70);
}
.sc-preset-select option {
  background: var(--bg);
  color: var(--white-80);
}
.shortcuts-close-v2 {
  background: var(--white-05);
  border: none;
  color: var(--white-50);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.shortcuts-close-v2:hover {
  background: var(--white-10);
  color: var(--white);
}
.shortcuts-content-v2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  overflow-y: auto;
  padding-right: 8px;
}
.shortcuts-content-v2::-webkit-scrollbar {
  width: 4px;
}
.shortcuts-content-v2::-webkit-scrollbar-thumb {
  background: var(--white-10);
  border-radius: 4px;
}
.sc-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue, var(--blue));
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  opacity: 0.8;
}
.sc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--white-04);
}
.sc-item:last-child {
  border-bottom: none;
}
.sc-label {
  font-size: 15px;
  font-weight: 400;
  color: var(--white-80);
}
.sc-keys {
  display: flex;
  gap: 6px;
  align-items: center;
}
.kbd-v2 {
  background: var(--white-06);
  border: 1px solid var(--white-10);
  border-bottom: 2px solid var(--white-15);
  border-radius: 6px;
  color: var(--white);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  min-width: 34px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  box-shadow: 0 2px 8px var(--black-20);
}
.kbd-v2:hover {
  background: var(--white-10);
  border-color: var(--white-20);
  transform: translateY(-1px);
}
.kbd-v2.recording {
  background: var(--blue-20);
  border-color: var(--blue);
  color: var(--blue);
  animation: recordingPulse 1.5s infinite;
}
@keyframes recordingPulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
.shortcuts-footer-v2 {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--white-06);
  display: flex;
  justify-content: center;
  gap: 32px;
}
.sf-item {
  font-size: 13px;
  color: var(--white-35);
  display: flex;
  align-items: center;
  gap: 8px;
}
.kbd-minimal {
  background: var(--white-04);
  border: 1px solid var(--white-08);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--white-60);
}
.side-plus-btn {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white-05);
  border: 1px solid var(--white-15);
  color: var(--white-40);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  z-index: 1000;
  transition:
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.2s;
  transform: scale(1.5);
}
.side-plus-btn:hover {
  background: var(--white-10);
  transform: scale(1.65);
}
.ref-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  margin: 0 4px;
  background: var(--blue-15);
  border: 1px solid var(--blue-40);
  border-radius: 12px;
  color: var(--blue-bright);
  user-select: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.4;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  vertical-align: middle;
}
.ref-pill:hover {
  background: var(--blue-25);
  border-color: var(--blue-60);
  box-shadow: 0 0 12px var(--blue-40);
}
.ref-pill.active {
  background: var(--blue-30);
  border-color: var(--blue-bright);
  box-shadow: 0 0 15px var(--blue-60);
  transform: scale(1.08);
}
.video-node .img-node-preview {
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
}
.video-node .node-video {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: contain;
}
.video-node .img-rp-large-adaptive {
  background: var(--white-10);
  border: 1px solid var(--white-20);
  color: var(--white);
}
.video-node .img-rp-large-adaptive:hover {
  background: var(--white-10);
  border-color: var(--white-20);
}
.multi-video-container {
  position: absolute;
  inset: 0;
  z-index: 5;
}
.video-toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--black-60);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}
.video-toggle-btn:hover {
  background: var(--black-80);
}
.storyboard-node .v2-storyboard-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px) scale(var(--zoom-inv, 1));
}
.v2-node:hover .storyboard-node .v2-storyboard-hint {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv, 1));
}
.v2-node.selected .storyboard-node .v2-storyboard-hint {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv, 1));
}
.is-editing-mode .storyboard-container {
  border-color: var(--indigo-80);
}
.storyboard-node .sb-cell.drag-hover .cell-overlay {
  border-color: var(--indigo-95);
  box-shadow:
    0 0 0 1px var(--indigo-35),
    0 0 18px var(--indigo-30);
}
.storyboard-node .cell-content-wrap {
  position: relative;
  overflow: hidden;
}
.storyboard-node .storyboard-cell-img.is-cell-preloading {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 50ms ease;
}
.storyboard-node .storyboard-cell-img.is-cell-preloading.is-cell-ready {
  opacity: 1;
}
.storyboard-node .sb-cell.is-drag-source .cell-content-wrap {
  opacity: 0.18;
}
.v2-node:has(.storyboard-node) {
  transition:
    width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.storyboard-node.is-collapsed .cells-grid {
  opacity: 0.85;
}
.audio-card {
  width: 100%;
  height: 100%;
  padding: 0;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
}
.audio-card .waveform {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}
.audio-card .waveform-bg svg {
  opacity: 0.4;
}
.audio-card .waveform-unplayed {
  clip-path: inset(0 0 0 0);
}
.audio-card .waveform-unplayed svg {
  opacity: 0.9;
}
.audio-card .media-progress-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: var(--blue);
  box-shadow: 0 0 8px var(--blue-80);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}
.audio-card .media-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  z-index: 4;
  cursor: ew-resize;
  background: 0 0;
}
.audio-upload-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
}
.audio-upload-btn {
  background: var(--white-05);
  border: 1px solid var(--stroke-08);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.audio-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.audio-play-btn {
  background: var(--bg-node-dark);
  border: 1px solid var(--stroke-10);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  pointer-events: auto;
}
.audio-play-btn svg {
  margin-left: 2px;
}
.audio-time-wrap {
  background: var(--bg-node-dark);
  border: 1px solid var(--stroke-10);
  border-radius: 12px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
}
.audio-time-display {
  font-size: 11px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.audio-player {
  display: none;
}
#v2-canvas .v2-node .v2-node-component .debug-output-content {
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}
.debug-output-content::-webkit-scrollbar {
  width: 6px;
}
.debug-output-content::-webkit-scrollbar-track {
  background: var(--black-20);
  border-radius: 3px;
}
.debug-output-content::-webkit-scrollbar-thumb {
  background: var(--gold-30);
  border-radius: 3px;
}
.debug-output-content::-webkit-scrollbar-thumb:hover {
  background: var(--gold-30);
}
.video-node .rh-api-btn {
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  box-shadow: 0 4px 15px var(--indigo-30);
  margin-left: 8px;
}
.video-node .rh-api-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px var(--indigo-45);
}
.video-node .rh-api-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.canvas-controls {
  position: absolute;
  bottom: 18px;
  left: 12px;
  z-index: 30;
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-panel-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 5px 10px;
  box-shadow: 0 4px 20px var(--black-45);
}
.zoom-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.zoom-btn:hover {
  background: var(--white-08);
  color: var(--text-primary);
}
.zoom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: var(--white-10);
  border-radius: 2px;
  outline: 0;
  cursor: pointer;
}
.zoom-percent {
  font-size: 11px;
  font-weight: 500;
  color: var(--white-50);
  min-width: 36px;
  text-align: center;
  font-family: inherit;
  user-select: none;
  pointer-events: none;
}
.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  background: var(--blue);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 6px var(--blue-50);
}
.conn-plus {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-panel-card);
  border: 1.5px solid var(--white-30);
  color: var(--white-70);
  font-size: 18px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s;
  line-height: 1;
  position: absolute;
  transform: scale(var(--plus-scale));
}
.conn-plus:hover {
  background: var(--blue-20);
  border-color: var(--blue);
  color: var(--blue);
}
.ai-panel {
  display: none;
  width: var(--panel-w);
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  flex-direction: column;
  position: relative;
  transition: width 0.3s ease;
  z-index: 40;
}
.ai-panel.collapsed {
  width: 0;
  overflow: hidden;
  border-left: none;
}
.ai-panel-toggle {
  position: absolute;
  top: 50%;
  left: -16px;
  transform: translateY(-50%);
  width: 16px;
  height: 44px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  transition: all 0.2s;
}
.ai-panel-toggle:hover {
  color: var(--text-primary);
}
.ai-panel.collapsed .ai-panel-toggle {
  left: auto;
  right: -40px;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border: none;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 4px 16px var(--indigo-50);
  animation: fabPulse 2.5s ease-in-out infinite;
}
.ai-panel-inner {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--white-10) transparent;
}
.ai-panel-inner::-webkit-scrollbar {
  width: 3px;
}
.ai-panel-inner::-webkit-scrollbar-thumb {
  background: var(--white-10);
  border-radius: 2px;
}
.ai-greeting-area {
  padding: 22px 22px 10px;
}
.ai-hello {
  font-size: 24px;
  font-weight: 700;
}
.ai-name {
  background: linear-gradient(135deg, var(--cyan), var(--indigo-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 3px;
}
.ai-tip-card {
  margin: 8px 14px;
  background: var(--bg-panel-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.35s;
}
.ai-tip-thumb {
  height: 90px;
  overflow: hidden;
}
.ai-tip-body {
  padding: 10px 14px 12px;
}
.ai-tip-body p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.ai-tip-got {
  margin-top: 8px;
  float: right;
  background: 0 0;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.ai-tip-got:hover {
  background: var(--stroke-07);
  color: var(--text-primary);
}
.ai-messages {
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: msgIn 0.3s ease;
}
@keyframes msgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.ai-msg.user {
  flex-direction: row-reverse;
}
.ai-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--cyan), var(--indigo-text));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.ai-msg.user .ai-msg-avatar {
  background: linear-gradient(135deg, var(--blue), var(--purple));
}
.ai-msg-bubble {
  background: var(--bg-panel-card);
  border: 1px solid var(--border);
  border-radius: 10px 10px 10px 3px;
  padding: 9px 12px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: calc(100% - 34px);
}
.ai-msg.user .ai-msg-bubble {
  background: var(--blue-15);
  border-color: var(--blue-25);
  border-radius: 10px 10px 3px 10px;
}
.ai-start-wrap {
  padding: 6px 14px 12px;
}
.ai-start-btn {
  width: 100%;
  background: var(--blue-10);
  border: 1px solid var(--blue-25);
  color: var(--blue-light);
  padding: 11px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  text-align: center;
}
.ai-start-btn:hover {
  background: var(--blue-20);
  border-color: var(--blue-30);
}
.ai-input-area {
  border-top: 1px solid var(--border);
  padding: 8px 12px 12px;
  background: var(--bg-panel);
}
.ai-input-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
}
.ai-meta-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--white-05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 9px;
  border-radius: 14px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.ai-meta-btn:hover {
  background: var(--white-10);
  color: var(--text-primary);
}
.ai-input-box {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 8px 9px 12px;
  transition: border-color 0.2s;
}
.ai-input-box:focus-within {
  border-color: var(--blue-30);
  box-shadow: 0 0 0 3px var(--blue-10);
}
.ai-textarea {
  flex: 1;
  background: 0 0;
  border: none;
  outline: 0;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  font-family: inherit;
  max-height: 120px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.ai-textarea::placeholder {
  color: var(--text-muted);
}
.ai-send {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border: none;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 3px 10px var(--indigo-40);
}
.ai-send:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 16px var(--indigo-60);
}
.ai-send:active {
  transform: scale(0.95);
}
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
}
.node-add-menu {
  position: fixed;
  display: none;
  background: var(--surface-float);
  border: 1px solid var(--stroke-15);
  border-radius: var(--radius-18);
  padding: var(--space-16);
  width: 280px;
  box-shadow: var(--shadow-surface-strong);
  z-index: 300;
  animation: menuPop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nam-section-title {
  font-size: var(--font-18);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: var(--space-2) var(--space-4) var(--space-12);
}
.nam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}
.nam-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-10);
  background: 0 0;
  border: none;
  border-radius: 12px;
  padding: var(--space-16) var(--space-8) var(--space-12);
  cursor: pointer;
  font-size: var(--font-18);
  color: var(--text-secondary);
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}
.nam-item:hover {
  background: var(--white-05);
  color: var(--text-primary);
}
.nam-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nam-item[data-type='text'] .nam-icon {
  background: var(--green-15);
  color: var(--green);
}
.nam-item[data-type='image'] .nam-icon {
  background: var(--indigo-15);
  color: var(--indigo-text);
}
.nam-item[data-type='video'] .nam-icon {
  background: var(--gold-15);
  color: var(--gold-text);
}
.nam-item[data-type='test-video'] .nam-icon {
  background: var(--red-15);
  color: var(--red);
}
.nam-item[data-type='audio'] .nam-icon {
  background: var(--cyan-15);
  color: var(--cyan-text);
}
.nam-item[data-type='resource'] .nam-icon {
  background: var(--purple-15);
  color: var(--purple-text);
}
.nam-badge {
  font-size: var(--font-18);
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  font-weight: 600;
  opacity: 0.8;
}
.nam-badge.gemini {
  color: var(--purple-text);
}
.nam-badge.banana {
  color: var(--gold);
}
.nam-badge.beta {
  background: var(--cyan-15);
  color: var(--cyan-text);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: var(--font-18);
  letter-spacing: 0.4px;
}
.nam-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-8) 0;
}
.nam-upload {
  flex-direction: row;
  grid-column: span 2;
  padding: 9px 12px;
  border-radius: 8px;
}
.save-dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--overlay-dim);
  align-items: center;
  justify-content: center;
}
.save-dialog-overlay.open {
  display: flex;
}
.save-dialog {
  background: var(--surface-save-dialog);
  border: 1px solid var(--stroke-12);
  border-radius: var(--radius-16);
  padding: var(--space-28) var(--space-28) var(--space-22);
  width: 360px;
  box-shadow: var(--shadow-save-dialog);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.save-dialog-title {
  font-size: var(--font-17);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.save-dialog-sub {
  font-size: var(--font-12);
  color: var(--text-muted);
  margin-top: -10px;
}
.save-dialog-input {
  background: var(--white-05);
  border: 1px solid var(--stroke-14);
  border-radius: var(--radius-9);
  padding: var(--space-10) var(--space-14);
  color: var(--text-primary);
  font-size: var(--font-18);
  outline: 0;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.save-dialog-input:focus {
  border-color: var(--indigo-70);
}
.save-dialog-actions {
  display: flex;
  gap: var(--space-10);
  justify-content: flex-end;
}
.save-dialog-cancel {
  background: var(--white-05);
  border: 1px solid var(--stroke-12);
  border-radius: var(--radius-8);
  color: var(--text-secondary);
  padding: var(--space-9) var(--space-18);
  font-size: var(--font-13);
  cursor: pointer;
  transition: background 0.15s;
}
.save-dialog-cancel:hover {
  background: var(--white-10);
  color: var(--text-primary);
}
.save-dialog-confirm {
  background: var(--indigo-gradient);
  border: none;
  border-radius: var(--radius-8);
  color: var(--text-primary);
  padding: var(--space-9) var(--space-22);
  font-size: var(--font-13);
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.save-dialog-confirm:hover {
  opacity: 0.88;
}
.v2-canvas-ctx-menu,
.v2-node-picker {
  position: fixed;
  z-index: 9999;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-18);
  padding: var(--space-8);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  min-width: 220px;
  font-size: var(--font-16);
  font-family: inherit;
  color: var(--text-primary);
  animation: v2MenuPop 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.v2-node-picker {
  width: 272px;
  transform-origin: top left;
  animation: v2mpop 0.15s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}
#v2PickerOverlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
}
@keyframes v2MenuPop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes v2mpop {
  0% {
    opacity: 0;
    transform: scale(0.93);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
.v2-menu-section {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-10) var(--space-6);
}
.v2-menu-rule {
  flex: 1;
  height: 1px;
  background: var(--fill-hover);
}
.v2-menu-txt-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
}
.v2-node-picker .v2-menu-row {
  gap: var(--space-12);
  padding: var(--space-9) var(--space-10);
  border-radius: var(--radius-12);
  transition: background 0.12s;
  margin-bottom: 1px;
}
.v2-node-picker .v2-menu-row:hover {
  background: var(--fill-hover);
}
.v2-node-picker .v2-menu-ico {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-12);
  background: var(--white-05);
}
.v2-badge-beta {
  font-size: 10px;
  padding: 1px var(--space-6);
  border-radius: var(--radius-10);
  border: 1px solid var(--red-35);
  color: var(--red);
  background: var(--red-10);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.v2-badge-beta-inline {
  margin-left: var(--space-6);
  flex-shrink: 0;
  align-self: center;
}
.v2-node-picker .v2-badge-beta {
  margin-left: var(--space-6);
}
.v2-canvas-ctx-menu.v2-submenu {
  padding: var(--space-6);
  min-width: 200px;
}
.v2-menu-row.v2-menu-row-split {
  justify-content: space-between;
}
.v2-menu-rowlabel {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.v2-menu-arrow {
  font-size: 9px;
  color: var(--text-muted);
}
.v2-menu-arrow.v2-menu-arrow-ml8 {
  margin-left: var(--space-8);
}
.v2-menu-title {
  font-size: var(--font-16);
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--text-subtle);
  padding: var(--space-5) var(--space-8) var(--space-3);
  text-transform: uppercase;
}
.v2-menu-row {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  width: 100%;
  padding: var(--space-8) var(--space-10);
  border-radius: var(--radius-9);
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  background: 0 0;
  color: var(--text-strong);
  transition: background 0.1s;
  box-sizing: border-box;
}
.v2-menu-row:hover {
  background: var(--fill-hover-strong);
  color: var(--text-primary);
}
.v2-canvas-ctx-menu.v2-sb-dropdown {
  padding: var(--space-6);
  min-width: 120px;
  z-index: 10001;
}
.v2-canvas-ctx-menu.v2-sb-dropdown .v2-menu-row {
  font-size: var(--font-13);
  padding: var(--space-6) var(--space-10);
  border-radius: var(--radius-6);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.v2-canvas-ctx-menu.v2-sb-dropdown .v2-menu-row svg {
  flex-shrink: 0;
  opacity: 0.9;
}
.v2-menu-row.has-desc .v2-menu-txt-wrap {
  position: relative;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.v2-menu-row.has-desc .v2-menu-lbl {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateY(9px);
}
.v2-menu-row.has-desc .v2-menu-sub {
  white-space: nowrap;
  opacity: 0;
  color: var(--text-muted);
  font-size: var(--font-12);
  line-height: 1;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s;
  transform: translateY(16px);
  margin-top: var(--space-4);
}
.v2-menu-row.has-desc:hover .v2-menu-lbl,
.v2-menu-row.has-desc:hover .v2-menu-sub {
  transform: translateY(0);
}
.v2-menu-row.has-desc:hover .v2-menu-sub {
  opacity: 1;
}
.v2-menu-ico {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-8);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-13);
}
.v2-menu-lbl {
  font-size: var(--font-16);
  font-weight: 500;
  line-height: 1.2;
}
.v2-menu-sub {
  font-size: var(--font-16);
  color: var(--text-subtle);
  margin-top: 1px;
}
.v2-menu-sep {
  height: 1px;
  background: var(--stroke-08);
  margin: var(--space-4) 0;
}
.v2-menu-kbd {
  font-size: var(--font-16);
  color: var(--text-subtle);
  font-family: monospace;
}
.v2-quote-menu {
  position: fixed;
  z-index: 9990;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-18);
  padding: var(--space-8);
  min-width: 220px;
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  font-family: inherit;
  color: var(--text-primary);
  animation: v2MenuPop 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.v2-quote-title {
  padding: var(--space-5) var(--space-8) var(--space-3);
  font-size: var(--font-16);
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--text-subtle);
  text-transform: uppercase;
}
.update-banner-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: var(--overlay-dim);
  backdrop-filter: blur(var(--overlay-blur));
  -webkit-backdrop-filter: blur(var(--overlay-blur));
}
.update-banner-backdrop.open {
  display: block;
  animation: fadeInOverlay 0.18s ease;
}
.update-banner {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  z-index: 100000;
  background: var(--surface-banner);
  border: 1px solid var(--stroke-10);
  border-radius: var(--radius-20);
  padding: var(--space-24);
  width: min(860px, calc(100vw - var(--space-32)));
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  box-sizing: border-box;
  box-shadow: var(--shadow-banner);
  backdrop-filter: blur(var(--blur-banner));
  align-items: flex-start;
  gap: var(--space-16);
  font-family: inherit;
}
.update-banner.open {
  display: flex;
  animation: updateBannerIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes updateBannerIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 20px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
.update-banner-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}
.update-banner-text {
  flex: 1;
  min-width: 0;
}
.update-banner-title {
  font-size: var(--font-14);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.update-banner-sub {
  font-size: var(--font-12);
  color: var(--text-muted);
  margin-top: var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.update-banner-sub.is-error {
  color: var(--toast-error-text);
}
.update-banner-notes {
  margin-top: var(--space-8);
  color: var(--text-secondary);
  font-size: var(--font-12);
  line-height: 1.55;
  white-space: pre-line;
}
.update-banner-video-shell {
  width: min(512px, 100%);
  aspect-ratio: 512/260;
  margin-top: var(--space-10);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-10);
  overflow: hidden;
  background: var(--surface-panel);
}
.update-banner-video,
.update-banner-video-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--surface-panel);
}
.update-banner-video {
  object-fit: cover;
}
.update-banner-video-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin-top: var(--space-12);
}
.update-banner-video-item-title {
  color: var(--text-primary);
  font-size: var(--font-13);
  font-weight: 700;
  line-height: 1.35;
}
.update-banner-video-item .update-banner-video-shell {
  margin-top: var(--space-8);
}
.update-banner-actions {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  flex-shrink: 0;
}
.update-banner-btn {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  background: var(--action-btn-bg);
  border: none;
  border-radius: var(--radius-10);
  color: var(--text-primary);
  padding: var(--space-8) var(--space-16);
  font-size: var(--font-13);
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    opacity 0.15s,
    transform 0.1s;
  font-family: inherit;
}
.update-banner-btn.is-download {
  background: var(--surface-panel);
  border: 1px solid var(--stroke-default);
  color: var(--text-primary);
}
.update-banner-btn-secondary {
  background: var(--surface-panel);
  border: 1px solid var(--stroke-default);
  color: var(--text-primary);
}
.update-banner-btn:hover:not(:disabled) {
  opacity: 0.9;
  background: var(--action-btn-hover-bg);
}
.update-banner-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.update-banner-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.update-banner-close {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-8);
  background: 0 0;
  color: var(--text-danger);
  font-size: var(--font-18);
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s;
  font-family: inherit;
}
.update-banner-close:hover {
  background: var(--fill-danger-soft);
  color: var(--text-danger);
}
.update-banner-close:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
@media (max-width: 760px) {
  .update-banner {
    top: 50%;
    left: var(--space-12);
    right: var(--space-12);
    bottom: auto;
    width: auto;
    max-width: none;
    max-height: calc(100vh - var(--space-24));
    padding: var(--space-16);
    transform: translateY(-50%);
  }
  .update-banner.open {
    animation-name: updateBannerInMobile;
  }
  .update-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .update-banner-notes {
    height: auto;
    max-height: none;
  }
}
@keyframes updateBannerInMobile {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 20px)) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}
.mascot-wrap {
  position: fixed;
  right: 88px;
  bottom: 18px;
  z-index: 510;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(30px) scale(0.8);
  transition:
    opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mascot-wrap.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.mascot-bubble {
  position: relative;
  background: var(--about-dialog-bg);
  border: 1px solid var(--indigo-45);
  border-radius: var(--radius-14);
  padding: var(--space-10) var(--space-14);
  max-width: 210px;
  min-width: 130px;
  box-shadow: var(--shadow-mascot);
  backdrop-filter: blur(var(--blur-mascot));
  margin-bottom: var(--space-6);
}
.mascot-bubble-text {
  font-size: var(--font-13);
  line-height: 1.6;
  color: var(--text-strong);
  font-family: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}
.mascot-bubble-tail {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--indigo-45);
}
.mascot-bubble-tail::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid var(--about-dialog-bg);
}
.mascot-figure {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.mascot-figure svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
@keyframes mascotIdle {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(3deg);
  }
  75% {
    transform: rotate(-3deg);
  }
}
@keyframes mascotShake {
  0%,
  100% {
    transform: translateX(0) rotate(0);
  }
  15% {
    transform: translateX(-5px) rotate(-6deg);
  }
  30% {
    transform: translateX(5px) rotate(6deg);
  }
  45% {
    transform: translateX(-4px) rotate(-4deg);
  }
  60% {
    transform: translateX(4px) rotate(4deg);
  }
  75% {
    transform: translateX(-2px) rotate(-2deg);
  }
}
@keyframes mascotTextIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mascot-figure.idle {
  animation: mascotIdle 2.8s ease-in-out infinite;
  transform-origin: bottom center;
}
.mascot-figure.shake {
  animation: mascotShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  transform-origin: bottom center;
}
.mascot-bubble-text.refresh {
  animation: mascotTextIn 0.25s ease;
}
@keyframes v2-spin {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}
.v2-spinning {
  animation: v2-spin 1s linear infinite;
  display: inline-block;
  transform-origin: center;
}
.v2-crop-toolbar {
  position: fixed;
  background: var(--bg-panel);
  border: 1px solid var(--stroke-12);
  border-radius: var(--radius-40);
  padding: var(--space-8) var(--space-24);
  display: flex;
  align-items: center;
  gap: var(--space-16);
  z-index: 5005;
  box-shadow: var(--shadow-toolbar);
  pointer-events: auto;
}
.v2-crop-toolbar-btn {
  background: 0 0;
  border: none;
  color: var(--text-secondary);
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-20);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--font-14);
  font-weight: 500;
  transition: all 0.2s;
}
.v2-crop-toolbar-btn:hover {
  background: var(--white-10);
  color: var(--text-primary);
}
.v2-crop-toolbar-btn.exit {
  color: var(--text-danger);
}
.v2-crop-toolbar-btn.exit:hover {
  background: var(--red-20);
  color: var(--text-danger);
}
.v2-crop-toolbar-btn.confirm {
  background: var(--canvas-white);
  color: var(--bg);
}
.v2-crop-toolbar-btn.confirm:hover {
  background: var(--white-90);
}
.v2-crop-ratio-menu {
  position: absolute;
  bottom: calc(100% + var(--space-12));
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface-float);
  border: 1px solid var(--stroke-08);
  border-radius: var(--radius-12);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 120px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-popover);
}
.v2-crop-ratio-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.v2-crop-ratio-item {
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-8);
  color: var(--text-secondary);
  font-size: var(--font-13);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.v2-crop-ratio-item.active,
.v2-crop-ratio-item:hover {
  background: var(--white-10);
  color: var(--text-primary);
}
.v2-crop-divider {
  width: 1px;
  height: 20px;
  background: var(--stroke-10);
}
.v2-expand-toolbar {
  position: fixed;
  bottom: var(--space-40);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-panel);
  border: 1px solid var(--stroke-12);
  border-radius: var(--radius-40);
  padding: var(--space-8) var(--space-18);
  display: flex;
  align-items: center;
  gap: var(--space-10);
  z-index: 5005;
  box-shadow: var(--shadow-toolbar);
}
.v2-expand-toolbar-btn {
  background: 0 0;
  border: none;
  color: var(--text-secondary);
  padding: var(--space-8) var(--space-14);
  border-radius: var(--radius-20);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--font-14);
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.v2-expand-toolbar-btn:hover {
  background: var(--white-10);
  color: var(--text-primary);
}
.v2-expand-toolbar-btn:focus {
  outline: 0;
}
.v2-expand-toolbar-btn:focus-visible {
  outline: 0;
  background: var(--white-10);
  color: var(--text-primary);
}
.v2-expand-toolbar-btn.is-disabled,
.v2-expand-toolbar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
}
.v2-expand-toolbar-btn.exit {
  color: var(--text-danger);
}
.v2-expand-toolbar-btn.exit:hover {
  background: var(--red-20);
  color: var(--text-danger);
}
.v2-expand-toolbar-btn.go {
  background: var(--action-btn-bg);
  color: var(--text-primary);
  box-shadow: 0 4px 14px var(--blue-30);
}
.v2-expand-toolbar-btn.go:hover {
  background: var(--action-btn-hover-bg);
  box-shadow: 0 6px 20px var(--blue-40);
  transform: translateY(-1px);
}
.v2-expand-divider {
  width: 1px;
  height: 20px;
  background: var(--stroke-10);
}
.v2-expand-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.v2-expand-menu {
  position: absolute;
  bottom: calc(100% + var(--space-12));
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface-float);
  border: 1px solid var(--stroke-08);
  border-radius: var(--radius-12);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 120px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-popover);
}
.v2-expand-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.v2-expand-menu-item {
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-8);
  color: var(--text-secondary);
  font-size: var(--font-13);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.v2-expand-menu-item.active,
.v2-expand-menu-item:hover {
  background: var(--white-10);
  color: var(--text-primary);
}
.v2-expand-menu-item.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(1);
}
.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: var(--overlay-dim);
  backdrop-filter: blur(var(--overlay-blur));
}
.settings-row {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  align-items: center;
  gap: var(--space-16);
}
.settings-row > :last-child {
  justify-self: end;
}
.settings-slider-row {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  width: 180px;
}
.settings-slider {
  flex: 1;
}
.settings-slider-value {
  color: var(--text-secondary);
  font-size: var(--font-13);
  width: 30px;
  text-align: right;
}
.settings-desc-lead {
  margin-bottom: var(--space-16);
  color: var(--text-muted);
  font-size: var(--font-13);
}
.settings-card {
  border: 1px solid var(--stroke-08);
  border-radius: var(--radius-12);
  padding: var(--space-14) var(--space-16);
  margin-bottom: var(--space-14);
}
.settings-card-head {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
.settings-card-badge {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-4);
  background: var(--black);
  color: var(--white);
  font-size: 9px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.settings-card-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: var(--radius-4);
  background: var(--white-10);
  padding: var(--space-2);
}
.settings-card-icon--aicanvas {
  width: 22px;
  height: 22px;
  background: 0 0;
  padding: 0;
}
.settings-card-title {
  font-weight: 600;
  font-size: var(--font-14);
  color: var(--text-strong);
}
.settings-provider-status {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-999);
  font-size: var(--font-11);
  font-weight: 600;
  line-height: 1;
  border: 1px solid var(--stroke-10);
  background: var(--white-05);
  color: var(--text-muted);
  white-space: nowrap;
}
.settings-provider-status--deprecated {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}
.settings-provider-status--danger {
  border-color: var(--error-border);
  background: var(--error-bg);
  color: var(--error-text-light);
}
body.dev-mode .settings-card.dev-mode-only {
  display: block;
}
.settings-getkey {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-6);
  background: var(--action-btn-bg);
  border: 1px solid var(--action-btn-bg);
  color: var(--white);
  font-size: var(--font-11);
  text-decoration: none;
  transition: background 0.15s;
}
.settings-getkey:hover {
  background: var(--action-btn-hover-bg);
}
.settings-getkey--muted {
  background: var(--white-05);
  border-color: var(--stroke-10);
  color: var(--text-muted);
  pointer-events: none;
}
.settings-contact-trigger {
  cursor: pointer;
}
.settings-contact-reveal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: var(--space-8);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-6);
  border: 1px solid var(--stroke-10);
  background: var(--white-05);
  color: var(--text-primary);
  font-size: var(--font-12);
  white-space: nowrap;
}
.settings-contact-label {
  color: var(--text-muted);
}
.settings-contact-copy {
  width: 112px;
  padding: 0;
  border: none;
  background: 0 0;
  color: var(--text-primary);
  font-size: var(--font-12);
  outline: 0;
}
.settings-contact-copy::selection {
  background: var(--action-btn-bg);
  color: var(--white);
}
.settings-input--mb10 {
  margin-bottom: var(--space-10);
}
.settings-section--shortcuts {
  margin-top: var(--space-10);
  margin-bottom: var(--space-20);
}
.settings-input--preset {
  margin-top: var(--space-12);
  width: 280px;
}
.settings-shortcuts-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.settings-shortcuts-hint {
  color: var(--text-muted);
  font-size: var(--font-13);
}
.settings-shortcuts-kbd {
  background: var(--white-10);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-4);
  color: var(--white);
  margin-right: var(--space-6);
}
.settings-save-btn.settings-btn-ghost {
  background: var(--white-05);
  color: var(--white);
  border: 1px solid var(--stroke-10);
  box-shadow: none;
}
.settings-align-config-card {
  padding: 0;
}
.settings-align-config-card .settings-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}
.settings-align-config-card .settings-row > :first-child {
  min-width: 0;
  text-align: left;
}
.settings-row--align-gap {
  margin-top: var(--space-8);
  margin-left: var(--space-20);
  padding-top: var(--space-10);
  padding-left: var(--space-12);
}
.settings-row-disabled {
  opacity: 0.55;
}
.settings-row-disabled .cursor-size-btn {
  cursor: not-allowed;
}
.settings-color-choice-group {
  flex-wrap: nowrap;
  justify-content: flex-end;
  max-width: none;
  gap: var(--space-10);
}
.settings-color-choice-group .settings-color-choice {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: 0 0;
  box-shadow: none;
  gap: 0;
}
.settings-color-choice-group .settings-color-choice:hover {
  background: 0 0;
  box-shadow: none;
  transform: scale(1.08);
}
.settings-color-choice-group .settings-color-choice.active {
  background: 0 0;
  border: 0;
  box-shadow: none;
}
.settings-color-choice-group .settings-color-choice.active .settings-color-dot {
  transform: scale(1.18);
  box-shadow:
    0 0 0 2px var(--surface-panel),
    0 0 0 4px currentColor;
}
.settings-color-dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-999);
  display: inline-block;
}
.settings-color-dot--white {
  background: var(--white);
}
.settings-color-dot--blue {
  background: var(--blue);
}
.settings-color-dot--green {
  background: var(--green);
}
.settings-color-dot--cyan {
  background: var(--cyan);
}
.settings-color-dot--purple {
  background: var(--purple);
}
.settings-color-dot--red {
  background: var(--red);
}
.settings-color-dot--yellow {
  background: var(--warning-text);
}
.settings-align-shortcut-note {
  margin-left: var(--space-8);
  font-size: var(--font-12);
  font-weight: 500;
  color: var(--text-muted);
}
.settings-align-shortcut-key {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-6);
  height: 22px;
  border-radius: var(--radius-6);
  background: var(--white-08);
  color: var(--text-primary);
}
.settings-slider-row--align-gap {
  width: 220px;
}
.settings-file-save-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-14);
}
.settings-file-save-row {
  grid-template-columns: minmax(220px, 300px) minmax(280px, 1fr);
  align-items: start;
  margin-bottom: 0;
}
.settings-file-save-row > :last-child {
  justify-self: stretch;
}
.settings-path-input {
  width: 100%;
  min-width: 0;
  font-family: inherit;
}
#alignTriggerModeGroup {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
#alignTriggerModeGroup .cursor-size-btn {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: fit-content;
}
#imageInputUploadQualityGroup {
  justify-content: flex-end;
  flex-wrap: nowrap;
}
#imageInputUploadQualityGroup .cursor-size-btn {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: fit-content;
}
.dreamina-settings-inline {
  font-size: var(--font-13);
  color: var(--text-primary);
  margin-bottom: var(--space-10);
}
.dreamina-settings-status {
  font-size: var(--font-14);
  font-weight: 600;
  color: var(--text-primary);
}
.dreamina-settings-desc {
  margin-top: var(--space-6);
  margin-bottom: var(--space-10);
  font-size: var(--font-12);
  line-height: 1.6;
  color: var(--text-muted);
}
.dreamina-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-10);
  margin-bottom: var(--space-12);
}
.dreamina-login-modal-overlay[hidden] {
  display: none;
}
.dreamina-login-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  background: var(--black-70);
  backdrop-filter: blur(var(--overlay-blur));
  animation: fadeInOverlay 0.18s ease;
}
.dreamina-login-modal {
  position: relative;
  width: min(100%, 420px);
  max-width: 420px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: var(--space-20);
  border-radius: var(--radius-16);
  border: 1px solid var(--stroke-default);
  background: var(--surface-save-dialog);
  box-shadow: 0 18px 80px var(--black-60);
  animation: slideInModal 0.22s ease;
}
.dreamina-login-modal > * {
  grid-column: 1;
}
.dreamina-login-modal.dreamina-login-modal--guide-open {
  width: min(100%, 960px);
  max-width: 960px;
  grid-template-columns: minmax(320px, 420px) minmax(340px, 1fr);
  column-gap: var(--space-12);
}
.dreamina-login-modal.dreamina-login-modal--guide-open .dreamina-manual-guide {
  grid-column: 2;
  grid-row: 1 / span 12;
  align-self: stretch;
  max-height: min(76vh, 620px);
}
.dreamina-login-modal.dreamina-login-modal--guide-open .dreamina-manual-guide-text {
  flex: 1;
  min-height: 260px;
  max-height: none;
}
.dreamina-login-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 28px;
  padding: 0 var(--space-10);
  border-radius: 999px;
  background: var(--white-08);
  border: 1px solid var(--stroke-08);
  color: var(--text-secondary);
  font-size: var(--font-12);
  font-weight: 600;
}
.dreamina-login-modal-close {
  position: absolute;
  top: var(--space-14);
  right: var(--space-14);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--stroke-08);
  background: var(--white-05);
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}
.dreamina-login-modal-close:hover {
  background: var(--white-08);
  color: var(--text-primary);
  border-color: var(--stroke-default);
}
.dreamina-login-modal-close:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.dreamina-login-modal-message {
  margin-top: var(--space-16);
  font-size: var(--font-13);
  line-height: 1.7;
  color: var(--text-secondary);
}
.dreamina-login-modal-qr {
  display: flex;
  justify-content: center;
  margin-top: var(--space-18);
}
.dreamina-login-modal-qr-image {
  display: block;
  width: min(100%, 280px);
  aspect-ratio: 1/1;
  object-fit: contain;
  border-radius: var(--radius-12);
  border: 1px solid var(--stroke-08);
  background: var(--surface-float);
}
.dreamina-login-modal-wait {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-top: var(--space-18);
  padding: var(--space-14);
  border-radius: var(--radius-12);
  background: var(--white-04);
  border: 1px solid var(--stroke-08);
}
.dreamina-login-modal-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--stroke-08);
  border-top-color: var(--text-primary);
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}
.dreamina-login-modal-wait-text {
  font-size: var(--font-13);
  line-height: 1.6;
  color: var(--text-secondary);
}
.dreamina-login-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-8);
  margin-top: var(--space-14);
  flex-wrap: wrap;
}
.dreamina-login-modal-actions .settings-save-btn {
  min-width: 120px;
}
.dreamina-login-modal-actions .settings-save-btn[hidden] {
  display: none;
}
.dreamina-manual-guide {
  display: flex;
  flex-direction: column;
  margin-top: var(--space-10);
  padding: var(--space-12);
  border-radius: var(--radius-12);
  background: var(--white-03);
  border: 1px solid var(--stroke-08);
}
.dreamina-manual-guide[hidden] {
  display: none;
}
.dreamina-manual-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  margin-bottom: var(--space-8);
}
.dreamina-manual-guide-title {
  font-size: var(--font-12);
  font-weight: 600;
  color: var(--text-secondary);
}
.dreamina-manual-quick {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.dreamina-manual-step {
  font-size: var(--font-12);
  line-height: 1.55;
  color: var(--text-primary);
}
.dreamina-manual-step--muted {
  color: var(--text-secondary);
}
.dreamina-manual-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--space-6);
  align-items: center;
}
.dreamina-manual-link-input {
  width: 100%;
  height: 34px;
  padding: 0 var(--space-10);
  border-radius: var(--radius-8);
  border: 1px solid var(--stroke-08);
  background: var(--surface-float);
  color: var(--text-primary);
  font-size: var(--font-12);
  user-select: text;
  -webkit-user-select: text;
}
.dreamina-manual-link-input:focus {
  outline: 0;
  border-color: var(--stroke-default);
}
.dreamina-manual-link-row .settings-save-btn {
  min-width: 64px;
  height: 34px;
  padding: 0 var(--space-10);
  font-size: var(--font-12);
}
.dreamina-manual-link-row .settings-save-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.dreamina-manual-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: center;
}
.dreamina-manual-action-row .settings-save-btn {
  width: 100%;
  height: 34px;
  padding: 0 var(--space-10);
  font-size: var(--font-12);
}
.dreamina-manual-action-row--single {
  grid-template-columns: 1fr;
}
.dreamina-manual-guide-text {
  display: block;
  width: 100%;
  min-height: 132px;
  max-height: 240px;
  padding: var(--space-10);
  border-radius: var(--radius-10);
  border: 1px solid var(--stroke-08);
  background: var(--surface-float);
  color: var(--text-primary);
  font-size: var(--font-12);
  line-height: 1.6;
  resize: vertical;
  white-space: pre;
  overflow: auto;
  user-select: text;
  -webkit-user-select: text;
}
.dreamina-manual-guide-text:focus {
  outline: 0;
  border-color: var(--stroke-default);
}
.dreamina-manual-import-text {
  min-height: 120px;
  max-height: 180px;
}
@media (max-width: 1280px) {
  .settings-align-config-card .settings-row--align-trigger {
    grid-template-columns: 1fr;
  }
  .settings-file-save-row {
    grid-template-columns: 1fr;
  }
  #alignTriggerModeGroup {
    justify-content: flex-start;
    margin-top: var(--space-10);
  }
}
@media (max-width: 1200px) {
  .dreamina-login-modal.dreamina-login-modal--guide-open {
    width: min(100%, 420px);
    max-width: 420px;
    grid-template-columns: minmax(0, 1fr);
  }
  .dreamina-login-modal.dreamina-login-modal--guide-open .dreamina-manual-guide {
    grid-column: 1;
    grid-row: auto;
    max-height: none;
  }
  .dreamina-login-modal.dreamina-login-modal--guide-open .dreamina-manual-guide-text {
    min-height: 132px;
    max-height: 240px;
    flex: none;
  }
  .dreamina-manual-link-row {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .dreamina-manual-link-row .settings-save-btn {
    width: 100%;
  }
  .dreamina-manual-action-row {
    grid-template-columns: 1fr;
  }
  .dreamina-manual-action-row--single {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .dreamina-login-modal-overlay {
    padding: var(--space-16);
  }
  .dreamina-login-modal {
    padding: var(--space-18);
  }
}
.settings-input-with-hint {
  position: relative;
  display: flex;
  align-items: center;
}
.settings-hint-icon {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  cursor: help;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--stroke-10);
  transition: all 0.2s ease;
}
.settings-hint-icon:hover {
  background: var(--bg-3);
  color: var(--text-primary);
  border-color: var(--stroke-20);
}
.settings-hint-icon svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.settings-input-with-hint .settings-input {
  padding-right: 36px;
}
.settings-hint-icon--inline {
  position: relative;
  width: 24px;
  height: 24px;
  margin-left: var(--space-6);
  flex-shrink: 0;
  color: var(--warning-text);
  cursor: help;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: 0 0;
  border: none;
}
.settings-hint-icon--inline svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.5;
}
.settings-hint-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
  pointer-events: none;
}
.settings-hint-icon--inline:hover .settings-hint-tooltip {
  opacity: 1;
  visibility: visible;
}
.settings-hint-tooltip-content {
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: var(--tooltip-shadow);
  font-weight: 500;
  line-height: 1.6;
  min-width: 320px;
  max-width: 400px;
  text-align: left;
  white-space: normal;
}
.settings-hint-tooltip-content .curl-highlight {
  color: var(--error-text);
  font-weight: 600;
}
.settings-hint-tooltip-arrow {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: var(--tooltip-bg) transparent transparent transparent;
}
.settings-subscription-status {
  font-size: var(--font-14);
  color: var(--text-primary);
  font-weight: 600;
}
.settings-subscription-expire {
  margin-top: var(--space-8);
  color: var(--text-muted);
  font-size: var(--font-12);
}
.settings-subscription-contact {
  margin-top: var(--space-10);
}
.is-disabled-link {
  pointer-events: none;
  opacity: 0.7;
}
.subscription-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1700;
  background: var(--overlay-dim);
  backdrop-filter: blur(var(--overlay-blur));
  display: flex;
  align-items: center;
  justify-content: center;
}
.subscription-gate-dialog {
  width: min(460px, calc(100vw - 24px));
  border-radius: var(--radius-16);
  border: 1px solid var(--stroke-10);
  background: var(--surface-float);
  box-shadow: var(--shadow-lg);
  padding: var(--space-16);
}
.subscription-gate-title {
  font-size: var(--font-16);
  font-weight: 700;
  color: var(--text-primary);
}
.subscription-gate-desc {
  margin-top: var(--space-8);
  margin-bottom: var(--space-12);
  color: var(--text-muted);
  font-size: var(--font-13);
}
.subscription-gate-actions {
  margin-top: var(--space-12);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-8);
}
.subscription-gate-btn {
  border-radius: var(--radius-8);
  border: 1px solid var(--stroke-10);
  background: var(--white-05);
  color: var(--text-primary);
  padding: var(--space-8) var(--space-12);
}
.subscription-gate-btn.is-primary {
  background: var(--action-btn-bg);
  border-color: var(--action-btn-bg);
  color: var(--white);
}
.v2-free-angle-embedded {
  background: 0 0;
  border-radius: 18px;
  width: 100%;
  min-height: 260px;
  height: auto;
  display: flex;
  flex-direction: column;
  color: var(--white);
  position: relative;
  animation: fa-fade-in 0.3s ease;
}
@keyframes fa-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fa-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--white-05);
}
.fa-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--white-80);
}
.fa-close-btn {
  background: 0 0;
  border: none;
  color: var(--red);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: transform 0.2s;
}
.fa-close-btn:hover {
  transform: scale(1.2);
}
.fa-content {
  flex: 1;
  display: flex;
  padding: 12px;
  gap: 16px;
}
.fa-preview-area {
  flex: 1;
  background: var(--white-02);
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 800px;
  overflow: hidden;
  cursor: grab;
  min-height: 180px;
}
.fa-preview-area:active {
  cursor: grabbing;
}
.fa-cube-container {
  width: 100px;
  height: 100px;
  transform-style: preserve-3d;
  pointer-events: none;
  transition: transform 0.1s linear;
}
.fa-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}
.fa-cube-face {
  position: absolute;
  width: 100px;
  height: 100px;
  border: 1px solid var(--white-15);
  background: 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  backface-visibility: visible;
  box-sizing: border-box;
  overflow: hidden;
}
.fa-face-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}
.fa-face-label {
  position: relative;
  z-index: 2;
  background: var(--black-40);
  padding: 2px 6px;
  border-radius: 4px;
}
.face-front {
  transform: translateZ(50px);
}
.face-back {
  transform: rotateY(180deg) translateZ(50px);
}
.face-right {
  transform: rotateY(90deg) translateZ(50px);
}
.face-left {
  transform: rotateY(-90deg) translateZ(50px);
}
.face-top {
  transform: rotateX(90deg) translateZ(50px);
}
.face-bottom {
  transform: rotateX(-90deg) translateZ(50px);
}
.fa-controls {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
.fa-control-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fa-label {
  font-size: 12px;
  color: var(--white-50);
}
.fa-value {
  font-size: 12px;
  color: var(--white);
  font-family: monospace;
}
.fa-slider {
  width: 100%;
  height: 12px;
  -webkit-appearance: none;
  appearance: none;
  background: 0 0;
  outline: 0;
  cursor: pointer;
}
.fa-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  background: var(--white-10);
  border-radius: 2px;
}
.fa-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--text-strong);
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
}
.fa-fov-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fa-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--white-10);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s;
}
.fa-switch.active {
  background: var(--blue);
}
.fa-switch-node {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border-radius: 50%;
  transition: 0.3s;
}
.fa-switch.active .fa-switch-node {
  left: 18px;
}
.fa-gen-btn {
  align-self: flex-end;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--action-btn-bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition:
    transform 0.15s,
    background 0.15s,
    box-shadow 0.15s;
  margin-top: 4px;
}
.fa-gen-btn:hover {
  background: var(--action-btn-hover-bg);
  box-shadow: 0 0 12px var(--fa-btn-glow);
  transform: scale(1.05);
}
.fa-reset-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  background: var(--white-08);
  border: 1px solid var(--white-10);
  border-radius: 6px;
  color: var(--white-80);
  font-size: 11px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}
.fa-reset-btn:hover {
  background: var(--white-15);
  color: var(--white);
  border-color: var(--white-30);
}
.v2-spinning-icon svg {
  animation: fa-spin 1s linear infinite;
}
@keyframes fa-spin {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}
#v2-toast-wrap {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 6px;
  z-index: 99999;
  pointer-events: none;
}
.v2-toast {
  background: var(--toast-bg);
  border: 1px solid var(--toast-border);
  color: var(--toast-text);
  padding: 10px 20px;
  border-radius: var(--radius-999);
  font-size: var(--font-13);
  font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: var(--toast-shadow);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  animation:
    v2ToastIn 0.3s ease,
    v2ToastOut 0.3s ease 2.5s forwards;
  contain: layout paint;
  will-change: opacity, transform;
}
.v2-toast.error {
  border-color: var(--toast-error-border);
  color: var(--toast-error-text);
}
.v2-toast.success {
  border-color: var(--toast-success-border);
  color: var(--toast-success-text);
}
.v2-toast.warn {
  border-color: var(--toast-warn-border);
  color: var(--toast-warn-text);
}
.v2-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}
.v2-dev-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--toast-bg);
  color: var(--toast-text);
  padding: 12px 24px;
  border-radius: var(--radius-30);
  z-index: 999999;
  font-size: var(--font-14);
  display: flex;
  align-items: center;
  border: 1px solid var(--toast-border);
  box-shadow: var(--toast-shadow);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  contain: layout paint;
  will-change: opacity, transform;
}
.v2-dev-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.v2-dev-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 16px;
}
.v2-dev-toast-text {
  font-weight: 500;
}
@keyframes v2ToastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes v2ToastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}
.preset-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--overlay-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(var(--overlay-blur));
}
.preset-modal {
  background: var(--surface-float);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-12);
  width: 400px;
  max-width: 90%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-dialog);
  text-align: center;
  padding: var(--space-32) var(--space-24);
}
.preset-modal-icon {
  font-size: 48px;
  margin-bottom: var(--space-16);
}
.preset-modal-title {
  font-size: var(--font-18);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-12);
}
.preset-modal-desc {
  font-size: var(--font-14);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-24);
}
.preset-modal-desc code {
  background: var(--white-05);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-4);
  font-family: monospace;
}
.preset-modal-desc b {
  color: var(--text-strong);
}
.preset-modal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.preset-modal-btn-primary {
  padding: var(--space-10) 0;
  width: 100%;
  border-radius: var(--radius-6);
  border: none;
  background: var(--blue);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
  font-size: var(--font-14);
  transition: opacity 0.15s;
}
.preset-modal-btn-primary:hover {
  opacity: 0.9;
}
.preset-modal-btn-secondary {
  padding: var(--space-10) 0;
  width: 100%;
  border-radius: var(--radius-6);
  border: 1px solid var(--stroke-default);
  background: 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--font-14);
  transition: all 0.15s;
}
.preset-modal-btn-secondary:hover {
  background: var(--fill-hover);
  color: var(--text-primary);
}
.v2-asset-create-panel {
  position: fixed;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-18);
  padding: var(--space-16);
  box-shadow: var(--shadow-menu);
  width: 520px;
  height: min(520px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  z-index: 1000;
  pointer-events: auto;
  font-family: inherit;
  color: var(--text-primary);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}
.v2-asset-create-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-18);
  font-weight: 600;
  color: var(--white-78);
}
.v2-asset-create-header-text {
  min-width: 0;
}
.v2-asset-create-tabs {
  display: flex;
  gap: var(--space-8);
}
.v2-asset-create-tab {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--stroke-default);
  background: var(--fill-input);
  color: var(--text-secondary);
  border-radius: var(--radius-8);
  padding: var(--space-10) var(--space-12);
  font-size: var(--font-13);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}
.v2-asset-create-tab:hover {
  border-color: var(--stroke-strong);
  color: var(--text-primary);
}
.v2-asset-create-tab.active {
  background: var(--fill-hover-strong);
  border-color: var(--blue);
  color: var(--text-primary);
}
.v2-asset-create-body {
  display: flex;
  gap: var(--space-16);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.v2-asset-create-body--update {
  display: block;
}
.v2-asset-create-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.v2-asset-create-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}
.v2-asset-create-label {
  font-size: var(--font-13);
  color: var(--white);
}
.v2-asset-create-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.v2-asset-create-error {
  color: var(--text-danger);
  font-size: var(--font-12);
  min-height: 18px;
}
.v2-asset-create-confirm {
  padding: var(--space-10) var(--space-12);
  border-radius: var(--radius-8);
  border: 1px solid var(--stroke-default);
  background: var(--fill-hover-strong);
  color: var(--text-primary);
  font-size: var(--font-12);
}
.v2-asset-create-cover {
  width: 220px;
  aspect-ratio: 4/3;
  background: var(--bg-node);
  border-radius: var(--radius-8);
  border: 1px solid var(--stroke-default);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.v2-asset-create-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.v2-asset-create-fly {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: var(--radius-10);
  overflow: hidden;
  box-shadow: 0 20px 50px var(--black-50);
  background: var(--bg-node);
}
.v2-asset-create-fly .v2-asset-icon,
.v2-asset-create-fly img {
  width: 100%;
  height: 100%;
}
.v2-asset-create-fly img {
  object-fit: cover;
  display: block;
}
.v2-asset-create-field input,
.v2-asset-create-field select,
.v2-asset-create-select-trigger {
  width: 100%;
  background: var(--fill-input);
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: var(--font-14);
  outline: 0;
  transition: border-color 0.2s;
  box-shadow: inset 0 1px 2px var(--black-20);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.v2-asset-create-field input {
  cursor: text;
}
.v2-asset-create-field input:focus,
.v2-asset-create-select-trigger.active,
.v2-asset-create-select-trigger:focus {
  border-color: var(--blue);
  background: var(--fill-input-focus);
}
.v2-asset-select-dropdown {
  position: fixed;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-8);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  min-width: 160px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.v2-asset-select-dropdown.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.v2-asset-select-item {
  padding: var(--space-8) var(--space-12);
  color: var(--text-primary);
  font-size: var(--font-13);
  border-radius: var(--radius-4);
  cursor: pointer;
  transition: background 0.15s;
}
.v2-asset-select-item.selected,
.v2-asset-select-item:hover {
  background: var(--fill-hover-strong);
}
.v2-asset-create-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: var(--space-16);
  border-top: 1px solid var(--stroke-07);
}
.v2-asset-create-btn {
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-7);
  padding: var(--space-8) var(--space-16);
  font-size: var(--font-13);
  cursor: pointer;
  transition: opacity 0.2s;
}
.v2-asset-create-btn:hover {
  opacity: 0.8;
}
.v2-asset-create-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.v2-asset-update-layout {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: var(--space-16);
  flex: 1;
  min-height: 0;
}
.v2-asset-update-editor,
.v2-asset-update-picker {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.v2-asset-update-editor .v2-asset-create-right {
  width: 100%;
}
.v2-asset-update-search {
  width: 100%;
  background: var(--fill-input);
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: var(--font-13);
  outline: 0;
}
.v2-asset-update-search:focus {
  border-color: var(--blue);
  background: var(--fill-input-focus);
}
.v2-asset-update-list {
  margin-top: var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  overflow: auto;
  min-height: 220px;
  padding-right: 2px;
}
.v2-asset-update-item {
  width: 100%;
  display: flex;
  gap: var(--space-10);
  align-items: center;
  border: 1px solid var(--stroke-default);
  background: var(--fill-input);
  border-radius: var(--radius-10);
  padding: var(--space-10);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.v2-asset-update-item:hover {
  border-color: var(--stroke-strong);
  background: var(--fill-hover-strong);
}
.v2-asset-update-item.active {
  border-color: var(--blue);
  background: var(--fill-hover-strong);
}
.v2-asset-update-thumb {
  width: 64px;
  aspect-ratio: 4/3;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--radius-8);
  border: 1px solid var(--stroke-default);
  background: var(--bg-node);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-asset-update-thumb .v2-asset-icon,
.v2-asset-update-thumb img {
  width: 100%;
  height: 100%;
}
.v2-asset-update-thumb img {
  object-fit: cover;
  display: block;
}
.v2-asset-update-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.v2-asset-update-info small,
.v2-asset-update-info span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.v2-asset-update-info small {
  color: var(--text-muted);
  font-size: var(--font-12);
}
.v2-asset-update-empty {
  min-height: 120px;
  border: 1px dashed var(--stroke-default);
  border-radius: var(--radius-10);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16);
  text-align: center;
}
@media (max-width: 900px) {
  .v2-asset-create-panel {
    width: min(92vw, 640px);
    height: min(82vh, 520px);
    max-height: min(82vh, 720px);
  }
  .v2-asset-update-layout {
    grid-template-columns: 1fr;
  }
  .v2-asset-update-list {
    min-height: 140px;
    max-height: 200px;
  }
}
.v2-asset-sidebar-panel {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  width: 300px;
  height: 500px;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-18);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  overflow: hidden;
}
.v2-asset-sidebar-panel.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.v2-asset-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--stroke-07);
}
.v2-asset-back {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-7);
  border: 1px solid transparent;
  background: 0 0;
  color: var(--white-78);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  margin-right: var(--space-6);
}
.v2-asset-back.show {
  display: inline-flex;
}
.v2-asset-back:hover {
  background: var(--stroke-07);
  border-color: var(--stroke-default);
}
.v2-asset-sidebar-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-align: left;
  font-size: var(--font-18);
  font-weight: 600;
  color: var(--white-78);
}
.v2-asset-sidebar-title-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-asset-sidebar-tabs {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-10);
  border-bottom: 1px solid var(--stroke-07);
}
.v2-asset-sidebar-tab {
  flex: 1;
  text-align: center;
  padding: var(--space-8) 0;
  font-size: var(--font-13);
  color: var(--white-40);
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius-7);
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.v2-asset-sidebar-tab:hover {
  color: var(--white);
  background: var(--stroke-07);
}
.v2-asset-sidebar-tab.active {
  color: var(--text-primary);
  background: var(--fill-hover-strong);
  border-color: var(--stroke-default);
}
.v2-asset-sidebar-content {
  flex: 1;
  padding: var(--space-12);
  overflow-y: auto;
  display: block;
}
.v2-asset-view-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-12);
  align-content: start;
}
.v2-asset-view-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.v2-asset-item {
  position: relative;
  background: var(--bg-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-8);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.v2-asset-item-delete {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-7);
  border: 1px solid var(--stroke-07);
  background: var(--black-60);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 8px 18px var(--black-50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}
.v2-asset-item-delete:hover {
  background: var(--fill-danger-soft);
  border-color: var(--stroke-danger);
  color: var(--red);
  transform: scale(1.03);
}
.v2-asset-item-delete:active {
  transform: scale(0.97);
}
.v2-asset-item-delete svg {
  width: 14px;
  height: 14px;
  display: block;
}
.v2-asset-item-delete-confirm {
  position: absolute;
  inset: 0;
  background: var(--black-60);
  display: flex;
  gap: var(--space-6);
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.v2-asset-item-delete-confirm-btn {
  height: 28px;
  padding: 0 var(--space-10);
  font-size: var(--font-13);
  font-weight: 500;
  border-radius: var(--radius-7);
  cursor: pointer;
  border: 1px solid var(--stroke-default);
  background: var(--fill-hover-strong);
  color: var(--text-primary);
}
.v2-asset-item-delete-confirm-btn--danger {
  background: var(--btn-danger-bg);
  border-color: var(--stroke-danger);
  color: var(--text-on-danger);
}
.v2-asset-item-delete-confirm-btn--danger:hover {
  background: var(--btn-danger-bg-hover);
}
.v2-asset-item-delete-confirm-btn--neutral:hover {
  background: var(--fill-active);
}
.v2-asset-item:hover {
  border-color: var(--blue);
  background: var(--fill-hover-strong);
}
.v2-asset-item.is-new {
  animation: v2AssetNewPulse 0.65s cubic-bezier(0.2, 0, 0, 1);
}
@keyframes v2AssetNewPulse {
  0% {
    box-shadow: none;
    transform: translateZ(0);
  }
  35% {
    box-shadow:
      0 0 0 3px var(--blue),
      0 18px 40px var(--black-50);
  }
  100% {
    box-shadow: none;
  }
}
.v2-asset-item-cover {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--bg-node);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.v2-asset-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v2-asset-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.v2-asset-cover-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}
.v2-asset-cover-cell {
  position: relative;
  overflow: hidden;
  background: var(--bg-node);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-asset-cover-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v2-asset-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-asset-icon--text {
  background: linear-gradient(135deg, var(--black-80), var(--black-60));
}
.v2-asset-icon--audio {
  background: 0 0;
}
.v2-asset-icon--video {
  background: var(--bg-node);
  color: var(--white);
}
.v2-asset-icon--other {
  background: var(--bg-node);
}
.v2-asset-icon-svg {
  width: 60%;
  height: 60%;
}
.v2-asset-detail-actions {
  display: flex;
  justify-content: flex-end;
}
.v2-asset-detail-btn {
  height: 32px;
  padding: 0 var(--space-12);
  border-radius: var(--radius-7);
  border: 1px solid var(--stroke-default);
  background: var(--fill-hover-strong);
  color: var(--text-primary);
  font-size: var(--font-13);
  cursor: pointer;
}
.v2-asset-detail-btn:hover {
  border-color: var(--blue);
}
.v2-asset-subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-12);
  align-content: start;
}
.v2-asset-subitem {
  background: var(--bg-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-8);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.v2-asset-subitem:hover {
  border-color: var(--blue);
  background: var(--fill-hover-strong);
}
.v2-asset-subitem-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--bg-node);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}
.v2-asset-subitem-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.v2-asset-subitem-name {
  padding: var(--space-6) var(--space-8);
  font-size: var(--font-12);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.v2-asset-item-name {
  padding: var(--space-6) var(--space-8);
  font-size: var(--font-12);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.v2-asset-item-name.is-editing {
  padding: var(--space-6) var(--space-8);
}
.v2-asset-item-name-input {
  width: 100%;
  height: 24px;
  border-radius: var(--radius-7);
  border: 1px solid var(--stroke-default);
  background: var(--fill-hover-strong);
  color: var(--text-primary);
  font-size: var(--font-12);
  padding: 0 var(--space-8);
  outline: 0;
  box-sizing: border-box;
}
.v2-asset-item-name-input:focus {
  border-color: var(--blue);
}
.v2-asset-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: var(--space-40) 0;
  color: var(--white-30);
  font-size: var(--font-16);
}
.v2-workflow-sidebar-panel {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  width: 320px;
  height: 520px;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-18);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  overflow: hidden;
  color: var(--text-primary);
}
.v2-workflow-sidebar-panel.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.v2-workflow-modal-header,
.v2-workflow-sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-14);
  border-bottom: 1px solid var(--stroke-07);
}
.v2-workflow-modal-title,
.v2-workflow-sidebar-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.v2-workflow-title-text {
  min-width: 0;
  font-size: var(--font-18);
  font-weight: 600;
  color: var(--text-85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-workflow-back,
.v2-workflow-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-7);
  border: 1px solid transparent;
  background: 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-18);
  line-height: 1;
}
.v2-workflow-back {
  display: none;
}
.v2-workflow-back.show {
  display: inline-flex;
}
.v2-workflow-back:hover,
.v2-workflow-icon-btn:hover {
  background: var(--fill-hover-strong);
  border-color: var(--stroke-default);
  color: var(--text-primary);
}
.v2-workflow-modal-tabs {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-10);
  border-bottom: 1px solid var(--stroke-07);
}
.v2-workflow-modal-tab {
  flex: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-7);
  padding: var(--space-8) var(--space-10);
  background: 0 0;
  color: var(--text-secondary);
  font-size: var(--font-13);
  cursor: pointer;
}
.v2-workflow-modal-tab.active {
  background: var(--blue-15);
  border-color: var(--blue-border-strong);
  color: var(--text-primary);
}
.v2-workflow-search {
  padding: var(--space-10);
}
.v2-workflow-input,
.v2-workflow-search-input,
.v2-workflow-textarea {
  width: 100%;
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-7);
  background: var(--fill-input);
  color: var(--text-primary);
  font: inherit;
  outline: 0;
}
.v2-workflow-input,
.v2-workflow-search-input {
  height: 36px;
  padding: 0 var(--space-10);
}
.v2-workflow-textarea {
  min-height: 86px;
  resize: vertical;
  padding: var(--space-10);
}
.v2-workflow-input:focus,
.v2-workflow-search-input:focus,
.v2-workflow-textarea:focus {
  border-color: var(--blue-border-focus);
  background: var(--fill-input);
}
.v2-workflow-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  padding: 0 var(--space-10) var(--space-12);
  overflow: auto;
}
.v2-workflow-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: var(--space-10);
  min-height: 92px;
  padding: var(--space-8);
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  background: var(--surface-node);
  overflow: hidden;
}
.v2-workflow-cover,
.v2-workflow-cover-choice-img,
.v2-workflow-update-thumb {
  background: var(--fill-hover);
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-7);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v2-workflow-cover {
  width: 84px;
  height: 76px;
}
.v2-workflow-cover img,
.v2-workflow-cover-choice-img img,
.v2-workflow-detail-cover img,
.v2-workflow-form-cover img,
.v2-workflow-update-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.v2-workflow-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-subtle);
  font-size: var(--font-13);
  font-weight: 700;
  background: var(--fill-hover-strong);
}
.v2-workflow-card-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.v2-workflow-card-title,
.v2-workflow-detail-title {
  color: var(--text-primary);
  font-size: var(--font-14);
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-workflow-card-title {
  white-space: nowrap;
}
.v2-workflow-tag-editor,
.v2-workflow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.v2-workflow-tag,
.v2-workflow-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  max-width: 100%;
  min-height: 22px;
  padding: 0 var(--space-8);
  border-radius: var(--radius-7);
  background: var(--white-08);
  color: var(--text-secondary);
  font-size: var(--font-12);
}
.v2-workflow-tag-chip button {
  border: none;
  background: 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
}
.v2-workflow-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  background: var(--black-70);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s;
}
.v2-workflow-card:hover .v2-workflow-card-overlay {
  opacity: 1;
  pointer-events: auto;
}
.v2-workflow-card-action,
.v2-workflow-primary-btn,
.v2-workflow-secondary-btn {
  border-radius: var(--radius-7);
  border: 1px solid var(--stroke-default);
  min-height: 34px;
  padding: 0 var(--space-12);
  font-size: var(--font-13);
  cursor: pointer;
  color: var(--text-primary);
}
.v2-workflow-card-action,
.v2-workflow-secondary-btn {
  background: var(--surface-float);
}
.v2-workflow-card-action.primary,
.v2-workflow-primary-btn {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.v2-workflow-card-action:disabled,
.v2-workflow-primary-btn:disabled,
.v2-workflow-secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.v2-workflow-empty,
.v2-workflow-skeleton {
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  background: var(--surface-node);
}
.v2-workflow-empty {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-16);
  color: var(--text-secondary);
  text-align: center;
}
.v2-workflow-empty-text {
  line-height: 1.5;
}
.v2-workflow-skeleton {
  min-height: 92px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--white-04), var(--white-10), var(--white-04));
  background-size: 220% 100%;
  animation: v2-workflow-skeleton 1.4s ease-in-out infinite;
}
@keyframes v2-workflow-skeleton {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}
.v2-workflow-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}
.v2-workflow-detail-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}
.v2-workflow-detail-section-title {
  color: var(--text-primary);
  font-size: var(--font-13);
  font-weight: 600;
}
.v2-workflow-detail-cover,
.v2-workflow-form-cover {
  width: 100%;
  aspect-ratio: 16/9;
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  overflow: hidden;
  background: var(--fill-hover);
}
.v2-workflow-detail-note {
  color: var(--text-secondary);
  font-size: var(--font-13);
  line-height: 1.6;
  white-space: pre-wrap;
}
.v2-workflow-content-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}
.v2-workflow-content-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-10);
  padding: var(--space-10);
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  background: var(--surface-node);
}
.v2-workflow-content-thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  overflow: hidden;
  background: var(--fill-hover);
}
.v2-workflow-content-thumb .v2-workflow-cover-placeholder {
  padding: var(--space-6);
  text-align: center;
  font-size: var(--font-12);
  line-height: 1.35;
}
.v2-workflow-content-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.v2-workflow-content-type {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 var(--space-8);
  border-radius: var(--radius-7);
  background: var(--white-08);
  color: var(--text-secondary);
  font-size: var(--font-12);
}
.v2-workflow-content-title {
  color: var(--text-primary);
  font-size: var(--font-13);
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}
.v2-workflow-content-summary {
  color: var(--text-secondary);
  font-size: var(--font-12);
  line-height: 1.55;
  word-break: break-word;
}
.v2-workflow-detail-section .v2-workflow-empty {
  min-height: 88px;
}
.v2-workflow-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-24);
  background: var(--overlay-dim);
}
.v2-workflow-modal-backdrop.show {
  display: flex;
}
.v2-workflow-modal {
  width: min(860px, 100%);
  max-height: min(760px, 92vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-8);
  background: var(--surface-menu);
  box-shadow: var(--shadow-dialog);
  color: var(--text-primary);
}
.v2-workflow-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--space-16);
}
.v2-workflow-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-14);
}
.v2-workflow-cover-row {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: var(--space-14);
  align-items: start;
}
.v2-workflow-cover-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: var(--space-8);
  max-height: 188px;
  overflow: auto;
}
.v2-workflow-cover-choice {
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  padding: var(--space-4);
  background: var(--surface-node);
  cursor: pointer;
}
.v2-workflow-cover-choice.active {
  border-color: var(--blue-border-focus);
  background: var(--blue-15);
}
.v2-workflow-cover-choice-img {
  width: 100%;
  aspect-ratio: 16/9;
}
.v2-workflow-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  color: var(--text-secondary);
  font-size: var(--font-13);
}
.v2-workflow-form-footer,
.v2-workflow-tag-input-row {
  display: flex;
  gap: var(--space-8);
  align-items: center;
}
.v2-workflow-tag-input-row {
  width: 100%;
  min-width: 0;
  align-items: stretch;
  flex-wrap: nowrap;
}
.v2-workflow-tag-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.v2-workflow-tag-add-btn {
  flex: 0 0 72px;
  width: 72px;
  box-sizing: border-box;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.v2-workflow-form-footer {
  justify-content: flex-end;
  padding-top: var(--space-12);
  border-top: 1px solid var(--stroke-07);
}
.v2-workflow-confirm-tip,
.v2-workflow-form-error {
  min-height: 20px;
  color: var(--error-text);
  font-size: var(--font-12);
}
.v2-workflow-confirm-tip {
  padding: var(--space-10);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-8);
  background: var(--warning-bg);
  color: var(--warning-text);
}
.v2-workflow-update-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: var(--space-16);
  min-height: 480px;
}
.v2-workflow-update-editor,
.v2-workflow-update-info,
.v2-workflow-update-list,
.v2-workflow-update-picker {
  min-width: 0;
}
.v2-workflow-update-editor,
.v2-workflow-update-picker {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}
.v2-workflow-update-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  overflow: auto;
}
.v2-workflow-update-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: var(--space-8);
  align-items: center;
  width: 100%;
  border: 1px solid var(--stroke-07);
  border-radius: var(--radius-8);
  padding: var(--space-6);
  background: var(--surface-node);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}
.v2-workflow-update-item.active {
  border-color: var(--blue-border-focus);
  background: var(--blue-15);
}
.v2-workflow-update-thumb {
  width: 52px;
  height: 42px;
}
.v2-workflow-update-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.v2-workflow-update-info small,
.v2-workflow-update-info span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-workflow-update-info small {
  color: var(--text-subtle);
  font-size: var(--font-12);
}
@media (max-width: 760px) {
  .v2-workflow-sidebar-panel {
    width: min(320px, calc(100vw - 88px));
    height: min(520px, calc(100vh - 32px));
  }
  .v2-workflow-cover-row,
  .v2-workflow-update-layout {
    grid-template-columns: 1fr;
  }
}
.prompt-attachment-btn.is-connecting-active svg {
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.prompt-attachment-btn svg {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.v2-node.conn-src .text-prompt-panel {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv));
  pointer-events: auto;
}
.ref-thumb-wrap:hover .ref-thumb-audio,
.ref-thumb-wrap:hover .ref-thumb-text {
  background: var(--white-08);
}
.ref-thumb-wrap.highlight .ref-thumb-media,
.ref-thumb-wrap:hover .ref-thumb-media {
  transform: scale(1.35);
  box-shadow: 0 4px 16px var(--black-60);
  z-index: 10;
  position: relative;
}
.ref-thumb-media {
  transition: opacity 0.12s ease;
}
.ref-thumb-media.is-pending {
  opacity: 0;
}
.ref-thumb-mask-badge {
  position: absolute;
  left: 2px;
  bottom: 2px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--stroke-10);
  color: var(--text-primary);
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  z-index: 15;
}
.ref-thumb-delete,
.ref-upload-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red-40);
  color: #fff;
  border: none;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: var(--link-cursor);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.15s,
    transform 0.15s;
  z-index: 20;
  pointer-events: auto;
}
.ref-thumb-wrap:hover .ref-thumb-delete,
.ref-thumb-wrap:hover .ref-upload-delete {
  opacity: 1;
  transform: scale(1);
}
.ref-thumb-delete:hover,
.ref-upload-delete:hover {
  background: var(--red);
}
.ref-hover-preview {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  padding: 0;
  border-radius: 0;
  background: 0 0;
  box-shadow: none;
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}
.ref-hover-preview.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}
.ref-hover-preview-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 360px;
  max-height: 240px;
  object-fit: contain;
  border-radius: var(--radius-18);
  background: 0 0;
  opacity: 1;
  transition: opacity 80ms ease;
}
.ref-hover-preview-img.is-pending {
  opacity: 0;
}
.ref-upload-slot {
  height: 44px;
  min-width: 94px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1.5px dashed var(--stroke-default);
  background: var(--surface-node);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.rh-anime-real-node .ref-upload-slot {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 0;
  white-space: normal;
  word-break: break-all;
  line-height: 1.1;
  text-align: center;
}
.rh-anime-real-node .ref-upload-label {
  display: block;
}
.rh-person-replace-v3-node .ref-upload-slot {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  padding: 0;
  white-space: normal;
  word-break: break-all;
  line-height: 1.1;
  text-align: center;
}
.rh-person-replace-v3-node .ref-upload-label {
  display: block;
}
.ref-upload-slot:hover {
  background: var(--white-05);
  border-color: var(--blue-30);
  color: var(--text-primary);
}
.ref-upload-slot.ref-thumb-wrap {
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.ref-upload-slot[data-ref-src='upload'] {
  min-width: auto;
  padding: 0;
  border: none;
  background: 0 0;
  color: inherit;
}
.ref-info {
  font-size: 13px;
  color: var(--white-50);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.ref-thumb-text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--black-80), var(--black-60));
  border-color: var(--cyan-15);
}
.ref-thumb-txt-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 1px;
}
.ref-thumb-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  background: 0 0;
  border-color: var(--blue-30);
  padding: 0;
  overflow: hidden;
}
canvas.ref-thumb-media {
  border-radius: 8px;
  background: var(--black);
  border: 1.5px solid var(--white-10);
}
.audio-node.is-connecting-source .text-prompt-panel,
.audio-node.selected .text-prompt-panel,
.image-node.is-connecting-source .text-prompt-panel,
.image-node.selected .text-prompt-panel,
.storyboard-node.conn-src .text-prompt-panel,
.text-node.is-connecting-source .text-prompt-panel,
.text-node.selected .text-prompt-panel,
.video-node.is-connecting-source .text-prompt-panel,
.video-node.selected .text-prompt-panel {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv));
  pointer-events: auto;
}
.img-card {
  width: auto;
  min-width: 100px;
  max-width: none;
  padding: 0;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: 18px;
  overflow: hidden;
  transition:
    width 0.3s ease,
    height 0.3s ease,
    border-color 0.2s;
}
.node.image-node.selected .img-card {
  border-color: var(--blue-40);
}
.image-node .text-prompt-panel {
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
}
.node.image-node.selected .text-prompt-panel {
  border-color: var(--blue-40);
  box-shadow:
    0 8px 36px var(--black-80),
    0 0 40px var(--blue-glow-subtle);
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv));
}
.text-node .text-prompt-panel {
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
}
.node.text-node.is-connecting-source .text-prompt-panel,
.node.text-node.selected .text-prompt-panel {
  border-color: var(--warning-border);
}
.video-node .text-prompt-panel {
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
}
.node.video-node.selected .text-prompt-panel {
  border-color: var(--purple-border-strong);
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv));
}
.audio-node .text-prompt-panel {
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
}
.node.audio-node.selected .text-prompt-panel {
  border-color: var(--blue-border-strong);
  box-shadow:
    0 8px 36px var(--black-80),
    0 0 35px var(--blue-glow-subtle);
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv));
}
.img-node-preview {
  width: 100%;
  height: auto;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
}
.img-node-placeholder {
  color: var(--white-20);
  pointer-events: none;
  user-select: none;
}
.node.ratio-animating {
  transition:
    top 0.3s ease,
    left 0.3s ease;
}
.img-model-pills {
  display: flex;
  gap: 0;
  align-items: center;
}
.prompt-attachment-btn {
  position: absolute;
  top: -28px;
  left: -28px;
  width: 56px;
  height: 56px;
  background-color: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  cursor: var(--link-cursor);
  box-shadow: 0 4px 12px var(--black-50);
  animation: float-bounce 2.5s ease-in-out infinite;
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.prompt-attachment-btn svg {
  width: 36px;
  height: 36px;
  transition:
    width 0.4s cubic-bezier(0.19, 1, 0.22, 1),
    height 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
::view-transition-group(*) {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}
.node-ref-bar.active .prompt-attachment-btn {
  top: 6px;
  left: 0;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--black-40);
  z-index: 10;
}
.node-ref-bar.active .prompt-attachment-btn svg {
  width: 32px;
  height: 32px;
}
.node-ref-bar.active .ref-thumb-container {
  margin-left: 62px;
}
.ref-thumb-container {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: 4px;
}
@keyframes float-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}
.prompt-attachment-btn:hover {
  background-color: var(--white-08);
  border-color: var(--white-30);
  animation-play-state: paused;
}
.text-prompt-panel:focus-within .node-ref-bar:not(.active) .prompt-attachment-btn,
.text-prompt-panel:focus-within .node-ref-bar:not(.active) .prompt-attachment-btn svg {
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.text-prompt-panel:focus-within .node-ref-bar.active .prompt-attachment-btn {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}
.text-prompt-panel:focus-within .node-ref-bar:not(.active) .prompt-attachment-btn:hover,
.text-prompt-panel:focus-within .node-ref-bar:not(.active) .prompt-attachment-btn:hover svg {
  opacity: 1;
}
.v2-node.rh-anime-real-node .text-prompt-panel {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv));
  pointer-events: auto;
}
.v2-node.rh-anime-real-node
  .text-prompt-panel:focus-within
  .node-ref-bar:not(.active)
  .prompt-attachment-btn,
.v2-node.rh-anime-real-node
  .text-prompt-panel:focus-within
  .node-ref-bar:not(.active)
  .prompt-attachment-btn
  svg {
  opacity: 1;
}
.v2-node.rh-anime-real-node .node-ref-bar .prompt-attachment-btn {
  top: 6px;
  left: 0;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  box-shadow: 0 2px 10px var(--black-40);
  z-index: 10;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  animation: none;
}
.v2-node.rh-anime-real-node .node-ref-bar .prompt-attachment-btn svg {
  width: 32px;
  height: 32px;
}
.v2-node.rh-anime-real-node .node-ref-bar .ref-thumb-container {
  margin-left: 62px;
}
.prompt-input-wrapper {
  position: relative;
  width: 100%;
}
.prompt-input-wrapper.is-resizable {
  min-width: 260px;
  min-height: 96px;
}
.prompt-input-wrapper.is-resizing {
  user-select: none;
  cursor: move;
}
.text-prompt-panel.is-resize-hover {
  cursor: move;
  border-color: var(--white-35);
  box-shadow:
    0 0 0 1px var(--white-25),
    0 8px 36px var(--black-70),
    0 0 24px var(--white-20);
}
.text-prompt-panel.is-resize-hover .prompt-input-wrapper,
.text-prompt-panel.is-resize-hover .prompt-panel-footer,
.text-prompt-panel.is-resize-hover .prompt-panel-footer *,
.text-prompt-panel.is-resize-hover .prompt-textarea {
  cursor: move;
}
#v2-wrap .text-prompt-panel.is-resize-hover,
#v2-wrap .text-prompt-panel.is-resize-hover .prompt-input-wrapper,
#v2-wrap .text-prompt-panel.is-resize-hover .prompt-panel-footer,
#v2-wrap .text-prompt-panel.is-resize-hover .prompt-panel-footer *,
#v2-wrap .text-prompt-panel.is-resize-hover .prompt-textarea {
  cursor: move;
}
.text-prompt-panel.is-resize-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--white-40);
  box-shadow: 0 0 20px var(--white-20);
  pointer-events: none;
}
.prompt-textarea {
  width: 100%;
  height: 124px;
  background: 0 0;
  border: none;
  color: var(--text-muted);
  font-size: var(--prompt-font-size, 16px);
  resize: none;
  outline: 0;
  font-family: inherit;
  line-height: 1.5;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-all;
}
.prompt-textarea::placeholder {
  color: var(--white-35);
}
.prompt-textarea:empty::before {
  content: attr(data-placeholder);
  color: var(--white-35);
  cursor: var(--text-cursor);
}
.prompt-textarea:focus {
  color: var(--text-primary);
}
.prompt-panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.prompt-model {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--white-80);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--white-06);
  border: 1px solid var(--white-10);
  cursor: var(--link-cursor);
  transition: all 0.2s;
}
.prompt-model:hover {
  background: var(--white-12);
  border-color: var(--white-20);
}
.prompt-model-select {
  background: 0 0;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  outline: 0;
  cursor: var(--link-cursor);
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
}
.prompt-model-select option {
  background: var(--bg-dropdown);
  color: #fff;
}
.prompt-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.prompt-count-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--white-06);
  border: 1px solid var(--white-10);
  color: var(--white-90);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 28px 6px 14px;
  border-radius: 8px;
  cursor: var(--link-cursor);
  font-family: inherit;
  outline: 0;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='var(--white-60)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 5 6 8 9 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.prompt-count-select:hover {
  background-color: var(--white-12);
  border-color: var(--white-20);
}
.prompt-count-select:focus {
  border-color: var(--indigo-60);
  box-shadow: 0 0 0 2px var(--indigo-20);
}
.prompt-count-select option {
  background: var(--bg-dropdown);
  color: #fff;
}
.prompt-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white-15);
  border: none;
  color: #fff;
  cursor: var(--link-cursor);
  transition:
    background 0.2s,
    transform 0.15s;
}
.prompt-submit:hover {
  background: var(--white-25);
  transform: scale(1.05);
}
.v2-node.rh-anime-real-node .img-gen-btn {
  background: var(--red-20);
  color: var(--red);
}
.v2-node.rh-anime-real-node .img-gen-btn:hover {
  background: var(--red-30);
}
.v2-node.rh-anime-real-node .img-gen-btn:disabled {
  background: var(--red-10);
  color: var(--red-30);
  cursor: not-allowed;
  transform: none;
}
.v2-node.rh-anime-real-node .img-gen-btn:disabled:hover {
  background: var(--red-10);
  transform: none;
}
.v2-node.rh-anime-real-node .img-gen-btn.is-rh-busy {
  background: var(--red-20);
  color: var(--red);
}
.v2-node.rh-anime-real-node .img-gen-btn.is-rh-busy:hover {
  background: var(--red-30);
}
.ftb-sep {
  width: 1px;
  height: 18px;
  background: var(--white-12);
  margin: 0 2px;
  align-self: center;
}
.premium-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  background: var(--black-40);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay 0.3s ease;
}
@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.shortcuts-modal-v2 {
  background: var(--bg-modal);
  border: 1px solid var(--white-08);
  border-radius: 24px;
  width: 820px;
  max-height: 85vh;
  padding: 36px;
  color: var(--white);
  box-shadow: 0 32px 64px var(--black-60);
  display: flex;
  flex-direction: column;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    sans-serif;
  animation: slideInModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideInModal {
  from {
    transform: translateY(30px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.shortcuts-header-v2 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}
.sh-title-group .shortcuts-title-v2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}
.sh-title-group .shortcuts-subtitle {
  font-size: 14px;
  color: var(--white-50);
  margin: 0;
}
.prompt-attachment-btn svg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.is-connecting-source {
  animation: source-glow 2s ease-in-out infinite;
  z-index: 100;
}
.video-node.type-source.is-connecting-source {
  animation: none;
  box-shadow: none;
}
.ref-thumb-wrap.dragging .ref-thumb-delete,
.ref-thumb-wrap.dragging-capture .ref-thumb-delete {
  display: none;
  opacity: 0;
}
.ref-thumb-wrap.drag-over {
  border: 1.5px solid var(--blue-border-focus);
  box-shadow: 0 0 14px var(--blue-50);
  transform: scale(1.08);
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.v2-draft-edge {
  stroke: var(--edge-draft-stroke);
  stroke-width: 2;
  stroke-dasharray: 6 4;
}
.v2-edge-group {
  cursor: var(--pointer-cursor);
}
.v2-edge-path {
  stroke: var(--white-40);
  stroke-width: 2;
  transition:
    stroke 0.2s,
    stroke-width 0.2s;
}
.v2-edge-hit {
  stroke: white;
  stroke-width: 16;
  stroke-opacity: 0;
  pointer-events: auto;
}
.v2-edge-delete {
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  cursor: var(--link-cursor);
}
.v2-edge-group:hover .v2-edge-path {
  stroke: var(--white-80);
  stroke-width: 3;
}
.v2-edge-group:hover .v2-edge-delete {
  opacity: 1;
  pointer-events: auto;
}
.node-floating-toolbar {
  position: absolute;
  bottom: calc(100% + 38px);
  left: 50%;
  transform: translateX(-50%) translateY(10px) scale(var(--zoom-inv, 1));
  background: var(--bg-panel-card);
  border: 1px solid var(--white-12);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 12px 48px var(--black-70);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s ease-out,
    transform 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transform-origin: bottom center;
}
.node.selected .node-floating-toolbar,
.v2-node.conn-src .node-floating-toolbar {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv, 1));
}
.no-result .node-floating-toolbar,
.node.selected .no-result .node-floating-toolbar {
  display: none;
}
.node-floating-toolbar .preview-mode-only {
  display: none;
}
body.preview-mode .node-floating-toolbar .preview-mode-only {
  display: inline-flex;
}
.ftb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: 0 0;
  border: none;
  border-radius: 8px;
  color: var(--white-90);
  font-size: 14px;
  font-weight: 500;
  cursor: var(--link-cursor);
  transition: all 0.2s;
  white-space: nowrap;
}
.ftb-btn svg {
  flex-shrink: 0;
}
.ftb-chevron {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ftb-btn:hover {
  background: var(--white-10);
  color: var(--white);
}
.ftb-btn.active {
  background: var(--indigo-20);
  border: 1px solid var(--indigo-50);
  color: var(--white);
  box-shadow: 0 0 12px var(--indigo-30);
}
.ftb-btn.icon-only {
  width: 38px;
  padding: 0;
  gap: 0;
}
.ftb-btn.icon-only svg {
  flex-shrink: 0;
}
.storyboard-toolbar .ftb-btn.act-aspect,
.storyboard-toolbar .ftb-btn.act-grid {
  width: 120px;
  padding: 0 8px;
  justify-content: center;
  gap: 4px;
}
.storyboard-toolbar .ftb-btn.act-aspect span,
.storyboard-toolbar .ftb-btn.act-grid span {
  flex: 1;
  text-align: center;
}
.storyboard-toolbar .ftb-btn.act-aspect .ftb-chevron,
.storyboard-toolbar .ftb-btn.act-grid .ftb-chevron {
  margin-left: 0;
}
.node-floating-toolbar .ftb-btn[data-tooltip] {
  position: relative;
}
.node-floating-toolbar .ftb-btn.is-copied,
.node-floating-toolbar .ftb-btn.is-copied:hover {
  color: var(--toast-success-text);
}
.node-floating-toolbar .ftb-btn[data-tooltip].is-tooltip-pinned::after,
.node-floating-toolbar .ftb-btn[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  transform-origin: bottom center;
  background: var(--tooltip-bg);
  color: var(--tooltip-text);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  box-shadow: var(--tooltip-shadow);
  font-weight: 500;
  opacity: 0;
  animation: tooltipFadeIn 0.2s forwards;
  animation-delay: 0.1s;
}
.node-floating-toolbar .ftb-btn[data-tooltip].is-tooltip-pinned::before,
.node-floating-toolbar .ftb-btn[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  transform-origin: bottom center;
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: var(--tooltip-bg) transparent transparent transparent;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  animation: tooltipFadeIn 0.2s forwards;
  animation-delay: 0.1s;
}
.node-bottom-toolbar-anchor .node-floating-toolbar .ftb-btn[data-tooltip].is-tooltip-pinned::after,
.node-bottom-toolbar-anchor .node-floating-toolbar .ftb-btn[data-tooltip]:hover::after,
.panorama-scene-bottom-toolbar-anchor
  .node-floating-toolbar
  .ftb-btn[data-tooltip].is-tooltip-pinned::after,
.panorama-scene-bottom-toolbar-anchor .node-floating-toolbar .ftb-btn[data-tooltip]:hover::after {
  top: calc(100% + 8px);
  bottom: auto;
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  transform-origin: top center;
}
.node-bottom-toolbar-anchor .node-floating-toolbar .ftb-btn[data-tooltip].is-tooltip-pinned::before,
.node-bottom-toolbar-anchor .node-floating-toolbar .ftb-btn[data-tooltip]:hover::before,
.panorama-scene-bottom-toolbar-anchor
  .node-floating-toolbar
  .ftb-btn[data-tooltip].is-tooltip-pinned::before,
.panorama-scene-bottom-toolbar-anchor .node-floating-toolbar .ftb-btn[data-tooltip]:hover::before {
  top: calc(100% + 2px);
  bottom: auto;
  transform: translateX(-50%) scale(var(--zoom-inv, 1));
  transform-origin: top center;
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent var(--tooltip-bg) transparent;
}
.v2-comment-toolbar.comment-toolbar-popup-open .ftb-btn[data-tooltip]:hover::after,
.v2-comment-toolbar.comment-toolbar-popup-open .ftb-btn[data-tooltip]:hover::before {
  display: none;
}
.v2-node.conn-hoverTarget:not(.comment-note-node)::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  pointer-events: none;
  z-index: 100;
  border-radius: var(--hover-br, 20px);
  padding: 3px;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: source-out;
  mask-composite: exclude;
}
.v2-node.conn-hover-input::after,
.v2-node.conn-hover-output::after {
  background: linear-gradient(
    90deg,
    transparent 0,
    var(--white-05) 20%,
    var(--white-40) 40%,
    #fff 50%,
    var(--white-40) 60%,
    var(--white-05) 80%,
    transparent 100%
  );
  background-size: 300% 100%;
}
.v2-node.conn-hover-input::after {
  animation: tyndall-sweep-anim 5s linear infinite;
}
.v2-node.conn-hover-output::after {
  animation: tyndall-sweep-anim 5s linear infinite reverse;
}
@keyframes tyndall-sweep-anim {
  0% {
    background-position: 300% 0;
  }
  100% {
    background-position: -300% 0;
  }
}
.v2-node:not(.node-group):not(.comment-note-node).selected,
.v2-node:not(.node-group):not(.comment-note-node).v2-selected {
  box-shadow:
    0 0 0 2px var(--white-40),
    0 0 25px 2px var(--white-30);
  border-radius: 16px;
  z-index: 50;
}
#v2-side-plus-holder .side-plus-btn {
  color: var(--text-subtle);
}
#v2-side-plus-holder .side-plus-btn.side-plus-btn--multi {
  color: var(--text-secondary);
  background: var(--white-08);
  border-color: var(--white-20);
}
#v2-side-plus-holder .side-plus-btn::after,
#v2-side-plus-holder .side-plus-btn::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: currentColor;
  border-radius: 999px;
  pointer-events: none;
}
#v2-side-plus-holder .side-plus-btn::before {
  width: 0.54em;
  height: 0.065em;
}
#v2-side-plus-holder .side-plus-btn::after {
  width: 0.065em;
  height: 0.54em;
}
#v2-side-plus-holder .side-plus-btn.active,
#v2-side-plus-holder .side-plus-btn:hover {
  color: var(--text-secondary);
}
#v2-side-plus-holder .side-plus-btn.side-plus-btn--multi.active,
#v2-side-plus-holder .side-plus-btn.side-plus-btn--multi:hover {
  color: var(--text-primary);
  background: var(--white-15);
  border-color: var(--white-35);
}
.v2-pick-connect-banner {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  animation: pick-banner-float 2.5s ease-in-out infinite;
  background: var(--bg-banner);
  border: 1px solid var(--white-15);
  border-radius: 30px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 2000;
  box-shadow: 0 8px 32px var(--black-40);
  pointer-events: none;
  user-select: none;
  animation: v2InDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.v2-pick-connect-banner .pc-text {
  color: var(--white-90);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}
.v2-pick-connect-banner .pc-divider {
  color: var(--white-20);
  font-size: 14px;
}
.v2-pick-connect-banner .pc-esc {
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.is-pick-connecting {
  opacity: 0.3;
  filter: invert(1) hue-rotate(180deg) opacity(0.5);
  mix-blend-mode: screen;
  border: 1px dashed var(--white-50);
  border-radius: inherit;
  transition: all 0.2s;
  transform: scale(0.85);
}
@keyframes v2InDown {
  0% {
    transform: translate(-50%, -20px);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}
@keyframes pick-banner-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-6px);
  }
}
.v2-node.conn-src .prompt-attachment-btn,
.v2-node.conn-src .prompt-attachment-btn:hover {
  background: 0 0;
  background-color: transparent;
  border-color: var(--white-60);
  animation: conn-btn-breathe 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px var(--white-30);
}
@keyframes conn-btn-breathe {
  0%,
  100% {
    border-color: var(--white-30);
    box-shadow: 0 0 6px var(--white-20);
  }
  50% {
    border-color: var(--white);
    box-shadow: 0 0 18px var(--white-60);
  }
}
.sb-cell.drag-hover .cell-overlay {
  border: none;
  box-shadow:
    0 0 0 2px var(--white-80),
    0 0 30px 0 var(--white-40);
  background: var(--white-06);
  border-radius: inherit;
  z-index: 10;
}
.ftb-btn.act-edit.active {
  background: var(--red-20);
  border: 1px solid var(--error-border);
  color: var(--error-text-light);
  box-shadow: 0 0 12px var(--red-30);
}
.v2-node.conn-invalid {
  opacity: 0.28;
  filter: grayscale(0.65);
  pointer-events: none;
  transition:
    opacity 0.15s,
    filter 0.15s;
}
#v2-wrap,
#v2-wrap * {
  cursor: var(--pointer-cursor);
}
#v2-wrap .ai-send,
#v2-wrap .ai-start-btn,
#v2-wrap .ai-tip-got,
#v2-wrap .avatar-menu-item,
#v2-wrap .btn,
#v2-wrap .btn-icon,
#v2-wrap .cc-btn,
#v2-wrap .clickable,
#v2-wrap .connection-group,
#v2-wrap .cursor-size-btn,
#v2-wrap .fab-btn,
#v2-wrap .logo,
#v2-wrap .nam-item,
#v2-wrap .nam-upload,
#v2-wrap .pill-btn,
#v2-wrap .project-name,
#v2-wrap .settings-close,
#v2-wrap .settings-nav-item,
#v2-wrap .settings-save-btn,
#v2-wrap .sidebar-btn,
#v2-wrap .sidebar-btn-v3,
#v2-wrap .user-avatar,
#v2-wrap .user-avatar-v3,
#v2-wrap .v2-edge-delete,
#v2-wrap .zoom-btn,
#v2-wrap [role='button'],
#v2-wrap a,
#v2-wrap button,
#v2-wrap input[type='button'],
#v2-wrap input[type='reset'],
#v2-wrap input[type='submit'],
#v2-wrap label,
#v2-wrap option,
#v2-wrap select,
#v2-wrap summary {
  cursor: var(--link-cursor);
}
#v2-wrap .ai-textarea,
#v2-wrap .prompt-textarea,
#v2-wrap .settings-input,
#v2-wrap .text-card-content,
#v2-wrap [contenteditable='true'],
#v2-wrap input[type='email'],
#v2-wrap input[type='number'],
#v2-wrap input[type='password'],
#v2-wrap input[type='search'],
#v2-wrap input[type='tel'],
#v2-wrap input[type='text'],
#v2-wrap input[type='url'],
#v2-wrap textarea {
  cursor: var(--text-cursor);
}
#v2-wrap .v2-node {
  cursor: var(--grab-cursor);
}
#v2-wrap .v2-media-preview {
  cursor: var(--pointer-cursor);
}
#v2-wrap [aria-disabled='true'],
#v2-wrap button:disabled {
  cursor: not-allowed;
}
#v2-wrap .v2-resize-move {
  cursor: nwse-resize;
}
#v2-wrap .node-resizer {
  cursor: nwse-resize;
}
#v2-wrap .group-resizer {
  cursor: nwse-resize;
}
html.is-cutting-mode #v2-wrap,
html.is-cutting-mode #v2-wrap * {
  cursor: var(--cut-cursor);
}
html.is-connecting-mode #v2-wrap,
html.is-connecting-mode #v2-wrap * {
  cursor: var(--connect-cursor);
}
:root {
  --panorama-scene-bg-day: #d5dbe3;
  --panorama-scene-bg-night: #2f3136;
  --panorama-scene-ground-day: #c6cbd3;
  --panorama-scene-ground-night: #3a3a3f;
  --panorama-scene-fog-day: #cfd6de;
  --panorama-scene-fog-night: #5b6068;
  --panorama-scene-grid-day: #9ba3ad;
  --panorama-scene-grid-night: #4a4d55;
  --panorama-scene-grid-day-major: #7f8894;
  --panorama-scene-grid-night-major: #6a6f7a;
}
.panorama-scene-component {
  height: 100%;
  overflow: visible;
  --panorama-bottom-toolbar-scale: var(--zoom-inv-raw, 1);
}
.panorama-scene-browser-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 6000;
  background: var(--bg);
  border-radius: var(--radius-18);
  box-shadow: 0 18px 48px var(--black-70);
  overflow: hidden;
}
.panorama-scene-browser-fullscreen > .panorama-scene-shell {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}
.panorama-scene-browser-fullscreen__exit {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-10);
  border: 1px solid var(--stroke-default);
  background: var(--bg-panel-card);
  color: var(--text-primary);
  font-size: var(--font-12);
}
.panorama-scene-browser-fullscreen__exit:hover {
  border-color: var(--blue-40);
  color: var(--text-primary);
}
.panorama-scene-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-18);
  overflow: visible;
}
.panorama-scene-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-18);
  overflow: hidden;
  background: linear-gradient(180deg, #575c64 0, #4b5058 24%, #3f4349 60%, #32353a 100%);
  border: 1px solid var(--stroke-default);
  box-shadow: inset 0 0 0 1px var(--white-05);
  outline: 0;
}
.panorama-scene-viewport[data-env-mode='day'] {
  background: linear-gradient(180deg, #e6ebf2 0, #d9dfe7 24%, #c7cdd6 60%, #b9bfc8 100%);
}
.panorama-scene-viewport::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 68%, rgba(255, 255, 255, 0.09), transparent 38%),
    linear-gradient(180deg, #686e77 0, #5a5f68 22%, #4a4f57 46%, #3a3e45 72%, #303238 100%);
  pointer-events: none;
  z-index: 0;
}
.panorama-scene-viewport[data-env-mode='day']::before {
  display: block;
  background:
    radial-gradient(circle at 50% 66%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(180deg, #f2f5fa 0, #e4e9f0 22%, #d5dbe4 46%, #c4cad3 72%, #b6bcc6 100%);
}
.panorama-scene-viewport[data-scene-type='panorama-360']::before {
  display: none;
}
.panorama-scene-component.is-panorama-360 .panorama-scene-viewport::before {
  display: none;
}
.panorama-scene-viewport[data-env-mode='day'] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}
.panorama-scene-viewport[data-scene-type='panorama-360'][data-env-mode='day'] {
  box-shadow: inset 0 0 0 1px var(--white-05);
}
.panorama-scene-viewport[data-env-mode='night'] {
  background: linear-gradient(180deg, #575c64 0, #4b5058 24%, #3f4349 60%, #32353a 100%);
}
.panorama-scene-viewport[data-env-mode='night']::before {
  display: block;
}
.panorama-scene-viewport[data-scene-type='panorama-360'][data-env-mode='day'],
.panorama-scene-viewport[data-scene-type='panorama-360'][data-env-mode='night'] {
  background: var(--surface-node);
}
.panorama-scene-component.is-panorama-360 .panorama-scene-viewport,
.panorama-scene-component.is-panorama-360 .panorama-scene-viewport[data-env-mode='day'],
.panorama-scene-component.is-panorama-360 .panorama-scene-viewport[data-env-mode='night'] {
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  box-shadow: inset 0 0 0 1px var(--white-05);
}
.panorama-scene-webgl {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.panorama-scene-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.panorama-scene-bottom-toolbar-popovers .panorama-camera-dock,
.panorama-scene-bottom-toolbar-popovers .panorama-capture-menu,
.panorama-scene-bottom-toolbar-popovers .panorama-grid-panel,
.panorama-scene-bottom-toolbar-popovers .panorama-mannequin-menu,
.panorama-scene-overlay .panorama-scene-error,
.panorama-scene-overlay .panorama-model-toolbar,
.panorama-scene-overlay .panorama-model-corner-handle.is-visible {
  pointer-events: auto;
}
.panorama-scene-bottom-toolbar-anchor {
  position: absolute;
  left: 50%;
  bottom: var(--space-14);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}
.panorama-scene-bottom-toolbar-popovers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.panorama-scene-shell > .panorama-scene-fixed-info-dock {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  left: var(--space-14);
  top: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  pointer-events: none;
  z-index: 2;
}
.panorama-scene-shell > .panorama-scene-fixed-info-dock .panorama-scene-fixed-hint,
.panorama-scene-shell > .panorama-scene-fixed-info-dock .panorama-scene-fixed-status {
  all: unset;
  box-sizing: border-box;
  display: block;
  position: relative;
  padding: var(--space-6) var(--space-10);
  border-radius: var(--radius-12);
  border: 0;
  background: 0 0;
  color: var(--white);
  font-size: var(--font-12);
  line-height: 1.4;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: none;
  transform: none;
}
.panorama-scene-shell > .panorama-scene-fixed-info-dock .panorama-scene-fixed-hint {
  color: var(--white);
  max-width: 280px;
}
.panorama-scene-shell > .panorama-scene-fixed-info-dock .panorama-scene-fixed-hint__content,
.panorama-scene-shell > .panorama-scene-fixed-info-dock .panorama-scene-fixed-status__content {
  all: unset;
  display: block;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}
.panorama-scene-error {
  top: var(--space-14);
  right: var(--space-14);
  left: auto;
  color: var(--error-text-light);
  background: var(--error-bg-solid);
  border-color: var(--error-border-dark);
  display: none;
}
.panorama-scene-error.is-visible {
  display: block;
}
.panorama-scene-selection-box {
  position: absolute;
  border: 1px solid var(--blue-50);
  background: var(--blue-10);
  border-radius: var(--radius-8);
  pointer-events: none;
  z-index: 1;
  display: none;
}
.panorama-scene-selection-box.is-visible {
  display: block;
}
.panorama-scene-capture-safe-frame {
  position: absolute;
  display: none;
  border: 1px solid var(--white-80);
  border-radius: var(--radius-10);
  box-shadow:
    0 0 0 1px var(--black-30),
    0 0 0 9999px var(--black-10);
  pointer-events: none;
  z-index: 1;
}
.panorama-scene-capture-safe-frame.is-visible {
  display: block;
}
.panorama-scene-capture-safe-frame.is-adaptive {
  border-style: dashed;
  box-shadow: 0 0 0 1px var(--black-20);
}
.panorama-scene-capture-safe-frame__label {
  position: absolute;
  left: 50%;
  top: calc(-1 * var(--space-22));
  transform: translateX(-50%);
  padding: 0 var(--space-8);
  height: 18px;
  border-radius: var(--radius-999);
  border: 1px solid var(--stroke-default);
  background: var(--bg-panel-card);
  color: var(--text-primary);
  font-size: var(--font-11);
  line-height: 16px;
  white-space: nowrap;
}
.v2-node:not(.selected):not(:hover) .panorama-scene-bottom-toolbar-popovers .panorama-camera-dock,
.v2-node:not(.selected):not(:hover) .panorama-scene-bottom-toolbar-popovers .panorama-capture-menu,
.v2-node:not(.selected):not(:hover) .panorama-scene-bottom-toolbar-popovers .panorama-grid-panel,
.v2-node:not(.selected):not(:hover)
  .panorama-scene-bottom-toolbar-popovers
  .panorama-mannequin-menu {
  opacity: 0;
  pointer-events: none;
}
.panorama-scene-component.is-collapsed .panorama-camera-dock,
.panorama-scene-component.is-collapsed .panorama-capture-menu,
.panorama-scene-component.is-collapsed .panorama-grid-panel,
.panorama-scene-component.is-collapsed .panorama-mannequin-menu,
.panorama-scene-component.is-collapsed .panorama-scene-fixed-toolbar,
.panorama-scene-component.is-collapsed .v2-panorama-mode-toolbar {
  opacity: 0;
  pointer-events: none;
}
.panorama-scene-component.is-editing .panorama-scene-viewport,
.v2-node.selected .panorama-scene-viewport {
  border-color: var(--blue-40);
  box-shadow:
    inset 0 0 0 1px var(--blue-20),
    0 0 0 1px var(--blue-12);
}
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar {
  --panorama-toolbar-collapse-duration: 0.32s;
  --panorama-toolbar-collapse-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  transition:
    opacity 0.18s ease,
    gap var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease);
  transform: translateX(-50%) translateY(0) scale(var(--zoom-inv-raw, 1));
}
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar .ftb-btn,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar .ftb-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  transform-origin: center;
  transition:
    opacity var(--panorama-toolbar-collapse-duration) ease,
    transform var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease),
    width var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease),
    min-width var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease),
    margin var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease),
    padding var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease);
}
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar
  .panorama-scene-toolbar-btn--collapse,
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-scene-toolbar
  .panorama-scene-toolbar-btn--collapse {
  margin-left: var(--space-2);
}
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar
  .panorama-scene-toolbar-btn--collapse
  svg,
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-scene-toolbar
  .panorama-scene-toolbar-btn--collapse
  svg {
  transition: transform 0.26s var(--panorama-toolbar-collapse-ease);
}
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar
  .panorama-scene-toolbar-btn--collapse.is-collapsed
  svg,
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-scene-toolbar
  .panorama-scene-toolbar-btn--collapse.is-collapsed
  svg {
  transform: rotate(180deg);
}
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar .ftb-divider,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar .ftb-divider {
  transition:
    opacity var(--panorama-toolbar-collapse-duration) ease,
    transform var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease),
    width var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease),
    min-width var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease),
    margin var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease),
    padding var(--panorama-toolbar-collapse-duration) var(--panorama-toolbar-collapse-ease);
}
.panorama-scene-shell > .node-floating-toolbar.v2-panorama-scene-corner-toolbar {
  top: var(--space-14);
  left: var(--space-14);
  right: auto;
  bottom: auto;
  transform: translateY(0);
  transform-origin: top left;
  opacity: 1;
  pointer-events: auto;
  border-radius: var(--radius-12);
  padding: var(--space-4);
  gap: var(--space-2);
}
.panorama-scene-shell > .node-floating-toolbar.v2-panorama-scene-corner-toolbar .ftb-btn {
  width: 40px;
  height: 40px;
}
.panorama-scene-bottom-toolbar-anchor .node-floating-toolbar.panorama-scene-fixed-toolbar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: translateY(0);
  transition: opacity 0.18s ease;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
}
.panorama-scene-bottom-toolbar-anchor
  .panorama-scene-fixed-toolbar
  .panorama-scene-fixed-toolbar__btn {
  width: 80px;
  min-width: 80px;
  height: 80px;
  padding: 0;
}
.panorama-scene-bottom-toolbar-anchor .panorama-scene-fixed-toolbar .ftb-btn svg {
  width: 32px;
  height: 32px;
}
.panorama-scene-bottom-toolbar-anchor .panorama-scene-fixed-toolbar .ftb-btn,
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar .ftb-btn,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar .ftb-btn,
.panorama-scene-shell > .node-floating-toolbar.v2-panorama-scene-corner-toolbar .ftb-btn {
  background: var(--bg-panel-card);
}
.panorama-scene-bottom-toolbar-anchor .panorama-scene-fixed-toolbar .ftb-btn,
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar .ftb-btn,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar .ftb-btn,
.panorama-scene-shell > .node-floating-toolbar.v2-panorama-scene-corner-toolbar .ftb-btn {
  background: 0 0;
  border: none;
  box-shadow: none;
}
.panorama-scene-bottom-toolbar-anchor .panorama-scene-fixed-toolbar .ftb-btn:hover,
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar .ftb-btn:hover,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar .ftb-btn:hover,
.panorama-scene-shell > .node-floating-toolbar.v2-panorama-scene-corner-toolbar .ftb-btn:hover {
  background: 0 0;
  border: none;
  box-shadow: none;
  color: var(--white);
  opacity: 1;
}
.panorama-scene-bottom-toolbar-anchor .panorama-scene-fixed-toolbar .ftb-btn.active,
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar .ftb-btn.active,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar .ftb-btn.active,
.panorama-scene-shell > .node-floating-toolbar.v2-panorama-scene-corner-toolbar .ftb-btn.active {
  background: 0 0;
  border: none;
  box-shadow: none;
  color: var(--white);
  opacity: 1;
}
body.is-viewport-animating
  #v2-canvas
  .panorama-scene-bottom-toolbar-anchor
  .node-floating-toolbar.panorama-scene-fixed-toolbar,
body.is-viewport-animating
  #v2-canvas
  .panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar,
body.is-viewport-animating
  #v2-canvas
  .panorama-scene-component
  .node-floating-toolbar.v2-panorama-scene-toolbar,
body.is-viewport-animating
  #v2-canvas
  .panorama-scene-shell
  > .node-floating-toolbar.v2-panorama-scene-corner-toolbar,
body.is-zooming
  #v2-canvas
  .panorama-scene-bottom-toolbar-anchor
  .node-floating-toolbar.panorama-scene-fixed-toolbar,
body.is-zooming
  #v2-canvas
  .panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar,
body.is-zooming
  #v2-canvas
  .panorama-scene-component
  .node-floating-toolbar.v2-panorama-scene-toolbar,
body.is-zooming
  #v2-canvas
  .panorama-scene-shell
  > .node-floating-toolbar.v2-panorama-scene-corner-toolbar {
  transition: none;
}
.node-floating-toolbar.v2-panorama-mode-toolbar.is-hidden,
.node-floating-toolbar.v2-panorama-scene-corner-toolbar.is-hidden,
.node-floating-toolbar.v2-panorama-scene-toolbar.is-hidden,
.panorama-scene-fixed-toolbar.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.panorama-scene-component .v2-panorama-mode-toolbar .act-navigate.is-box-select {
  background: 0 0;
  border-color: transparent;
  color: var(--white);
  box-shadow: none;
  opacity: 1;
}
.panorama-scene-bottom-toolbar-anchor .panorama-scene-fixed-toolbar .ftb-btn:disabled {
  opacity: 0.32;
  pointer-events: none;
}
.panorama-scene-bottom-toolbar-anchor
  .panorama-scene-fixed-toolbar
  .ftb-btn.act-camera.is-limit-reached {
  opacity: 0.32;
}
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar .ftb-divider,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar .ftb-divider {
  width: auto;
  min-width: 10px;
  height: auto;
  margin: 0 var(--space-2);
  background: 0 0;
  color: var(--white-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}
.panorama-scene-component .node-floating-toolbar.v2-panorama-mode-toolbar .ftb-divider::before,
.panorama-scene-component .node-floating-toolbar.v2-panorama-scene-toolbar .ftb-divider::before {
  content: '|';
  font-size: var(--font-12);
  font-weight: 500;
}
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar
  .panorama-scene-close-btn {
  color: var(--text-danger);
}
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar
  .panorama-scene-close-btn.active,
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar
  .panorama-scene-close-btn:focus-visible,
.panorama-scene-component
  .node-floating-toolbar.v2-panorama-mode-toolbar
  .panorama-scene-close-btn:hover {
  color: var(--text-danger);
  background: var(--fill-danger-soft);
  border-color: var(--stroke-danger);
}
.panorama-camera-dock,
.panorama-capture-menu,
.panorama-grid-panel,
.panorama-mannequin-menu,
.panorama-scene-focus-menu {
  position: absolute;
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-16);
  background: var(--bg-panel-card);
  box-shadow: var(--shadow-popover);
  backdrop-filter: blur(var(--overlay-blur));
  -webkit-backdrop-filter: blur(var(--overlay-blur));
  transform: translate(-50%, calc(-100% - 9px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  transform-origin: center bottom;
}
.panorama-camera-dock.is-visible,
.panorama-capture-menu.is-visible,
.panorama-grid-panel.is-visible,
.panorama-mannequin-menu.is-visible,
.panorama-scene-focus-menu.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.panorama-capture-menu {
  width: 224px;
  padding: var(--space-10);
  box-sizing: border-box;
}
.panorama-capture-menu__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-8);
}
.panorama-capture-menu__item {
  appearance: none;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-12);
  background: 0 0;
  color: currentColor;
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  opacity: 0.78;
  transition:
    opacity 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    filter 0.16s ease;
}
.panorama-capture-menu__item:hover {
  opacity: 1;
  border-color: var(--stroke-default);
  background: var(--white-06);
  filter: drop-shadow(0 0 8px var(--blue-20));
}
.panorama-capture-menu__item.is-active {
  opacity: 1;
  border-color: var(--blue-30);
  background: var(--blue-10);
}
.panorama-capture-menu__item:focus,
.panorama-capture-menu__item:focus-visible {
  outline: 1px solid var(--blue-40);
  outline-offset: 1px;
}
.panorama-capture-menu__icon {
  --capture-icon-width: 22px;
  --capture-icon-height: 16px;
  width: 28px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.panorama-capture-menu__icon.is-adaptive {
  --capture-icon-width: 24px;
  --capture-icon-height: 16px;
}
.panorama-capture-menu__icon.is-9-16 {
  --capture-icon-width: 11px;
  --capture-icon-height: 18px;
}
.panorama-capture-menu__icon.is-2-35-1 {
  --capture-icon-width: 24px;
  --capture-icon-height: 10px;
}
.panorama-capture-menu__icon-shape {
  width: var(--capture-icon-width);
  height: var(--capture-icon-height);
  border: 1px solid currentColor;
  border-radius: var(--radius-4);
  box-sizing: border-box;
}
.panorama-capture-menu__icon.is-adaptive .panorama-capture-menu__icon-shape {
  border-style: dashed;
}
.panorama-capture-menu__label {
  font-size: var(--font-11);
  line-height: 1;
  white-space: nowrap;
}
.panorama-camera-dock {
  --panorama-camera-dock-width: 248px;
  --panorama-camera-dock-height: 46px;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6);
  border-radius: var(--radius-14);
  width: max-content;
  height: var(--panorama-camera-dock-height);
  box-sizing: border-box;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.panorama-camera-dock__item {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-999);
  border: none;
  background: 0 0;
  color: currentColor;
  font-size: var(--font-13);
  font-weight: 600;
  cursor: pointer;
  opacity: 0.72;
  transition:
    color 0.16s ease,
    opacity 0.16s ease,
    filter 0.16s ease;
}
.panorama-camera-dock__item:hover {
  opacity: 1;
  color: currentColor;
  filter: drop-shadow(0 0 8px var(--blue-20));
}
.panorama-camera-dock__item.is-active {
  border-color: transparent;
  background: 0 0;
  box-shadow: none;
  opacity: 1;
  color: currentColor;
  filter: drop-shadow(0 0 10px var(--blue-20));
}
.panorama-camera-dock__activate {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: inherit;
  background: 0 0;
  padding: 0;
  position: relative;
  cursor: pointer;
  color: currentColor;
}
.panorama-camera-dock__activate:focus-visible {
  outline: 1px solid var(--blue-40);
  outline-offset: 1px;
}
.panorama-camera-dock__delete {
  position: absolute;
  top: 0;
  right: 0;
  width: 14px;
  height: 14px;
  border: none;
  border-radius: var(--radius-999);
  background: 0 0;
  padding: 0;
  line-height: 12px;
  cursor: pointer;
  font-size: 11px;
  transform: translate(20%, -20%);
  color: currentColor;
  opacity: 0.78;
  transition:
    color 0.16s ease,
    opacity 0.16s ease,
    filter 0.16s ease;
}
.panorama-camera-dock__delete:hover {
  color: currentColor;
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--blue-20));
}
.panorama-scene-focus-menu {
  width: 148px;
  padding: var(--space-8);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  z-index: 2;
}
.panorama-scene-focus-menu.is-visible {
  display: flex;
}
.panorama-scene-focus-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  font-size: var(--font-11);
  font-weight: 600;
  line-height: 1;
}
.panorama-scene-focus-menu__value {
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}
.panorama-scene-focus-menu__slider {
  width: 100%;
  margin: 0;
}
.panorama-grid-panel {
  width: 332px;
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  box-sizing: border-box;
}
.panorama-grid-panel__title,
.panorama-mannequin-menu__title {
  color: currentColor;
  font-size: var(--font-12);
  font-weight: 600;
  margin-bottom: var(--space-6);
}
.panorama-grid-panel__metrics-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}
.panorama-grid-panel__metric-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}
.panorama-grid-panel__metric-label {
  flex: 0 0 auto;
  color: currentColor;
  font-size: var(--font-12);
  white-space: nowrap;
}
.panorama-grid-panel__metric-control {
  flex: 1 1 auto;
  min-width: 0;
}
.panorama-grid-panel .panorama-grid-panel__metric-stepper.rh-stepper-value {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 28px;
  border-radius: var(--radius-10);
  border: 1px solid var(--stroke-15);
  background: 0 0;
  color: currentColor;
  padding: 0 var(--space-6);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 12px;
  outline: 0;
  transition:
    border-color 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease;
  cursor: ew-resize;
  box-sizing: border-box;
  justify-content: center;
}
.panorama-grid-panel .panorama-grid-panel__metric-stepper.rh-stepper-value:hover {
  border-color: var(--stroke-default);
  color: currentColor;
}
.panorama-grid-panel .panorama-grid-panel__metric-stepper.rh-stepper-value.is-dragging {
  border-color: var(--stroke-default);
  background: var(--white-06);
}
.panorama-grid-panel .panorama-grid-panel__metric-stepper-input.rh-stepper-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 28px;
  border-radius: var(--radius-10);
  border: 1px solid var(--stroke-default);
  background: 0 0;
  color: currentColor;
  padding: 0 var(--space-6);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 12px;
  text-align: center;
  outline: 0;
  appearance: textfield;
  -moz-appearance: textfield;
  box-sizing: border-box;
}
.panorama-grid-panel
  .panorama-grid-panel__metric-stepper-input.rh-stepper-input::-webkit-inner-spin-button,
.panorama-grid-panel
  .panorama-grid-panel__metric-stepper-input.rh-stepper-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.panorama-grid-panel .panorama-grid-panel__metric-stepper-input.rh-stepper-input:focus,
.panorama-grid-panel .panorama-grid-panel__metric-stepper-input.rh-stepper-input:focus-visible {
  border-color: var(--blue-40);
  box-shadow: 0 0 0 1px var(--blue-20);
  color: currentColor;
}
.panorama-grid-panel__appearance-row {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  flex-wrap: nowrap;
  align-self: flex-start;
}
.panorama-grid-panel__appearance-group {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}
.panorama-grid-panel__appearance-group--gender {
  flex: 0 0 auto;
}
.panorama-grid-panel__appearance-group--color {
  flex: 0 0 auto;
}
.panorama-grid-panel__appearance-label {
  flex: 0 0 auto;
  color: currentColor;
  font-size: var(--font-12);
  white-space: nowrap;
}
.panorama-grid-panel__appearance-options {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.panorama-grid-panel__appearance-options--color {
  min-width: 0;
  overflow: hidden;
  flex-wrap: nowrap;
}
.panorama-grid-panel .panorama-mannequin-menu__color-btn,
.panorama-grid-panel .panorama-mannequin-menu__gender-btn {
  width: 24px;
  height: 24px;
}
.panorama-grid-panel .panorama-mannequin-menu__color-btn::before {
  inset: 3px;
}
.panorama-grid-panel__apply {
  width: 100%;
  margin-top: var(--space-2);
  height: 30px;
  border-radius: var(--radius-10);
  border: none;
  background: 0 0;
  color: currentColor;
  font-size: var(--font-12);
  opacity: 0.76;
  transition:
    color 0.16s ease,
    opacity 0.16s ease,
    filter 0.16s ease;
}
.panorama-grid-panel__apply:hover {
  color: currentColor;
  opacity: 1;
  filter: drop-shadow(0 0 8px var(--blue-20));
}
.panorama-grid-panel__apply:focus,
.panorama-grid-panel__apply:focus-visible {
  outline: 1px solid var(--blue-40);
  outline-offset: 1px;
}
.panorama-mannequin-menu {
  --panorama-mannequin-menu-width: 320px;
  --panorama-mannequin-menu-height: 66px;
  width: var(--panorama-mannequin-menu-width);
  min-width: var(--panorama-mannequin-menu-width);
  height: var(--panorama-mannequin-menu-height);
  padding: var(--space-10);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: var(--space-10);
  overflow: hidden;
}
.panorama-mannequin-menu__row {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.panorama-mannequin-menu__genders {
  flex: 0 0 auto;
}
.panorama-mannequin-menu__gender-btn {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-999);
  border: none;
  background: 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  opacity: 0.42;
  transition:
    opacity 0.16s ease,
    filter 0.16s ease;
}
.panorama-mannequin-menu__gender-btn.is-active {
  opacity: 1;
  filter: drop-shadow(0 0 8px var(--blue-20));
}
.panorama-mannequin-menu__gender-btn:not(.is-active):hover {
  opacity: 0.72;
  filter: drop-shadow(0 0 6px var(--blue-20));
}
.panorama-mannequin-menu__gender-btn:focus,
.panorama-mannequin-menu__gender-btn:focus-visible {
  outline: 1px solid var(--blue-40);
  outline-offset: 1px;
}
.panorama-mannequin-menu__color-btn.is-active {
  border-color: transparent;
  background: 0 0;
  color: currentColor;
  opacity: 1;
  filter: drop-shadow(0 0 8px var(--blue-20));
}
.panorama-mannequin-menu__colors {
  flex-wrap: nowrap;
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.panorama-mannequin-menu__title {
  margin-bottom: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}
.panorama-mannequin-menu__color-btn {
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-999);
  border: none;
  background: 0 0;
  position: relative;
  outline: 0;
  box-shadow: none;
  opacity: 0.52;
  transition:
    opacity 0.16s ease,
    filter 0.16s ease;
}
.panorama-mannequin-menu__color-btn:not(.is-active):hover {
  border-color: transparent;
  background: 0 0;
  opacity: 0.82;
  filter: drop-shadow(0 0 6px var(--blue-20));
}
.panorama-mannequin-menu__color-btn:focus,
.panorama-mannequin-menu__color-btn:focus-visible {
  outline: 1px solid var(--blue-40);
  outline-offset: 1px;
  box-shadow: none;
}
.panorama-mannequin-menu__color-btn::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: var(--panorama-scene-swatch-token, var(--blue));
}
.panorama-scene-object-menu {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 120px;
  padding: var(--space-4);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-10);
  background: var(--surface-float);
  box-shadow: var(--shadow-popover);
  backdrop-filter: blur(var(--overlay-blur));
  -webkit-backdrop-filter: blur(var(--overlay-blur));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
}
.panorama-scene-object-menu.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.panorama-scene-object-menu__item {
  width: 100%;
  height: 32px;
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-8);
  background: var(--bg-panel-card);
  color: var(--text-primary);
  font-size: var(--font-12);
  text-align: left;
  padding: 0 var(--space-8);
}
.panorama-scene-object-menu__item:hover {
  border-color: var(--blue-40);
  background: var(--bg-panel-card);
}
.storyboard-script-node {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--stroke-10);
  border-radius: var(--radius-12);
  background: var(--surface-node);
  color: var(--text-primary);
  pointer-events: auto;
}
.storyboard-script-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-14);
  border-bottom: 1px solid var(--stroke-08);
  background: var(--white-02);
}
.storyboard-script-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  font-size: var(--font-15);
  font-weight: 700;
  color: var(--text-primary);
}
.storyboard-script-title svg {
  flex: 0 0 auto;
  color: var(--text-secondary);
}
.storyboard-script-beta {
  flex: 0 0 auto;
  padding: 1px var(--space-6);
  border: 1px solid var(--red-35);
  border-radius: var(--radius-8);
  background: var(--red-10);
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}
.storyboard-script-view-switch {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--stroke-08);
  border-radius: var(--radius-8);
  background: var(--surface-node);
}
.storyboard-script-view-btn {
  height: 28px;
  padding: 0 var(--space-10);
  border: 0;
  border-radius: var(--radius-6);
  background: 0 0;
  color: var(--text-secondary);
  font: inherit;
  font-size: var(--font-12);
  font-weight: 700;
  cursor: pointer;
}
.storyboard-script-view-btn.is-active,
.storyboard-script-view-btn:hover {
  background: var(--fill-hover-strong);
  color: var(--text-primary);
}
.storyboard-script-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
}
.storyboard-script-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-24);
  text-align: center;
}
.storyboard-script-empty-title {
  color: var(--text-primary);
  font-size: var(--font-16);
  font-weight: 700;
}
.storyboard-script-empty-hint {
  max-width: 360px;
  color: var(--text-muted);
  font-size: var(--font-13);
  line-height: 1.7;
}
.storyboard-script-table-wrap {
  flex: 1;
  min-width: 0;
  overflow: auto;
}
.storyboard-script-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: var(--font-12);
}
.storyboard-script-table td,
.storyboard-script-table th {
  width: 148px;
  max-width: 148px;
  padding: var(--space-9) var(--space-10);
  border-right: 1px solid var(--stroke-08);
  border-bottom: 1px solid var(--stroke-08);
  vertical-align: top;
  text-align: left;
  line-height: 1.45;
}
.storyboard-script-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-node);
  color: var(--text-secondary);
  font-weight: 800;
  white-space: nowrap;
}
.storyboard-script-table td {
  color: var(--text-primary);
  word-break: break-word;
}
.storyboard-script-card-grid {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-content: start;
  gap: var(--space-10);
  padding: var(--space-12);
  overflow: auto;
}
.storyboard-script-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  min-width: 0;
  padding: var(--space-12);
  border: 1px solid var(--stroke-08);
  border-radius: var(--radius-8);
  background: var(--white-02);
}
.storyboard-script-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}
.storyboard-script-shot {
  min-width: 0;
  color: var(--text-primary);
  font-size: var(--font-14);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.storyboard-script-duration {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: var(--font-12);
}
.storyboard-script-card-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
}
.storyboard-script-card-label {
  color: var(--text-muted);
  font-size: var(--font-11);
  font-weight: 700;
}
.storyboard-script-card-value {
  color: var(--text-primary);
  font-size: var(--font-12);
  line-height: 1.55;
  word-break: break-word;
}

/* ═══ File Manager ═══ */
.v2-file-manager-panel {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  width: 340px;
  height: 520px;
  background: var(--surface-node);
  border: 1px solid var(--stroke-default);
  border-radius: var(--radius-18);
  box-shadow: var(--shadow-menu);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  overflow: hidden;
}
.v2-file-manager-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}
.v2-fm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--stroke-07);
}
.v2-fm-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.v2-fm-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.v2-fm-upload-btn,
.v2-fm-refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-7);
  border: 1px solid var(--stroke-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s;
}
.v2-fm-upload-btn:hover,
.v2-fm-refresh-btn:hover {
  background: var(--surface-hover);
}
.v2-fm-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 12px 6px;
  border-bottom: 1px solid var(--stroke-07);
}
.v2-fm-tab {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: var(--radius-7);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.v2-fm-tab:hover {
  background: var(--surface-hover);
}
.v2-fm-tab.active {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 500;
}
.v2-fm-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.v2-fm-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 13px;
}
.v2-fm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-7);
  transition: background 0.12s;
  cursor: default;
}
.v2-fm-item:hover {
  background: var(--surface-hover);
}
.v2-fm-item--deleting {
  background: var(--danger-bg, rgba(255, 60, 60, 0.08));
}
.v2-fm-thumb {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-hover);
}
.v2-fm-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-hover);
  color: var(--text-muted);
}
.v2-fm-info {
  flex: 1;
  min-width: 0;
}
.v2-fm-name {
  font-size: 12px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-fm-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.v2-fm-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.v2-fm-item:hover .v2-fm-item-actions {
  opacity: 1;
}
.v2-fm-item-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.12s;
}
.v2-fm-item-actions button:hover {
  background: var(--surface-hover);
}
.v2-fm-delete-confirm {
  font-size: 12px;
  color: var(--danger, #f44);
  margin-top: 4px;
}
.v2-fm-delete-confirm button {
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--stroke-default);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}
.v2-fm-delete-confirm button:first-of-type {
  background: var(--danger, #f44);
  color: #fff;
  border-color: transparent;
}

/* ── File Manager: Thumbnail wrap ── */
.v2-fm-thumb-wrap {
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}
.v2-fm-thumb-wrap:hover {
  opacity: 0.85;
}

/* ── File Manager: Preview Overlay ── */
.v2-fm-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.v2-fm-preview-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.v2-fm-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.v2-fm-preview-container {
  position: relative;
  z-index: 1;
  background: var(--bg-surface, #1e1e2e);
  border: 1px solid var(--stroke-default, #333);
  border-radius: 12px;
  width: 90vw;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.v2-fm-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--stroke-default, #333);
}
.v2-fm-preview-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary, #eee);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 12px;
}
.v2-fm-preview-close {
  background: none;
  border: none;
  color: var(--text-secondary, #999);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.v2-fm-preview-close:hover {
  color: var(--text-primary, #eee);
}
.v2-fm-preview-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  min-height: 200px;
}
.v2-fm-preview-img {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 6px;
}
.v2-fm-preview-video {
  max-width: 100%;
  max-height: 65vh;
  border-radius: 6px;
  outline: none;
}
.v2-fm-preview-audio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 16px;
  color: var(--text-secondary, #999);
}
.v2-fm-preview-audio-wrap svg {
  width: 48px;
  height: 48px;
}
.v2-fm-preview-audio {
  width: 100%;
  max-width: 480px;
  outline: none;
}
.v2-fm-preview-model {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
  color: var(--text-secondary, #999);
  text-align: center;
}
.v2-fm-preview-model svg {
  width: 48px;
  height: 48px;
}
.v2-fm-preview-model p {
  margin: 0;
  font-size: 13px;
}
.v2-fm-preview-download {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 16px;
  border-radius: 6px;
  background: var(--accent, #5b7fff);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
}
.v2-fm-preview-download:hover {
  opacity: 0.85;
}
.v2-fm-preview-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 16px;
  border-top: 1px solid var(--stroke-default, #333);
}
.v2-fm-preview-add-canvas {
  padding: 6px 18px;
  border-radius: 6px;
  border: none;
  background: var(--accent, #5b7fff);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.v2-fm-preview-add-canvas:hover {
  opacity: 0.85;
}

/* Local Workflow Settings */
.local-wf-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(91, 127, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}
.local-wf-hero-title {
  color: var(--text-strong, #fff);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.local-wf-hero-desc {
  margin-top: 6px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.62));
  font-size: 12px;
  line-height: 1.6;
}
.local-wf-hero-actions,
.local-wf-card-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.local-wf-primary-action,
.local-wf-secondary-action,
.local-wf-card-btn,
.local-wf-btn,
.local-wf-btn-sm {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-primary, #fff);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    opacity 0.16s ease;
}
.local-wf-primary-action,
.local-wf-secondary-action {
  padding: 9px 14px;
  font-size: 13px;
  white-space: nowrap;
}
.local-wf-primary-action {
  background: linear-gradient(135deg, #6d8cff, #8b5cf6);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: 0 10px 22px rgba(91, 127, 255, 0.28);
}
.local-wf-secondary-action,
.local-wf-card-btn,
.local-wf-btn,
.local-wf-btn-sm {
  background: rgba(255, 255, 255, 0.07);
}
.local-wf-primary-action:hover,
.local-wf-secondary-action:hover,
.local-wf-card-btn:hover,
.local-wf-btn:hover,
.local-wf-btn-sm:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.25);
}
.local-wf-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.local-wf-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.local-wf-filter-btn {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-secondary, rgba(255, 255, 255, 0.68));
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.16s ease;
}
.local-wf-filter-btn:hover,
.local-wf-filter-btn.active {
  background: rgba(91, 127, 255, 0.22);
  color: var(--text-strong, #fff);
  border-color: rgba(91, 127, 255, 0.5);
}
.local-wf-search {
  width: min(280px, 100%);
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text-primary, #fff);
  outline: none;
  font-size: 12px;
}
.local-wf-search:focus {
  border-color: rgba(91, 127, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(91, 127, 255, 0.14);
}
.local-wf-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}
.local-wf-stat-card {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}
.local-wf-stat-card span {
  display: block;
  color: var(--text-strong, #fff);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.local-wf-stat-card small {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.58));
  font-size: 11px;
}
.local-wf-stat-card--active {
  border-color: rgba(91, 127, 255, 0.45);
  background: rgba(91, 127, 255, 0.16);
}
.local-wf-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.local-wf-empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.62));
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}
.local-wf-empty-title {
  color: var(--text-strong, #fff);
  font-size: 15px;
  font-weight: 700;
}
.local-wf-empty-desc {
  margin-top: 8px;
  font-size: 12px;
}
.local-wf-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.local-wf-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #6d8cff, #8b5cf6);
  opacity: 0.8;
}
.local-wf-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.local-wf-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.local-wf-card-title {
  color: var(--text-strong, #fff);
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.local-wf-origin,
.local-wf-badge,
.local-wf-node-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  line-height: 1;
}
.local-wf-origin {
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 700;
}
.local-wf-origin--builtin {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
}
.local-wf-origin--custom {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.16);
}
.local-wf-card-btn {
  padding: 6px 11px;
  font-size: 12px;
}
.local-wf-card-btn-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(248, 113, 113, 0.12);
}
.local-wf-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.local-wf-badge {
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 700;
}
.local-wf-badge-image {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}
.local-wf-badge-video {
  background: rgba(168, 85, 247, 0.2);
  color: #e9d5ff;
}
.local-wf-badge-other {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}
.local-wf-meta-item {
  color: var(--text-secondary, rgba(255, 255, 255, 0.62));
  font-size: 12px;
}
.local-wf-node-preview {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.local-wf-node-chip {
  max-width: 160px;
  padding: 6px 9px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.local-wf-node-chip--more {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
}
.local-wf-node-chip--empty {
  color: rgba(255, 255, 255, 0.48);
}

/* API List Settings - aligned with Local Workflow visual system */
#pane-api-list .settings-pane-body.api-list-console {
  padding: 0 var(--space-4, 4px) var(--space-20, 20px);
  overflow: auto;
}
.api-list-console .api-console-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 10%, rgba(91, 127, 255, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}
.api-console-eyebrow {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: rgba(91, 127, 255, 0.16);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.api-console-title {
  color: var(--text-strong, #fff);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.api-console-subtitle {
  max-width: 760px;
  margin-top: 6px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.62));
  font-size: 12px;
  line-height: 1.6;
}
.api-console-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.api-list-primary-action,
.api-list-secondary-action,
.api-list-action {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-primary, #fff);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    opacity 0.16s ease;
}
.api-list-primary-action,
.api-list-secondary-action {
  padding: 9px 14px;
  font-size: 13px;
  white-space: nowrap;
}
.api-list-primary-action {
  background: linear-gradient(135deg, #6d8cff, #8b5cf6);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: 0 10px 22px rgba(91, 127, 255, 0.28);
}
.api-list-secondary-action,
.api-list-action {
  background: rgba(255, 255, 255, 0.07);
}
.api-list-primary-action:hover,
.api-list-secondary-action:hover,
.api-list-action:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.25);
}
.api-list-action {
  padding: 6px 11px;
  font-size: 12px;
}
.api-list-action.danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(248, 113, 113, 0.12);
}
.api-console-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}
.api-console-metric {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}
.api-console-metric span {
  display: block;
  color: var(--text-strong, #fff);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.api-console-metric strong {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.58));
  font-size: 11px;
}
.api-console-metric small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}
.api-console-metric.is-good {
  border-color: rgba(91, 127, 255, 0.45);
  background: rgba(91, 127, 255, 0.16);
}
.api-console-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.api-console-sidebar,
.api-console-main {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
.api-console-sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.api-console-sidebar-head span {
  color: var(--text-strong, #fff);
  font-size: 14px;
  font-weight: 700;
}
.api-console-sidebar-head small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}
.api-list-console .api-provider-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}
.api-provider-row {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary, #fff);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}
.api-provider-row:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 127, 255, 0.45);
  background: rgba(91, 127, 255, 0.12);
}
.api-provider-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}
.api-provider-dot.is-ready {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}
.api-provider-copy {
  min-width: 0;
}
.api-provider-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong, #fff);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-provider-copy small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.58));
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-provider-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  line-height: 1;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.api-provider-status.is-ready {
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.26);
  background: rgba(34, 197, 94, 0.16);
}
.api-provider-status.is-empty {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.14);
}
.api-console-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.api-list-console .api-kind-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.api-filter-btn {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-secondary, rgba(255, 255, 255, 0.68));
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.16s ease;
}
.api-filter-btn span {
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.46);
}
.api-filter-btn:hover,
.api-filter-btn.active {
  background: rgba(91, 127, 255, 0.22);
  color: var(--text-strong, #fff);
  border-color: rgba(91, 127, 255, 0.5);
}
.api-catalog-search {
  width: min(300px, 100%);
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text-primary, #fff);
  outline: none;
  font-size: 12px;
}
.api-catalog-search:focus {
  border-color: rgba(91, 127, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(91, 127, 255, 0.14);
}
.api-console-table-wrap {
  padding: 12px;
  overflow: auto;
}
.api-list-console .api-entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.api-table {
  min-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.api-table-head {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) 120px 82px minmax(190px, 1fr) 88px 72px 116px;
  gap: 10px;
  padding: 0 14px 2px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 800;
}
.api-table-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) 120px 82px minmax(190px, 1fr) 88px 72px 116px;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}
.api-table-row::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #6d8cff, #8b5cf6);
  opacity: 0.8;
}
.api-table-row:hover {
  transform: translateY(-1px);
  border-color: rgba(91, 127, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04));
}
.api-table-cell {
  min-width: 0;
  color: var(--text-secondary, rgba(255, 255, 255, 0.62));
  font-size: 12px;
}
.api-table-name strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong, #fff);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-table-name small {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-table-provider,
.api-table-source,
.api-table-model-id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-table-model-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(255, 255, 255, 0.58);
}
.source-node-table {
  min-width: 980px;
}
.source-node-table-head,
.source-node-table-row {
  grid-template-columns: minmax(210px, 1.25fr) 130px 128px minmax(220px, 1fr) 88px 116px;
}
.api-table-data-info {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.api-table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.api-kind-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  line-height: 1;
  padding: 5px 8px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.18);
  font-size: 11px;
  font-weight: 700;
}
.api-list-empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.62));
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}
.api-list-empty div {
  color: var(--text-strong, #fff);
  font-size: 15px;
  font-weight: 700;
}
.api-list-empty small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}
@media (max-width: 1180px) {
  .api-console-layout {
    grid-template-columns: 1fr;
  }
  .api-list-console .api-provider-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .api-list-console .api-console-head,
  .api-console-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .api-console-actions {
    justify-content: flex-end;
  }
  .api-console-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .api-list-console .api-provider-list {
    grid-template-columns: 1fr;
  }
  .api-catalog-search {
    width: 100%;
  }
}

/* Local Workflow Modal */
.local-wf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.local-wf-modal-content {
  width: min(820px, calc(100vw - 34px));
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(22, 24, 34, 0.98);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
}
.local-wf-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.local-wf-modal-header h3 {
  margin: 0;
  color: var(--text-strong, #fff);
  font-size: 17px;
}
.local-wf-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.local-wf-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}
.local-wf-form-group {
  margin-bottom: 16px;
}
.local-wf-form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-strong, #fff);
  font-size: 13px;
  font-weight: 700;
}
.local-wf-input,
.local-wf-select,
.local-wf-node-row input,
.local-wf-node-row select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary, #fff);
  outline: none;
}
.local-wf-input,
.local-wf-select {
  padding: 10px 12px;
  font-size: 13px;
}
.local-wf-input:focus,
.local-wf-select:focus,
.local-wf-node-row input:focus,
.local-wf-node-row select:focus {
  border-color: rgba(91, 127, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(91, 127, 255, 0.12);
}
.local-wf-nodes-header {
  margin-bottom: 10px;
}
.local-wf-btn-sm {
  padding: 7px 12px;
  font-size: 12px;
}
.local-wf-nodes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.local-wf-node-row {
  display: grid;
  grid-template-columns: 86px 110px minmax(140px, 1fr) minmax(100px, 0.65fr) 34px;
  gap: 8px;
  align-items: center;
}
.local-wf-node-row input,
.local-wf-node-row select {
  padding: 8px 9px;
  font-size: 12px;
}
.local-wf-node-remove {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}
.local-wf-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.local-wf-btn {
  padding: 9px 17px;
  font-size: 13px;
}
.local-wf-btn-primary {
  background: linear-gradient(135deg, #6d8cff, #8b5cf6);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 760px) {
  .local-wf-hero,
  .local-wf-toolbar,
  .local-wf-card-header {
    flex-direction: column;
    align-items: stretch;
  }
  .local-wf-search {
    width: 100%;
  }
  .local-wf-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .local-wf-node-row {
    grid-template-columns: 1fr;
  }
  .local-wf-node-remove {
    width: 100%;
  }
}

/* Hide specific provider menu items */
.grsai-group-header,
.grsai-submenu,
.aicanvas-group-header,
.aicanvas-submenu,
.apimart-group-header,
.apimart-submenu,
.ppio-group-header,
.ppio-submenu,
.dreamina-group-header,
.dreamina-submenu {
  display: none !important;
}

/* Hide Dreamina video menu item in video node */
.floating-menu-item[data-value="dreamina/text2video"],
.floating-menu-item[data-provider="dreamina"] {
  display: none !important;
}
