/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { height: 100%; }
body {
    min-height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    background: #fafaf9;
    color: #1c1917;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
kbd { font-family: 'Inter', monospace; font-size: 0.7rem; background: rgba(255,255,255,0.15); padding: 2px 6px; border-radius: 4px; }

/* === Site Header === */
.site-header { background: #1c1917; color: #fff; }
.site-header-inner {
    max-width: 72rem; margin: 0 auto; padding: 0.75rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
}
.site-logo {
    font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; color: #fff;
    display: flex; align-items: baseline; gap: 0.5rem;
}
.site-logo:hover { color: #c7d2fe; }
.site-logo-accent { color: #818cf8; }
.site-logo-sub { font-size: 0.65rem; color: #a8a29e; }
.site-nav { display: flex; gap: 1.5rem; font-size: 0.875rem; }
.site-nav a { color: #d6d3d1; transition: color 0.15s; }
.site-nav a:hover { color: #fff; }
.mobile-menu-btn { display: none; color: #d6d3d1; padding: 4px; }
.mobile-nav { border-top: 1px solid #44403c; padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.875rem; }
.mobile-nav a { color: #d6d3d1; padding: 0.25rem 0; }
.mobile-nav a:hover { color: #fff; }

/* === Nav Header === */
.nav-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
    border-bottom: 1px solid #e7e5e4;
}
.nav-header-inner {
    max-width: 48rem; margin: 0 auto; padding: 0.625rem 1rem;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-prev, .nav-next { width: 4rem; }
.nav-next { display: flex; justify-content: flex-end; }
.nav-arrow { color: #a8a29e; padding: 4px; transition: color 0.15s; display: inline-flex; }
.nav-arrow:hover { color: #6366f1; }
.nav-center { display: flex; align-items: center; gap: 0.5rem; }
.nav-btn {
    font-weight: 600; font-size: 0.9375rem; color: #1c1917;
    transition: color 0.15s; padding: 2px 4px;
}
.nav-btn:hover { color: #6366f1; }

/* Dropdowns */
.nav-dropdown { position: relative; }
.nav-dropdown-panel {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    margin-top: 0.5rem; background: #fff; border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12); border: 1px solid #e7e5e4;
    padding: 1rem; z-index: 50;
}
.book-panel { width: 22rem; max-height: 60vh; overflow-y: auto; }
.book-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.book-testament-label { font-size: 0.7rem; font-weight: 700; color: #a8a29e; text-transform: uppercase; margin-bottom: 0.5rem; letter-spacing: 0.05em; }
.book-link {
    display: block; padding: 0.25rem 0.5rem; border-radius: 4px;
    font-size: 0.8125rem; color: #57534e; transition: all 0.1s;
}
.book-link:hover { background: #eef2ff; color: #4338ca; }
.book-link.active { background: #eef2ff; color: #4338ca; font-weight: 500; }
.chapter-panel { padding: 0.75rem; }
.chapter-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.25rem; max-width: 16rem; }
.chapter-link {
    width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center;
    border-radius: 4px; font-size: 0.8125rem; color: #57534e; transition: all 0.1s;
}
.chapter-link:hover { background: #eef2ff; color: #4338ca; }
.chapter-link.active { background: #e0e7ff; color: #4338ca; font-weight: 700; }

/* Interlinear toggle */
.interlinear-toggle {
    display: flex; align-items: center; gap: 2px; margin-left: 0.25rem;
    font-size: 0.7rem; font-weight: 600; color: #a8a29e;
    border: 1px solid #e7e5e4; border-radius: 4px;
    padding: 0.25rem 0.5rem; transition: all 0.15s; line-height: 1;
}
.interlinear-toggle:hover { color: #6366f1; border-color: #6366f1; }
.interlinear-toggle.active { color: #fff; background: #6366f1; border-color: #6366f1; }
.interlinear-toggle-icon { font-family: 'Lora', Georgia, serif; }
.interlinear-toggle-label { font-family: 'Lora', Georgia, serif; opacity: 0.6; }

/* Font size controls */
.font-size-controls { display: flex; gap: 2px; margin-left: 0.5rem; }
.font-size-btn {
    font-size: 0.7rem; font-weight: 600; color: #a8a29e;
    border: 1px solid #e7e5e4; border-radius: 4px;
    padding: 0.25rem 0.4rem; transition: all 0.15s; line-height: 1;
}
.font-size-btn:hover { color: #6366f1; border-color: #6366f1; }

.search-trigger {
    margin-left: 0.75rem; display: flex; align-items: center; gap: 0.375rem;
    font-size: 0.75rem; color: #a8a29e; border: 1px solid #e7e5e4;
    border-radius: 0.5rem; padding: 0.375rem 0.625rem; transition: color 0.15s;
}
.search-trigger:hover { color: #57534e; }
.search-trigger kbd { background: transparent; padding: 0; }

/* === Bible Text === */
.chapter-main { max-width: 48rem; margin: 0 auto; }
.bible-text {
    font-family: 'Lora', Georgia, serif; font-size: 1.125rem; line-height: 1.85;
    padding: 1.5rem 1rem;
}
.verse { transition: opacity 0.3s ease, background-color 0.3s ease; cursor: pointer; }
.verse:hover { background: #fef9c3; border-radius: 2px; }
.verse-number {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7em; font-weight: 600; color: #6366f1;
    vertical-align: super; margin-right: 0.15em; user-select: none;
}
/* Paragraph breaks */
.para-break { display: block; height: 0.75em; }
.is-admin .para-break { cursor: pointer; position: relative; }
.is-admin .para-break:hover::after {
    content: '¶'; position: absolute; left: -1.25rem; top: -0.25rem;
    color: #d6d3d1; font-size: 0.75rem;
}

.verse-dimmed { opacity: 0.35; }
.verse-highlighted { background-color: #fef9c3; border-radius: 2px; padding: 1px 2px; margin: -1px -2px; }
.verse-selected { background-color: #e0e7ff; border-radius: 2px; padding: 1px 2px; margin: -1px -2px; }

/* Verse compare button & panel */
.verse-compare-btn {
    font-size: 0.65rem; color: #a5b4fc; vertical-align: super;
    margin-left: 0.15em; opacity: 0.4; transition: opacity 0.15s;
    font-family: 'Inter', system-ui, sans-serif; cursor: pointer;
}
.verse:hover .verse-compare-btn { opacity: 1; }
.verse-compare-btn:hover { color: #6366f1; }
@media (hover: none) { .verse-compare-btn { opacity: 0.5; } }
.verse-compare-panel {
    margin: 0.375rem 0 0.5rem; padding: 0.75rem;
    background: #fafaf9; border: 1px solid #e7e5e4; border-radius: 0.5rem;
    font-family: 'Inter', system-ui, sans-serif; font-size: 0.8125rem;
}
.compare-translation {
    margin-bottom: 0.5rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0eeec;
}
.compare-translation:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.compare-label {
    font-size: 0.65rem; font-weight: 700; color: #a8a29e;
    text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.125rem;
}
.compare-text {
    font-family: 'Lora', Georgia, serif; font-size: 0.875rem;
    line-height: 1.6; color: #1c1917;
}
.compare-text-en { color: #57534e; }
.compare-loading { color: #a8a29e; font-style: italic; }

/* Glossary highlights */
.glossary-hl {
    background-color: rgba(251, 191, 36, 0.2);
    border-radius: 2px; cursor: help; transition: background-color 0.15s;
}
.glossary-hl:hover { background-color: rgba(251, 191, 36, 0.4); }
.glossary-tip {
    position: absolute; z-index: 200; max-width: 340px;
    padding: 0.625rem 0.875rem; background: #1c1917; color: #fafaf9;
    font-size: 0.8125rem; line-height: 1.5; border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); pointer-events: none;
    font-family: 'Inter', system-ui, sans-serif;
}
.glossary-tip strong { color: #fbbf24; font-size: 0.875rem; }
.glossary-tip-strong { color: #a8a29e; font-size: 0.75rem; }
.glossary-tip-def { margin-top: 0.25rem; }

/* Admin floating buttons */
.admin-fab {
    position: fixed; bottom: 1rem; z-index: 50;
    background: #292524; color: #fafaf9; border: none; border-radius: 0.5rem;
    padding: 0.5rem 0.75rem; font-size: 0.75rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); font-family: 'Inter', system-ui, sans-serif;
}
.admin-fab:hover { background: #44403c; }
.admin-fab-gloss { right: 1rem; }
.admin-fab-cat { right: 8.5rem; }

/* Tag picker in comment editor */
.tag-picker { padding: 0.5rem 0; }
.tag-picker-label { font-size: 0.75rem; font-weight: 600; color: #78716c; display: block; margin-bottom: 0.25rem; }
.tag-picker-list { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tag-picker-item {
    display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem;
    padding: 0.25rem 0.5rem; border: 1px solid #e7e5e4; border-radius: 1rem; cursor: pointer;
    transition: background 0.1s;
}
.tag-picker-item:has(input:checked) { background: #f5f5f4; border-color: #a8a29e; }
.tag-picker-item input { width: 0; height: 0; opacity: 0; position: absolute; }
.tag-picker-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tag-internal { border-style: dashed; }
.glossary-overlay {
    position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.5);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 2rem; overflow-y: auto;
}
.glossary-dialog {
    background: #fff; border-radius: 0.75rem; max-width: 560px; width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15); font-family: 'Inter', system-ui, sans-serif;
}
.glossary-dialog-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; border-bottom: 1px solid #e7e5e4;
}
.glossary-dialog-header h3 { margin: 0; font-size: 1rem; }
.glossary-dialog-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #78716c; }
.glossary-form { padding: 1rem 1.25rem; border-bottom: 1px solid #e7e5e4; }
.glossary-form .form-input, .glossary-form .form-textarea { width: 100%; margin-bottom: 0.5rem; }
.glossary-form-row { display: flex; gap: 0.5rem; align-items: center; }
.glossary-form-row input[type="color"] { width: 2.5rem; height: 2.25rem; border: 1px solid #d6d3d1; border-radius: 0.375rem; padding: 2px; cursor: pointer; }
.glossary-list { max-height: 50vh; overflow-y: auto; }
.glossary-item { padding: 0.75rem 1.25rem; border-bottom: 1px solid #f5f5f4; }
.glossary-item:last-child { border-bottom: none; }
.glossary-item-header { font-size: 0.875rem; }
.glossary-item-strong { color: #a8a29e; font-size: 0.75rem; }
.glossary-item-variants { color: #78716c; font-size: 0.75rem; margin-top: 0.125rem; }
.glossary-item-def { font-size: 0.8125rem; margin-top: 0.25rem; color: #44403c; }
.glossary-item-actions { margin-top: 0.375rem; }

/* Interlinear display */
.interlinear-row {
    display: none; padding: 0.5rem 0 0.75rem;
    border-bottom: 1px solid #f0eeec;
    overflow-x: auto;
}
.interlinear-active .interlinear-row { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.interlinear-word {
    display: flex; flex-direction: column; align-items: center;
    padding: 0.25rem 0.375rem; border-radius: 4px;
    transition: background 0.15s; cursor: default; min-width: 2.5rem;
}
.interlinear-word:hover { background: #eef2ff; }
.interlinear-original {
    font-size: 1.1em; font-family: 'Lora', Georgia, serif;
    color: #1c1917; direction: auto; unicode-bidi: plaintext;
}
.interlinear-translit {
    font-size: 0.65rem; color: #a8a29e; font-style: italic;
    font-family: 'Inter', system-ui, sans-serif;
}
.interlinear-gloss {
    font-size: 0.7rem; color: #6366f1; font-weight: 500;
    font-family: 'Inter', system-ui, sans-serif;
    max-width: 6rem; text-align: center; line-height: 1.2;
}
.interlinear-strong {
    font-size: 0.55rem; color: #a78bfa; font-weight: 500;
    font-family: 'Inter', system-ui, sans-serif;
    opacity: 0.7; transition: opacity 0.15s;
}
.interlinear-word:hover .interlinear-strong { opacity: 1; }

/* Strong's Popup */
.strongs-popup {
    position: absolute; z-index: 60; background: #fff;
    border: 1px solid #e7e5e4; border-radius: 0.625rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15); padding: 1rem;
    min-width: 14rem; max-width: 20rem;
    font-family: 'Inter', system-ui, sans-serif;
}
.strongs-popup-header {
    display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
}
.strongs-popup-num {
    font-weight: 700; font-size: 0.9375rem; color: #6366f1;
}
.strongs-popup-lang {
    font-size: 0.65rem; color: #a8a29e; background: #f5f5f4;
    padding: 0.1rem 0.4rem; border-radius: 4px;
}
.strongs-popup-close {
    margin-left: auto; font-size: 1.25rem; color: #a8a29e; line-height: 1; padding: 2px;
}
.strongs-popup-close:hover { color: #1c1917; }
.strongs-popup-original {
    font-size: 1.5rem; font-family: 'Lora', Georgia, serif;
    color: #1c1917; text-align: center; padding: 0.375rem 0;
    direction: auto; unicode-bidi: plaintext;
}
.strongs-popup-lemma {
    font-size: 0.875rem; color: #1c1917; text-align: center; margin-bottom: 0.25rem;
    direction: auto; unicode-bidi: plaintext;
}
.strongs-popup-translit { color: #a8a29e; font-style: italic; font-size: 0.8125rem; }
.strongs-popup-gloss {
    font-size: 0.875rem; font-weight: 600; color: #6366f1;
    text-align: center; padding: 0.25rem 0; border-top: 1px solid #f5f5f4;
}
.strongs-popup-gloss-en {
    font-size: 0.75rem; color: #a8a29e;
    text-align: center; padding-bottom: 0.25rem;
}
.strongs-popup-def {
    font-size: 0.8125rem; color: #57534e; padding: 0.375rem 0;
    border-top: 1px solid #f5f5f4; line-height: 1.4;
}
.strongs-popup-kjv {
    font-size: 0.8125rem; color: #44403c; padding: 0.375rem 0;
    border-top: 1px solid #f5f5f4; line-height: 1.4;
}
.strongs-popup-deriv {
    font-size: 0.75rem; color: #a8a29e; font-style: italic;
    padding: 0.25rem 0; border-top: 1px solid #f5f5f4;
}
.strongs-popup-morph {
    font-size: 0.7rem; color: #a8a29e; padding-top: 0.25rem;
    border-top: 1px solid #f5f5f4; font-family: monospace;
}
.interlinear-word-active { background: #e0e7ff; border-radius: 4px; }

.interlinear-morph {
    font-size: 0.55rem; color: #d6d3d1;
    font-family: 'Inter', system-ui, sans-serif;
}
.interlinear-empty {
    display: none; padding: 0.375rem 0; font-size: 0.75rem;
    color: #d6d3d1; font-style: italic;
    font-family: 'Inter', system-ui, sans-serif;
}
.interlinear-active .interlinear-empty { display: block; }
.interlinear-loading {
    font-size: 0.75rem; color: #a8a29e; padding: 0.5rem 0;
    font-family: 'Inter', system-ui, sans-serif;
}

/* Comment colors */
.comment-bg-1 { background-color: rgba(254,243,199,0.6); }
.comment-bg-2 { background-color: rgba(219,234,254,0.6); }
.comment-bg-3 { background-color: rgba(220,252,231,0.6); }
.comment-bg-4 { background-color: rgba(252,231,243,0.6); }
.comment-bg-5 { background-color: rgba(224,231,255,0.6); }
.comment-bg-6 { background-color: rgba(255,237,213,0.6); }
.comment-bg-7 { background-color: rgba(243,232,255,0.6); }
.comment-bg-8 { background-color: rgba(204,251,241,0.6); }

/* === Comment Accordion === */
.comment-accordion {
    display: block; margin: 0.75rem 0; border-radius: 0.5rem;
    border: 1px solid #e7e5e4; overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif; font-size: 0.9375rem; line-height: 1.5;
}
.accordion-trigger {
    width: 100%; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.5rem;
    text-align: left; transition: background 0.15s;
}
.accordion-trigger:hover { background: rgba(0,0,0,0.03); }
.accordion-title { font-weight: 600; flex: 1; font-size: 0.875rem; }
.accordion-range { font-size: 0.75rem; color: #a8a29e; }
.accordion-chevron { transition: transform 0.2s; flex-shrink: 0; color: #a8a29e; }
.comment-accordion.open .accordion-chevron { transform: rotate(180deg); }
.accordion-content { padding: 0 1rem 1rem; }
.comment-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(0,0,0,0.08); }
.btn-sm { padding: 0.25rem 0.625rem; font-size: 0.75rem; }

/* === Prose (Markdown) === */
.prose-comment h1, .prose-comment h2, .prose-comment h3 {
    font-family: 'Inter', system-ui, sans-serif; font-weight: 700;
    margin-top: 1.2em; margin-bottom: 0.4em;
}
.prose-comment h1 { font-size: 1.4em; }
.prose-comment h2 { font-size: 1.2em; }
.prose-comment h3 { font-size: 1.05em; }
.prose-comment p { margin-bottom: 0.75em; }
.prose-comment blockquote {
    border-left: 3px solid #6366f1; padding-left: 1em;
    color: #57534e; font-style: italic; margin: 0.75em 0;
}
.prose-comment ul, .prose-comment ol { padding-left: 1.5em; margin-bottom: 0.75em; }
.prose-comment li { margin-bottom: 0.25em; }
.prose-comment code { background: #f5f5f4; padding: 0.15em 0.35em; border-radius: 3px; font-size: 0.9em; }
.prose-comment a { color: #6366f1; text-decoration: underline; }

/* Tags */
.comment-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.75rem; }
.tag-badge {
    font-size: 0.7rem; font-weight: 500; padding: 0.2rem 0.5rem;
    border-radius: 9999px; display: inline-block;
}

/* === Parallels Panel === */
.parallels-panel {
    position: fixed; top: 0; right: 0; width: 22rem; height: 100vh;
    background: #fff; border-left: 1px solid #e7e5e4;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08); z-index: 50;
    transform: translateX(100%); transition: transform 0.3s ease;
    display: flex; flex-direction: column; overflow: hidden;
}
.parallels-panel.open { transform: translateX(0); }
.parallels-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem; border-bottom: 1px solid #e7e5e4;
}
.parallels-header h3 { font-size: 0.9375rem; font-weight: 600; }
.parallels-close { font-size: 1.5rem; color: #a8a29e; padding: 4px; line-height: 1; }
.parallels-close:hover { color: #1c1917; }
.parallels-content { flex: 1; overflow-y: auto; padding: 1rem; }
.parallel-item {
    padding: 0.75rem; border-radius: 0.5rem; margin-bottom: 0.5rem;
    border: 1px solid #f5f5f4; transition: background 0.15s;
}
.parallel-item:hover { background: #fafaf9; }
.parallel-ref { font-weight: 600; font-size: 0.8125rem; color: #6366f1; margin-bottom: 0.25rem; }
.parallel-ref a { color: inherit; }
.parallel-ref a:hover { text-decoration: underline; }
.parallel-text { font-family: 'Lora', Georgia, serif; font-size: 0.875rem; color: #57534e; line-height: 1.6; }
.parallel-score { font-size: 0.7rem; color: #a8a29e; margin-top: 0.25rem; }
.parallel-item.parallel-manual {
    border: 2px solid #818cf8; background: #eef2ff;
}
.parallel-manual-badge {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    background: #6366f1; color: #fff; padding: 0.1rem 0.4rem;
    border-radius: 9999px; margin-left: 0.375rem; vertical-align: middle;
}
.parallel-delete-btn {
    font-size: 0.7rem; color: #a8a29e; margin-left: auto; padding: 2px 6px;
    border-radius: 4px; transition: all 0.15s;
}
.parallel-delete-btn:hover { color: #dc2626; background: #fee2e2; }
.parallel-ref-row { display: flex; align-items: center; }
.parallels-add-section { padding: 0.75rem 0; border-top: 1px solid #e7e5e4; margin-top: 0.5rem; }
.parallels-add-btn {
    width: 100%; padding: 0.5rem; border-radius: 0.375rem;
    font-size: 0.8125rem; font-weight: 500; color: #6366f1;
    border: 1px dashed #c7d2fe; background: #fafafe;
    transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 0.375rem;
}
.parallels-add-btn:hover { background: #eef2ff; border-color: #6366f1; }
.parallels-add-form { padding: 0.75rem 0; }
.parallels-add-form select {
    padding: 0.375rem 0.5rem; border: 1px solid #d6d3d1;
    border-radius: 0.375rem; font-size: 0.8125rem; font-family: inherit;
    background: #fff;
}
.parallels-add-form .add-row { display: flex; gap: 0.375rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
.parallels-loading { text-align: center; color: #a8a29e; padding: 2rem; }

/* === Search Overlay === */
.search-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
    display: flex; align-items: flex-start; justify-content: center; padding-top: 15vh;
}
.search-dialog {
    background: #fff; border-radius: 0.75rem; width: 36rem; max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); overflow: hidden;
}
.search-input {
    width: 100%; padding: 1rem 1.25rem; border: none; outline: none;
    font-size: 1rem; font-family: 'Inter', system-ui, sans-serif;
    border-bottom: 1px solid #e7e5e4;
}
.search-results { max-height: 50vh; overflow-y: auto; }
.search-result-item {
    display: block; padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f5f5f4; transition: background 0.1s;
    color: inherit;
}
.search-result-item:hover { background: #eef2ff; }
.search-result-ref { font-weight: 600; font-size: 0.8125rem; color: #6366f1; }
.search-result-text { font-size: 0.8125rem; color: #57534e; margin-top: 0.125rem; }
.search-footer { padding: 0.5rem 1.25rem; font-size: 0.75rem; color: #a8a29e; border-top: 1px solid #e7e5e4; }
.search-empty { padding: 2rem; text-align: center; color: #a8a29e; }

/* === Pages === */
.page-container { max-width: 40rem; margin: 0 auto; padding: 3rem 1rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: #1c1917; margin-bottom: 1.5rem; }
.accent { color: #6366f1; }
.about-footer { font-size: 0.875rem; color: #a8a29e; padding-top: 1rem; border-top: 1px solid #e7e5e4; margin-top: 1.5rem; }

/* === Admin === */
.admin-layout { display: flex; min-height: calc(100vh - 52px); }
.admin-sidebar {
    width: 14rem; background: #fff; border-right: 1px solid #e7e5e4; padding: 1.5rem 1rem;
    display: flex; flex-direction: column; gap: 0.25rem;
}
.admin-sidebar a {
    display: block; padding: 0.5rem 0.75rem; border-radius: 0.375rem;
    font-size: 0.875rem; color: #57534e; transition: all 0.1s;
}
.admin-sidebar a:hover { background: #f5f5f4; color: #1c1917; }
.admin-sidebar a.active { background: #eef2ff; color: #4338ca; font-weight: 500; }
.admin-content { flex: 1; padding: 2rem; }
.admin-card { background: #fff; border: 1px solid #e7e5e4; border-radius: 0.5rem; padding: 1.5rem; margin-bottom: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; padding: 0.75rem; border-bottom: 2px solid #e7e5e4; font-weight: 600; color: #a8a29e; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-table td { padding: 0.75rem; border-bottom: 1px solid #f5f5f4; }
.admin-table tr:hover td { background: #fafaf9; }
.btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; transition: all 0.15s; }
.btn-primary { background: #6366f1; color: #fff; }
.btn-primary:hover { background: #4f46e5; }
.btn-secondary { background: #f5f5f4; color: #1c1917; }
.btn-secondary:hover { background: #e7e5e4; }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: #57534e; margin-bottom: 0.375rem; }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d6d3d1;
    border-radius: 0.375rem; font-size: 0.875rem; font-family: inherit;
    transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.form-textarea { min-height: 12rem; resize: vertical; font-family: 'Courier New', monospace; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; }
.stat-card { background: #fff; border: 1px solid #e7e5e4; border-radius: 0.5rem; padding: 1.25rem; text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; color: #6366f1; }
.stat-label { font-size: 0.8125rem; color: #a8a29e; margin-top: 0.25rem; }

/* === Admin: Inline Editor === */
.floating-comment-btn {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 45;
    background: #6366f1; color: #fff; padding: 0.75rem 1.25rem;
    border-radius: 2rem; font-size: 0.875rem; font-weight: 600;
    box-shadow: 0 4px 20px rgba(99,102,241,0.4);
    display: flex; align-items: center; gap: 0.5rem;
    transition: transform 0.15s, box-shadow 0.15s;
}
.floating-comment-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(99,102,241,0.5); }
.inline-editor {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: #fff; border-top: 2px solid #6366f1;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.12);
    padding: 1rem 1.5rem 1.5rem; max-height: 60vh; overflow-y: auto;
}
.inline-editor-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem;
}
.inline-editor-label { font-weight: 600; font-size: 0.9375rem; color: #6366f1; }
.inline-editor-close { font-size: 1.5rem; color: #a8a29e; padding: 4px; line-height: 1; }
.inline-editor-close:hover { color: #1c1917; }
.inline-editor .form-input { margin-bottom: 0.5rem; }
.inline-editor .form-textarea { margin-bottom: 0.75rem; }

/* WYSIWYG Toolbar */
.wysiwyg-toolbar {
    display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
    padding: 0.375rem 0.5rem; background: #f5f5f4;
    border: 1px solid #d6d3d1; border-bottom: none;
    border-radius: 0.375rem 0.375rem 0 0;
}
.wysiwyg-btn {
    width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center;
    border-radius: 4px; font-size: 0.8125rem; color: #57534e;
    transition: all 0.1s; cursor: pointer;
}
.wysiwyg-btn:hover { background: #e7e5e4; color: #1c1917; }
.wysiwyg-upload-label { cursor: pointer; }
.wysiwyg-sep { width: 1px; height: 1.25rem; background: #d6d3d1; margin: 0 0.25rem; }
.wysiwyg-mode-btn { font-size: 0.65rem; font-weight: 700; opacity: 0.5; }
.wysiwyg-mode-btn.active { opacity: 1; color: #6366f1; }

/* WYSIWYG Content Area */
.wysiwyg-editor {
    min-height: 10rem; max-height: 30vh; overflow-y: auto;
    padding: 0.75rem; border: 1px solid #d6d3d1;
    border-radius: 0 0 0.375rem 0.375rem;
    font-size: 0.9375rem; line-height: 1.6;
    outline: none; margin-bottom: 0.75rem; background: #fff;
}
.wysiwyg-editor:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.wysiwyg-editor:empty::before {
    content: 'Kommentar schreiben...'; color: #a8a29e; pointer-events: none;
}
.wysiwyg-editor img { max-width: 100%; height: auto; border-radius: 4px; margin: 0.5rem 0; }
.wysiwyg-editor blockquote {
    border-left: 3px solid #6366f1; padding-left: 1em;
    color: #57534e; font-style: italic; margin: 0.5em 0;
}
.wysiwyg-uploading { opacity: 0.5; outline: 2px dashed #6366f1; }
.inline-editor-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Admin mode: verse selection cursor */
.is-admin .verse { cursor: pointer; border-radius: 2px; padding: 1px 2px; margin: -1px -2px; transition: background 0.15s; }
.is-admin .verse:hover { background: #e0e7ff; }
.is-admin .verse.verse-selected { background: #c7d2fe; }

/* Text selection highlight for comments */
.verse-text-selected { background: #a5b4fc; border-radius: 2px; }

/* === Responsive === */
@media (max-width: 640px) {
    .site-nav { display: none; }
    .mobile-menu-btn { display: block; }
    .site-logo-sub { display: none; }
    .book-panel { width: 18rem; }
    .chapter-grid { grid-template-columns: repeat(5, 1fr); }
    .search-trigger kbd { display: none; }
    .bible-text { font-size: 1rem; padding: 1rem; }
    .parallels-panel { width: 100vw; }
    .admin-sidebar { display: none; }
    .admin-content { padding: 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 641px) {
    .site-header-inner { padding: 0.75rem 2rem; }
    .nav-header-inner { padding: 0.625rem 2rem; }
    .bible-text { padding: 1.5rem 2rem; }
    .chapter-grid { grid-template-columns: repeat(8, 1fr); }
}
