/* ========================================================================
MARKDOWN NOTES APP - CROSS-CULTURAL DESIGN SYSTEM
Target: RO / DACH / EN | Psychological: Trust + Clarity + Focus
======================================================================== */
/* 1. VARIABLES & THEME =================================================== */
:root {
/* Colors */
--bg-page: #F8FAFC;
--bg-card: #FFFFFF;
--bg-surface: #F1F5F9;
--text-primary: #0F172A;
--text-secondary: #475569;
--text-muted: #94A3B8;
--accent: #2563EB;
--accent-hover: #1D4ED8;
--warm: #D97706;
--success: #10B981;
--error: #EF4444;
--border: #E2E8F0;
--shadow-sm: 0 1px 3px rgba(15,23,42,0.08);
--shadow-md: 0 4px 12px rgba(15,23,42,0.12);
--focus-ring: 0 0 0 3px rgba(37,99,235,0.25);
/* Spacing */
--space-xs: 0.25rem;
--space-sm: 0.5rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2rem;
--space-2xl: 3rem;
/* Layout */
--radius: 12px;
--radius-sm: 8px;
--max-width: 1200px;
--header-height: 64px;
/* Typography */
--font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", "Consolas", monospace;
--text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
--text-sm: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
--text-base: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
--text-lg: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
--text-xl: clamp(1.25rem, 1rem + 1vw, 1.5rem);
--text-2xl: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
--text-3xl: clamp(1.875rem, 1.5rem + 1.5vw, 2.25rem);
/* Motion */
--ease: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
--ease-slow: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
/* Notes-specific */
--sidebar-width: 220px;
--list-width: 260px;
--editor-min-height: 400px;
}
@media (prefers-color-scheme: dark) {
:root {
--bg-page: #0B1120;
--bg-card: #111827;
--bg-surface: #1E293B;
--text-primary: #F1F5F9;
--text-secondary: #CBD5E1;
--text-muted: #64748B;
--border: #334155;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
--shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}
}
html.theme-dark {
--bg-page: #0B1120;
--bg-card: #111827;
--bg-surface: #1E293B;
--text-primary: #F1F5F9;
--text-secondary: #CBD5E1;
--text-muted: #64748B;
--border: #334155;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
--shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

/* 2. BASE & RESET ======================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
scroll-behavior: smooth;
-webkit-text-size-adjust: 100%;
text-rendering: optimizeLegibility;
font-feature-settings: "kern" 1, "liga" 1;
}
body {
font-family: var(--font-sans);
background: var(--bg-page);
color: var(--text-primary);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
min-height: 100vh;
display: flex;
flex-direction: column;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
ul, ol { list-style: none; }

/* 3. LAYOUT & CONTAINERS ================================================ */
.container {
width: 100%;
max-width: var(--max-width);
margin: 0 auto;
padding-inline: var(--space-lg);
}
.site-header {
position: sticky;
top: 0;
z-index: 50;
height: var(--header-height);
background: var(--bg-card);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
}
.site-header .container {
display: flex;
align-items: center;
justify-content: space-between;
height: 100%;
}
.logo {
display: inline-flex;
align-items: center;
gap: var(--space-sm);
color: var(--text-primary);
font-size: var(--text-lg);
line-height: 1.2;
transition: opacity var(--ease);
}
.logo:hover { opacity: 0.9; }
.logo-img {
width: 32px;
height: 32px;
flex-shrink: 0;
display: block;
border-radius: var(--radius-sm);
}
.logo strong {
font-weight: 700;
letter-spacing: -0.02em;
}
main { flex: 1; padding-block: var(--space-2xl); }
footer {
border-top: 1px solid var(--border);
padding-block: var(--space-xl);
color: var(--text-muted);
font-size: var(--text-sm);
}

/* 4. TYPOGRAPHY & UTILITIES ============================================= */
h1, h2, h3, h4 {
text-wrap: balance;
line-height: 1.2;
font-weight: 600;
}
h1 { font-size: var(--text-3xl); margin-bottom: var(--space-md); }
h2 { font-size: var(--text-2xl); margin-bottom: var(--space-lg); }
h3 { font-size: var(--text-xl); }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.sr-only {
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 5. COMPONENTS ========================================================= */
/* Language Switcher */
.lang-switch {
display: inline-flex;
background: var(--bg-surface);
padding: 4px;
border-radius: 999px;
gap: 4px;
align-items: center;
width: auto;
}
.lang-btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 999px;
font-size: var(--text-sm);
font-weight: 500;
color: var(--text-secondary);
background: transparent;
border: none;
transition: all 0.2s ease;
white-space: nowrap;
cursor: pointer;
text-decoration: none;
}
.lang-btn:hover { color: var(--text-primary); }
.lang-btn.active,
.lang-btn[aria-current="true"] {
background: var(--bg-card);
color: var(--accent);
font-weight: 600;
box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}
/* Theme Toggle */
.theme-toggle {
width: 36px; height: 36px;
border-radius: 50%;
border: 1px solid var(--border);
background: var(--bg-surface);
display: grid; place-items: center;
font-size: 1.1rem;
cursor: pointer;
}
/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-xs);
padding: var(--space-sm) var(--space-md);
border-radius: var(--radius-sm);
font-size: var(--text-sm);
font-weight: 500;
border: 1px solid transparent;
background: var(--accent);
color: #fff;
transition: var(--ease);
cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn--outline {
background: transparent;
border-color: var(--border);
color: var(--text-primary);
}
.btn--outline:hover { background: var(--bg-surface); }
.btn--sm {
padding: var(--space-xs) var(--space-sm);
font-size: var(--text-xs);
}
.btn--danger {
background: var(--error);
}
.btn--danger:hover {
background: #DC2626;
}
.btn--ghost {
background: transparent;
color: var(--text-secondary);
border: none;
padding: var(--space-xs);
}
.btn--ghost:hover {
background: var(--bg-surface);
color: var(--text-primary);
}
/* Forms */
.form-group { margin-bottom: var(--space-md); }
.form-label {
display: block;
font-size: var(--text-sm);
font-weight: 500;
margin-bottom: var(--space-xs);
}
.form-input, .form-textarea {
width: 100%;
padding: var(--space-sm) var(--space-md);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-card);
color: var(--text-primary);
font-size: var(--text-base);
transition: var(--ease);
}
.form-input:focus, .form-textarea:focus {
outline: none;
box-shadow: var(--focus-ring);
border-color: var(--accent);
}
.form-input.is-error, .form-textarea.is-error {
border-color: var(--error);
box-shadow: 0 0 0 3px rgba(239,68,68,0.2);
}
.form-textarea {
resize: vertical;
min-height: 120px;
}
.form-help { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-xs); }
.form-error { font-size: var(--text-xs); color: var(--error); margin-top: var(--space-xs); }
/* Tool Card */
.tool-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: var(--space-lg);
box-shadow: var(--shadow-sm);
transition: var(--ease-slow);
display: flex;
flex-direction: column;
gap: var(--space-sm);
position: relative;
contain: layout style;
}
/* Sub-site banner */
.subsite-banner {
background: var(--accent);
color: #fff;
text-align: center;
padding: 10px 16px;
font-size: var(--text-sm);
font-weight: 600;
letter-spacing: .3px;
position: sticky;
top: var(--header-height);
z-index: 49;
}
.subsite-banner a {
color: #fff;
text-decoration: underline;
text-underline-offset: 3px;
font-weight: 700;
}
/* Legal footer */
.subsite-legal-footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: var(--bg-card);
border-top: 1px solid var(--border);
padding: 8px 16px;
z-index: 9998;
text-align: center;
font-size: var(--text-sm);
}
.subsite-legal-footer a {
color: var(--accent);
text-decoration: none;
font-weight: 600;
}
.subsite-legal-footer a span {
text-decoration: underline;
text-underline-offset: 2px;
}

