        @font-face {
            font-family: 'MaruBuri';
            src: url(https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-Regular.woff2);
            font-weight: 400;
            font-display: swap;
        }

        @font-face {
            font-family: 'Ridibatang';
            src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_twelve@1.0/RIDIBatang.woff') format('woff');
            font-weight: normal;
            font-display: swap;
        }

        @font-face {
            font-family: 'Galmuri14';
            src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2506-1@1.0/Galmuri14.woff2') format('woff2');
            font-weight: normal;
            font-display: swap;
        }

        @font-face {
            font-family: 'Pretendard';
            src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff') format('woff');
            font-weight: 400;
            font-display: swap;
        }

        @font-face {
            font-family: 'RoundedFixedsys';
            src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/DungGeunMo.woff') format('woff');
            font-weight: normal;
            font-display: swap;
        }

        @font-face {
            font-family: 'Joseon100Years';
            src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2206-02@1.0/ChosunCentennial.woff2') format('woff2');
            font-weight: normal;
            font-display: swap;
        }

        body.font-maruburi,
        body.font-maruburi * {
            font-family: 'MaruBuri', serif !important;
        }

        body.font-Ridibatang,
        body.font-Ridibatang * {
            font-family: 'Ridibatang', sans-serif !important;
        }

        body.font-Galmuri14,
        body.font-Galmuri14 * {
            font-family: 'Galmuri14', serif !important;
        }

        body.font-dunggeunmo,
        body.font-dunggeunmo * {
            font-family: 'RoundedFixedsys', serif !important;
        }

        body.font-joseon100,
        body.font-joseon100 * {
            font-family: 'Joseon100Years', serif !important;
        }

        body.font-pretendard,
        body.font-pretendard * {
            font-family: 'Pretendard', sans-serif !important;
        }

        html,
        body {
            height: 100%;
            margin: 0;
            padding: 0;
        }

        body {
            background: #f1f5f9;
            user-select: none;
            transition: background-color 0.3s, color 0.3s;
        }

        #root {
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .dark body {
            background: #09090b;
            color: #e4e4e7;
        }

        button:not([class*="rounded-full"]),
        input:not([class*="rounded-full"]),
        select:not([class*="rounded-full"]),
        textarea:not([class*="rounded-full"]),
        div[class*="bg-"]:not([class*="rounded-full"]):not([class*="rounded-none"]),
        div[class*="border"]:not([class*="rounded-full"]):not([class*="rounded-none"]),
        aside:not([class*="rounded-full"]),
        main:not([class*="rounded-full"]),
        section:not([class*="rounded-full"]),
        article:not([class*="rounded-full"]),
        footer:not([class*="rounded-full"]) {
            border-radius: 3px;
        }

        .grid-background {
            background-color: #f8fafc;
            background-image: linear-gradient(#e2e8f0 1px, transparent 1px), linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
            background-size: 20px 20px;
        }

        .dark .grid-background {
            background-color: #09080B;
            background-image: linear-gradient(#141416 1px, transparent 1px), linear-gradient(90deg, #141416 1px, transparent 1px);
        }

        .dot-background {
            background-color: #f8fafc;
            background-image: radial-gradient(#161616 1px, transparent 0) !important;
            background-size: 20px 20px !important;
            background-position: 0 0;
        }

        .dark .dot-background {
            background-color: #09080B;
            background-image: radial-gradient(#161616 1px, transparent 0) !important;
        }

        .canvas-svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 5;
            overflow: visible;
        }

        .edge-path {
            fill: none;
            transition: stroke 0.2s, d 0.15s ease-out;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        @keyframes dashFlow {
            from {
                stroke-dashoffset: 0;
            }
            to {
                stroke-dashoffset: calc(var(--dash-offset, -24) * 1px);
            }
        }

        .edge-path-animated {
            animation: dashFlow var(--dash-duration, 0.6s) linear infinite;
        }

        .edge-hitbox {
            fill: none;
            stroke: transparent;
            stroke-width: 20;
            cursor: pointer;
            pointer-events: stroke;
        }

        .node-glass {
            background: #ffffff;
            backdrop-filter: blur(10px);
            border: 1px solid #cbd5e1;
            border-radius: 3px;
            box-sizing: border-box;
        }

        .dark .node-glass {
            background: #1f1f23;
            border: 1px solid #3f3f46;
            color: #fafafa;
        }

        .node-postit {
            background-color: #fef9c3;
            border-radius: 3px;
            box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
            border: 1px solid #fde047;
        }

        .dark .node-postit {
            background-color: #3d3a2a;
            border: 1px solid #5a5642;
            color: #f5f3e0;
        }

        .line-clamp-3 {
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .zoom-container {
            transform-origin: 0 0;
            will-change: transform;
            backface-visibility: hidden;
            transform: translateZ(0);
        }

        .is-dragging .zoom-container {
            transition: none;
        }

        .is-dragging .edge-path {
            transition: none;
        }

        .node-protagonist {
            outline: 8px solid rgba(37, 99, 235, 0.2);
            background: #d7e7fc;
        }

        .dark .node-protagonist {
            outline: 8px solid rgba(37, 99, 235, 0.2);
            background: #172554;
        }

        .node-antagonist {
            border: 1px solid #c88885;
            background: #fbdfde;
        }

        .dark .node-antagonist {
            border: 1px solid #7f1d1d;
            background: #450a0a;
        }

        .node-helper {
            border: 1px solid #7dcb97;
            background: #d0f7e2;
        }

        .dark .node-helper {
            border: 1px solid #059669;
            background: #064e3b;
        }

        .node-event {
            outline: 4px solid rgba(255, 3, 3, 0.3);
        }

        .node-todo-complete {
            outline: 8px solid rgba(34, 211, 238, 0.15);
        }

        .custom-scroll::-webkit-scrollbar {
            width: 4px;
        }

        .custom-scroll::-webkit-scrollbar-track {
            background: transparent;
        }

        .custom-scroll::-webkit-scrollbar-thumb {
            background: #e2e8f0;
            border-radius: 3px;
            transition: background 0.2s;
        }

        .custom-scroll:hover::-webkit-scrollbar-thumb {
            background: #cbd5e1;
        }

        .custom-scroll::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }

        .dark .custom-scroll::-webkit-scrollbar-thumb {
            background: #3f3f46;
        }

        .dark .custom-scroll:hover::-webkit-scrollbar-thumb {
            background: #52525b;
        }

        .editor-paper {
            max-width: 585px;
            margin: 40px auto;
            background: white;
            min-height: calc(100vh - 80px);
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
            border-radius: 3px;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
            transition: background-color 0.3s, max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .editor-paper.editor-wide {
            max-width: 780px;
        }

        .editor-paper.editor-narrow {
            max-width: 480px;
        }

        .dark .editor-paper {
            background: #18181b;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
            border: 1px solid #27272a;
        }

        .editor-title-container {
            padding: 40px 60px 10px 60px;
        }

        .editor-textarea {
            width: 100%;
            flex: 1;
            resize: none;
            outline: none;
            line-height: 2.2;
            font-size: 18px;
            color: #334155;
            background: transparent;
            border: none;
            padding: 20px 60px 60px 60px;
        }

        .dark .editor-textarea {
            color: #d4d4d8;
        }

        .book-card {
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            transform-style: preserve-3d;
        }

        .book-spine {
            background: transparent;
        }

        .page-bg {
            background-color: #fdfbf7;
            background-image: repeating-linear-gradient(transparent, transparent 19px, #e5e7eb 20px);
        }

        .mention-list {
            position: fixed;
            z-index: 1000;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 3px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
            max-height: 400px;
            overflow: visible;
            display: flex;
            width: 600px;
        }

        .dark .mention-list {
            background: #18181b;
            border-color: #27272a;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
        }

        .mention-item-active {
            background-color: #f1f5f9;
            border-left: 4px solid #4f46e5;
        }

        .dark .mention-item-active {
            background-color: #27272a;
            border-left: 4px solid #4f46e5;
        }

        .editor-textarea.zen-active {
            padding-bottom: 50vh !important;
            -ms-overflow-style: none !important;
            scrollbar-width: none !important;
        }

        .editor-textarea.zen-active::-webkit-scrollbar {
            display: none !important;
        }

        /* 비교 모드 스타일 */
        .compare-container {
            background-color: #f8fafc;
            background-image: radial-gradient(#cbd5e1 1px, transparent 0);
            background-size: 20px 20px;
            background-position: 0 0;
        }

        .dark .compare-container {
            background-color: #09080B;
            background-image: radial-gradient(#27272a 1px, transparent 0);
        }

        .compare-container textarea {
            line-height: 2.2;
            color: #334155;
        }

        .dark .compare-container textarea {
            color: #d4d4d8;
        }

        .compare-container .zen-active {
            padding-bottom: 50vh !important;
            -ms-overflow-style: none !important;
            scrollbar-width: none !important;
        }

        .compare-container .zen-active::-webkit-scrollbar {
            display: none !important;
        }

        /* Responsive Sidebar and Editor */
        @media (max-width: 1024px) {
            .workspace-sidebar {
                position: absolute !important;
                left: 0;
                top: 0;
                bottom: 0;
                z-index: 200 !important;
                box-shadow: 20px 0 50px rgba(0,0,0,0.2) !important;
                background: white !important;
            }
            .dark .workspace-sidebar {
                background: #141417 !important;
            }
            .editor-paper {
                margin: 0 auto !important;
                min-height: 100vh !important;
                border-radius: 0 !important;
            }
            .mobile-hide {
                display: none !important;
            }
        }

        @media (max-width: 640px) {
            .editor-paper {
                width: 100vw !important;
                max-width: 100vw !important;
                margin: 0 !important;
                min-height: 100vh !important;
                border-radius: 0 !important;
                border: none !important;
                padding: 0 !important;
            }
            .editor-title-container {
                padding: 30px 20px 10px 20px !important;
            }
            .editor-textarea {
                padding: 10px 20px 60px 20px !important;
            }
            .editor-textarea.zen-active {
                padding-bottom: 40vh !important;
            }
        }
    </style>