body { font-family: 'Inter', sans-serif; }
.sidebar-transition {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #000000; }
::-webkit-scrollbar-thumb { background: #262626; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #404040; }
[contenteditable]:focus { outline: none; }
.cell-input:focus { background: rgba(255,255,255,0.04); }
.fade-in { animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
#art-interact { touch-action: none; }
:root { --accent: #ffffff; --accent-contrast: #000000; }
.accent-bg { background: var(--accent); color: var(--accent-contrast); }
.accent-bg-dot { background: var(--accent); }
.accent-text { color: var(--accent); }
.accent-border { border-color: var(--accent) !important; }
.book-page-font { font-family: Georgia, 'Times New Roman', serif; }
input[type=range] { accent-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shake-anim { animation: shakeKeyframe .4s ease; }
@keyframes shakeKeyframe { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }
.hgi-stroke { display: inline-block; line-height: 1; vertical-align: middle; width: auto !important; height: auto !important; }
.hgi-stroke.w-3 { font-size: 0.75rem; }
.hgi-stroke.w-3\.5 { font-size: 0.875rem; }
.hgi-stroke.w-4 { font-size: 1rem; }
.hgi-stroke.w-5 { font-size: 1.25rem; }
.hgi-stroke.w-10 { font-size: 2.5rem; }
.blur-lock { filter: blur(18px) brightness(0.5); pointer-events: none; user-select: none; transition: filter .2s ease; }
#lock-overlay { backdrop-filter: blur(6px); }
.font-preview-item:hover { background: rgba(255,255,255,0.04); }
#doc-editor-content.editor-dropcap::first-letter { font-size: 3.4em; float: left; line-height: 0.8; padding-right: 10px; font-weight: 700; }
#doc-editor-content.editor-two-col { column-count: 2; column-gap: 2.5rem; }
#doc-editor-content.typewriter-mode { line-height: 2.2; letter-spacing: 0.01em; max-width: 40rem; }
.editor-img-wrap { position: relative; display: inline-block; max-width: 100%; }
.editor-img-toolbar { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s ease; }
.editor-img-wrap:hover .editor-img-toolbar { opacity: 1; }
.editor-img-toolbar button { background: rgba(0,0,0,0.75); border-radius: 9999px; padding: 5px; color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.editor-img-toolbar button:hover { background: rgba(0,0,0,0.95); }
body.theme-active #sidebar, body.theme-active #main-header, body.theme-active #view-container, body.theme-active #lock-overlay {
    background-color: rgba(0,0,0,0.72) !important;
    backdrop-filter: blur(10px);
}

body.light-mode { background: #ffffff; color: #0a0a0a; }
body.light-mode .bg-black { background-color: #ffffff !important; }
body.light-mode .text-white { color: #0a0a0a !important; }
body.light-mode .text-black { color: #0a0a0a !important; }
body.light-mode .border-neutral-900 { border-color: #e5e5e5 !important; }
body.light-mode .border-neutral-800 { border-color: #d4d4d4 !important; }
body.light-mode .border-neutral-700 { border-color: #a3a3a3 !important; }
body.light-mode .border-neutral-600 { border-color: #737373 !important; }
body.light-mode .border-neutral-500 { border-color: #525252 !important; }
body.light-mode .text-neutral-200 { color: #171717 !important; }
body.light-mode .text-neutral-300 { color: #262626 !important; }
body.light-mode .text-neutral-400 { color: #525252 !important; }
body.light-mode .text-neutral-500 { color: #525252 !important; }
body.light-mode .text-neutral-600 { color: #737373 !important; }
body.light-mode .text-neutral-700 { color: #404040 !important; }
body.light-mode .bg-neutral-800 { background-color: #f0f0f0 !important; }
body.light-mode .bg-neutral-900 { background-color: #f7f7f7 !important; }
body.light-mode .bg-neutral-950 { background-color: #f0f0f0 !important; }
body.light-mode .bg-neutral-600 { background-color: #d4d4d4 !important; }
body.light-mode .divide-neutral-900 > * + * { border-color: #e5e5e5 !important; }
body.light-mode .placeholder\:text-neutral-600::placeholder { color: #a3a3a3 !important; }
body.light-mode .placeholder\:text-neutral-700::placeholder { color: #a3a3a3 !important; }
body.light-mode .hover\:bg-white\/\[0\.03\]:hover { background-color: rgba(0,0,0,0.04) !important; }
body.light-mode .hover\:bg-white\/\[0\.04\]:hover { background-color: rgba(0,0,0,0.05) !important; }
body.light-mode .hover\:bg-white\/\[0\.05\]:hover { background-color: rgba(0,0,0,0.05) !important; }
body.light-mode .hover\:bg-white\/\[0\.08\]:hover { background-color: rgba(0,0,0,0.08) !important; }
body.light-mode .bg-white\/\[0\.03\] { background-color: rgba(0,0,0,0.04) !important; }
body.light-mode .bg-white\/\[0\.04\] { background-color: rgba(0,0,0,0.05) !important; }
body.light-mode .bg-white\/\[0\.05\] { background-color: rgba(0,0,0,0.05) !important; }
body.light-mode .hover\:text-white:hover { color: #0a0a0a !important; }
body.light-mode .group-hover\:text-white { color: #0a0a0a !important; }
body.light-mode .group:hover .group-hover\:text-white { color: #0a0a0a !important; }
body.light-mode .hover\:bg-neutral-800:hover { background-color: #ececec !important; }
body.light-mode .hover\:bg-neutral-600:hover { background-color: #d4d4d4 !important; }
body.light-mode .hover\:border-neutral-700:hover { border-color: #a3a3a3 !important; }
body.light-mode .hover\:border-neutral-600:hover { border-color: #737373 !important; }
body.light-mode .focus\:border-neutral-600:focus { border-color: #737373 !important; }
body.light-mode .focus\:border-neutral-700:focus { border-color: #a3a3a3 !important; }
body.light-mode .focus\:border-neutral-500:focus { border-color: #525252 !important; }
body.light-mode .focus\:border-white:focus { border-color: #0a0a0a !important; }
body.light-mode .focus-within\:border-neutral-600:focus-within { border-color: #737373 !important; }
body.light-mode ::-webkit-scrollbar-track { background: #ffffff; }
body.light-mode ::-webkit-scrollbar-thumb { background: #d4d4d4; }
body.light-mode ::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }
body.light-mode #lock-overlay { background-color: rgba(255,255,255,0.7) !important; }
body.light-mode.theme-active #sidebar, body.light-mode.theme-active #main-header, body.light-mode.theme-active #view-container {
    background-color: rgba(255,255,255,0.78) !important;
}

::highlight(find-all) { background-color: rgba(253, 230, 138, 0.35); color: inherit; }
::highlight(find-current) { background-color: #fde68a; color: #000; }
#doc-editor-content ul[style*="list-style: none"] li { display: flex; gap: 0.5rem; align-items: baseline; }
#doc-editor-content a { text-decoration: underline; text-underline-offset: 3px; }
#doc-editor-content blockquote { border-left: 2px solid #404040; padding-left: 1rem; color: #a3a3a3; margin: 0.75rem 0; }
#doc-editor-content h1 { font-size: 1.9em; font-weight: 700; margin: 0.8em 0 0.3em; line-height: 1.2; }
#doc-editor-content h2 { font-size: 1.5em; font-weight: 600; margin: 0.8em 0 0.3em; line-height: 1.25; }
#doc-editor-content h3 { font-size: 1.2em; font-weight: 600; margin: 0.7em 0 0.25em; }
#doc-editor-content ul { list-style: disc; padding-left: 1.5rem; }
#doc-editor-content ol { list-style: decimal; padding-left: 1.5rem; }
#doc-editor-content pre { background: rgba(255,255,255,0.06); border-radius: 0.75rem; padding: 0.75rem 1rem; font-family: ui-monospace, monospace; font-size: 0.85em; }