/* 6. TOOL-SPECIFIC ====================================================== */
/* Auth forms */
.auth-container {
max-width: 420px;
margin: 0 auto;
}
.auth-tabs {
display: flex;
gap: var(--space-xs);
margin-bottom: var(--space-lg);
background: var(--bg-surface);
border-radius: var(--radius-sm);
padding: 4px;
}
.auth-tab {
flex: 1;
padding: var(--space-sm);
text-align: center;
border-radius: var(--radius-sm);
font-size: var(--text-sm);
font-weight: 500;
color: var(--text-secondary);
background: transparent;
border: none;
cursor: pointer;
transition: var(--ease);
}
.auth-tab.active {
background: var(--bg-card);
color: var(--accent);
font-weight: 600;
box-shadow: var(--shadow-sm);
}
.auth-tab:hover:not(.active) {
color: var(--text-primary);
}
.auth-form {
display: none;
}
.auth-form.active {
display: block;
}
.auth-switch {
text-align: center;
margin-top: var(--space-md);
font-size: var(--text-sm);
color: var(--text-muted);
}
.auth-switch a {
color: var(--accent);
cursor: pointer;
font-weight: 500;
text-decoration: underline;
text-underline-offset: 2px;
}
.auth-error {
background: #FEF2F2;
color: #991B1B;
padding: var(--space-sm) var(--space-md);
border-radius: var(--radius-sm);
font-size: var(--text-sm);
margin-bottom: var(--space-md);
border: 1px solid #FECACA;
}
html.theme-dark .auth-error {
background: #450A0A;
color: #FCA5A5;
border-color: #7F1D1D;
}
.auth-success {
background: #F0FDF4;
color: #166534;
padding: var(--space-sm) var(--space-md);
border-radius: var(--radius-sm);
font-size: var(--text-sm);
margin-bottom: var(--space-md);
border: 1px solid #BBF7D0;
}
html.theme-dark .auth-success {
background: #052E16;
color: #86EFAC;
border-color: #14532D;
}

/* Notes App Layout */
.notes-app {
display: none;
flex-direction: column;
gap: var(--space-md);
min-height: 500px;
}
.notes-app.active {
display: flex;
}
.notes-welcome {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-sm) 0;
border-bottom: 1px solid var(--border);
margin-bottom: var(--space-sm);
}
.notes-welcome-user {
font-size: var(--text-sm);
color: var(--text-secondary);
}
.notes-welcome-user strong {
color: var(--text-primary);
}

/* Three-panel layout */
.notes-panels {
display: grid;
grid-template-columns: var(--sidebar-width) var(--list-width) 1fr;
gap: 1px;
background: var(--border);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
min-height: var(--editor-min-height);
}

/* Folder sidebar */
.panel-sidebar {
background: var(--bg-card);
display: flex;
flex-direction: column;
}
.panel-sidebar-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-sm) var(--space-md);
border-bottom: 1px solid var(--border);
font-size: var(--text-sm);
font-weight: 600;
}
.panel-sidebar-header .btn--ghost {
font-size: 1rem;
line-height: 1;
}
.folder-list {
flex: 1;
overflow-y: auto;
padding: var(--space-xs);
}
.folder-item {
display: flex;
align-items: center;
gap: var(--space-sm);
padding: var(--space-xs) var(--space-sm);
border-radius: var(--radius-sm);
font-size: var(--text-sm);
color: var(--text-secondary);
cursor: pointer;
transition: var(--ease);
position: relative;
}
.folder-item:hover {
background: var(--bg-surface);
color: var(--text-primary);
}
.folder-item.active {
background: var(--accent);
color: #fff;
font-weight: 500;
}
.folder-item.active .folder-count {
background: rgba(255,255,255,0.25);
color: #fff;
}
.folder-icon {
font-size: 0.9em;
flex-shrink: 0;
}
.folder-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.folder-count {
font-size: var(--text-xs);
background: var(--bg-surface);
color: var(--text-muted);
padding: 1px 6px;
border-radius: 999px;
flex-shrink: 0;
}
.folder-actions {
display: none;
gap: 2px;
position: absolute;
right: 4px;
top: 50%;
transform: translateY(-50%);
}
.folder-item:hover .folder-actions {
display: flex;
}
.folder-item.active .folder-actions {
display: flex;
}
.folder-actions .btn--ghost {
padding: 2px;
font-size: 0.8rem;
line-height: 1;
width: 22px;
height: 22px;
display: grid;
place-items: center;
border-radius: 4px;
}
.folder-item.active .folder-actions .btn--ghost {
color: rgba(255,255,255,0.7);
}
.folder-item.active .folder-actions .btn--ghost:hover {
background: rgba(255,255,255,0.2);
color: #fff;
}

/* Notes list panel */
.panel-list {
background: var(--bg-card);
display: flex;
flex-direction: column;
}
.panel-list-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-sm) var(--space-md);
border-bottom: 1px solid var(--border);
gap: var(--space-sm);
}
.panel-list-header h3 {
font-size: var(--text-sm);
font-weight: 600;
margin: 0;
}
.search-input {
width: 100%;
padding: var(--space-xs) var(--space-sm);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-surface);
color: var(--text-primary);
font-size: var(--text-xs);
transition: var(--ease);
}
.search-input:focus {
outline: none;
box-shadow: var(--focus-ring);
border-color: var(--accent);
}
.note-list {
flex: 1;
overflow-y: auto;
padding: var(--space-xs);
}
.note-item {
padding: var(--space-sm);
border-radius: var(--radius-sm);
cursor: pointer;
transition: var(--ease);
margin-bottom: 2px;
}
.note-item:hover {
background: var(--bg-surface);
}
.note-item.active {
background: var(--bg-surface);
border-left: 3px solid var(--accent);
}
.note-item-title {
font-size: var(--text-sm);
font-weight: 500;
color: var(--text-primary);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 2px;
}
.note-item-preview {
font-size: var(--text-xs);
color: var(--text-muted);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.note-item-meta {
font-size: var(--text-xs);
color: var(--text-muted);
margin-top: 4px;
}
.note-list-empty {
padding: var(--space-xl) var(--space-md);
text-align: center;
color: var(--text-muted);
font-size: var(--text-sm);
}
.note-list-empty-icon {
font-size: 2rem;
margin-bottom: var(--space-sm);
opacity: 0.4;
}

/* Editor panel */
.panel-editor {
background: var(--bg-card);
display: flex;
flex-direction: column;
}
.editor-empty {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: var(--text-muted);
padding: var(--space-2xl);
text-align: center;
gap: var(--space-sm);
}
.editor-empty-icon {
font-size: 3rem;
opacity: 0.3;
}
.editor-toolbar {
display: flex;
align-items: center;
gap: var(--space-sm);
padding: var(--space-sm) var(--space-md);
border-bottom: 1px solid var(--border);
flex-wrap: wrap;
}
.editor-title-input {
width: 100%;
padding: var(--space-sm) var(--space-md);
border: none;
border-bottom: 1px solid var(--border);
background: var(--bg-card);
color: var(--text-primary);
font-size: var(--text-xl);
font-weight: 600;
font-family: var(--font-sans);
}
.editor-title-input:focus {
outline: none;
border-bottom-color: var(--accent);
}
.editor-title-input::placeholder {
color: var(--text-muted);
font-weight: 400;
}
.editor-mode-toggle {
display: inline-flex;
background: var(--bg-surface);
padding: 2px;
border-radius: var(--radius-sm);
gap: 2px;
}
.editor-mode-btn {
padding: var(--space-xs) var(--space-sm);
border-radius: 4px;
font-size: var(--text-xs);
font-weight: 500;
color: var(--text-secondary);
background: transparent;
border: none;
cursor: pointer;
transition: var(--ease);
}
.editor-mode-btn.active {
background: var(--bg-card);
color: var(--accent);
font-weight: 600;
box-shadow: var(--shadow-sm);
}
.editor-mode-btn:hover:not(.active) {
color: var(--text-primary);
}
.editor-content {
flex: 1;
display: flex;
flex-direction: column;
}
.editor-textarea {
flex: 1;
width: 100%;
padding: var(--space-md);
border: none;
background: var(--bg-card);
color: var(--text-primary);
font-size: var(--text-base);
font-family: var(--font-mono);
line-height: 1.6;
resize: none;
min-height: var(--editor-min-height);
}
.editor-textarea:focus {
outline: none;
}
.editor-textarea::placeholder {
color: var(--text-muted);
}
.editor-preview {
flex: 1;
padding: var(--space-md);
overflow-y: auto;
min-height: var(--editor-min-height);
font-size: var(--text-base);
line-height: 1.7;
}
.editor-preview h1 { font-size: var(--text-2xl); margin: var(--space-md) 0 var(--space-sm); border-bottom: 1px solid var(--border); padding-bottom: var(--space-xs); }
.editor-preview h2 { font-size: var(--text-xl); margin: var(--space-md) 0 var(--space-sm); }
.editor-preview h3 { font-size: var(--text-lg); margin: var(--space-sm) 0; }
.editor-preview p { margin-bottom: var(--space-sm); }
.editor-preview strong { font-weight: 700; }
.editor-preview em { font-style: italic; }
.editor-preview code {
background: var(--bg-surface);
padding: 2px 6px;
border-radius: 4px;
font-family: var(--font-mono);
font-size: 0.9em;
}
.editor-preview pre {
background: var(--bg-surface);
padding: var(--space-md);
border-radius: var(--radius-sm);
overflow-x: auto;
margin: var(--space-md) 0;
}
.editor-preview pre code {
background: transparent;
padding: 0;
}
.editor-preview blockquote {
border-left: 3px solid var(--accent);
padding-left: var(--space-md);
margin: var(--space-md) 0;
color: var(--text-secondary);
font-style: italic;
}
.editor-preview hr {
border: none;
border-top: 1px solid var(--border);
margin: var(--space-lg) 0;
}
.editor-preview ul, .editor-preview ol {
padding-left: var(--space-lg);
margin-bottom: var(--space-sm);
}
.editor-preview li {
margin-bottom: var(--space-xs);
}
.editor-preview a {
color: var(--accent);
text-decoration: underline;
text-underline-offset: 2px;
}
.editor-footer {
display: flex;
align-items: center;
justify-content: space-between;
padding: var(--space-xs) var(--space-md);
border-top: 1px solid var(--border);
font-size: var(--text-xs);
color: var(--text-muted);
}
.save-status {
display: inline-flex;
align-items: center;
gap: 4px;
}
.save-status .dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--text-muted);
}
.save-status.saved .dot { background: var(--success); }
.save-status.saving .dot { background: var(--warm); animation: pulse 1s infinite; }
.save-status.unsaved .dot { background: var(--error); }

/* Toast notification */
.toast-container {
position: fixed;
top: calc(var(--header-height) + 60px);
right: var(--space-lg);
z-index: 10001;
display: flex;
flex-direction: column;
gap: var(--space-sm);
}
.toast {
padding: var(--space-sm) var(--space-md);
border-radius: var(--radius-sm);
font-size: var(--text-sm);
font-weight: 500;
box-shadow: var(--shadow-md);
animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
max-width: 320px;
}
.toast--success {
background: #ECFDF5;
color: #065F46;
border: 1px solid #A7F3D0;
}
html.theme-dark .toast--success {
background: #052E16;
color: #86EFAC;
border-color: #14532D;
}
.toast--error {
background: #FEF2F2;
color: #991B1B;
border: 1px solid #FECACA;
}
html.theme-dark .toast--error {
background: #450A0A;
color: #FCA5A5;
border-color: #7F1D1D;
}
.toast--info {
background: #EFF6FF;
color: #1E40AF;
border: 1px solid #BFDBFE;
}
html.theme-dark .toast--info {
background: #172554;
color: #93C5FD;
border-color: #1E3A5F;
}

/* App modal (confirm / prompt) */
.app-modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 10002;
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease;
}
.app-modal-overlay.is-active {
opacity: 1;
visibility: visible;
}
.app-modal {
background: var(--bg-card);
border-radius: var(--radius);
box-shadow: 0 20px 40px rgba(0,0,0,0.15);
max-width: 420px;
width: 90vw;
padding: var(--space-lg);
}
.app-modal-title {
font-size: var(--text-lg);
font-weight: 600;
margin-bottom: var(--space-sm);
}
.app-modal-message {
font-size: var(--text-sm);
color: var(--text-secondary);
margin-bottom: var(--space-lg);
line-height: 1.5;
}
.app-modal-input {
width: 100%;
padding: var(--space-sm) var(--space-md);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--bg-surface);
color: var(--text-primary);
font-size: var(--text-base);
margin-bottom: var(--space-lg);
}
.app-modal-input:focus {
outline: none;
box-shadow: var(--focus-ring);
border-color: var(--accent);
}
.app-modal-actions {
display: flex;
gap: var(--space-sm);
justify-content: flex-end;
}

/* Mobile nav */
.mobile-nav {
display: none;
background: var(--bg-card);
border-bottom: 1px solid var(--border);
padding: var(--space-xs);
gap: 2px;
}
.mobile-nav-btn {
flex: 1;
padding: var(--space-sm);
border: none;
border-radius: var(--radius-sm);
font-size: var(--text-sm);
font-weight: 500;
color: var(--text-secondary);
background: transparent;
cursor: pointer;
text-align: center;
transition: var(--ease);
}
.mobile-nav-btn.active {
background: var(--accent);
color: #fff;
}

/* 7. STICKY DONATE ====================================================== */
.sticky-donate-wrapper {
position: fixed;
bottom: 24px;
right: 24px;
z-index: 90;
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 8px;
opacity: 0;
transform: translateY(20px);
transition: opacity var(--ease), transform var(--ease);
pointer-events: none;
}
.sticky-donate-wrapper.is-visible {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
.sticky-donate-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
background: #FFDD00;
color: #111;
font-weight: 600;
font-size: var(--text-sm);
border-radius: 999px;
box-shadow: var(--shadow-md);
border: none;
text-decoration: none;
transition: transform var(--ease), box-shadow var(--ease);
cursor: pointer;
}
.sticky-donate-btn:hover {
transform: translateY(-2px) scale(1.02);
box-shadow: 0 8px 16px rgba(255, 205, 0, 0.3);
}
.sticky-donate-btn:focus-visible {
outline: none;
box-shadow: var(--focus-ring);
}
.donate-icon { font-size: 1.2em; }

/* 8. MODAL =============================================================== */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.is-active {
opacity: 1;
visibility: visible;
}
.modal-container {
background: var(--bg-card);
border-radius: var(--radius);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
max-width: 90vw;
max-height: 90vh;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
.modal-close {
position: absolute;
top: var(--space-md);
right: var(--space-md);
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--text-muted);
z-index: 1;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background 0.2s ease;
}
.modal-close:hover {
background: var(--bg-surface);
color: var(--text-primary);
}
.modal-content {
padding: var(--space-2xl);
overflow-y: auto;
max-height: 80vh;
}
.modal-loading {
text-align: center;
padding: var(--space-2xl);
color: var(--text-muted);
}

/* 9. ANIMATIONS ========================================================== */
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.15); }
}
@keyframes toastIn {
from { opacity: 0; transform: translateX(20px); }
to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
from { opacity: 1; transform: translateX(0); }
to   { opacity: 0; transform: translateX(20px); }
}
@keyframes fadeIn {
from { opacity: 0; }
to   { opacity: 1; }
}

/* 10. RESPONSIVE ========================================================= */
@media (max-width: 900px) {
.notes-panels {
grid-template-columns: 1fr;
}
.panel-sidebar,
.panel-list {
max-height: 300px;
}
.panel-sidebar {
border-right: none;
border-bottom: 1px solid var(--border);
}
.panel-list {
border-right: none;
border-bottom: 1px solid var(--border);
}
.panel-editor {
min-height: 500px;
}
}
@media (max-width: 640px) {
:root {
--space-xl: 1.5rem;
--space-2xl: 2rem;
}
.notes-panels {
grid-template-columns: 1fr;
}
.panel-sidebar,
.panel-list {
display: none;
}
.panel-sidebar.mobile-visible,
.panel-list.mobile-visible {
display: flex;
max-height: none;
}
.panel-editor.mobile-hidden {
display: none;
}
.mobile-nav {
display: flex;
}
.sticky-donate-wrapper { bottom: 16px; right: 16px; }
.sticky-donate-btn { padding: 8px 14px; font-size: var(--text-xs); }
.lang-btn span { display: none; }
.lang-btn { padding: 6px 8px; font-size: 1.2rem; }
}

/* 11. REDUCED MOTION ===================================================== */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}

/* 12. PRINT ============================================================== */
@media print {
.site-header,
.subsite-banner,
.subsite-legal-footer,
.sticky-donate-wrapper,
.mobile-nav,
.btn,
.theme-toggle,
.lang-switch,
.toast-container { display: none; }
body { background: #fff; color: #000; padding-bottom: 0; }
.tool-card { box-shadow: none; border: 1px solid #000; }
.notes-panels {
display: block;
border: none;
}
.panel-sidebar,
.panel-list {
display: none;
}
.panel-editor {
display: block;
}
.editor-textarea {
min-height: auto;
}
.editor-toolbar {
display: none;
}
.editor-footer {
display: none;
}
}
