/* ══════════════════════════════════════════════
   LIBRARY — Knihovna pro seniory
   Calm reading experience, large text, TTS ready
   ══════════════════════════════════════════════ */

.lib-module {
    max-width: 700px;
    margin: 0 auto;
    padding: 16px;
}
.lib-module h2 { color: #2d3748; margin: 0 0 8px; font-size: 1.3rem; }
.lib-subtitle { color: #718096; margin: 0 0 20px; font-size: 0.95rem; }

/* Font size control */
.lib-font-ctrl {
    display: flex; align-items: center; gap: 10px;
    background: #f7fafc; border-radius: 12px; padding: 10px 16px;
    margin-bottom: 20px; font-size: 0.9rem; color: #4a5568;
}
.lib-font-ctrl button {
    width: 36px; height: 36px; border-radius: 10px;
    border: 1.5px solid #e2e8f0; background: white;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    color: #2d3748; transition: all 0.2s;
}
.lib-font-ctrl button:hover { border-color: #5BA8A0; background: #f0fdfa; }

/* Back button */
.lib-back {
    background: none; border: none; color: #5BA8A0;
    font-size: 1rem; cursor: pointer; padding: 0;
    margin-bottom: 16px; font-weight: 600;
}
.lib-back:hover { text-decoration: underline; }

/* Category cards */
.lib-categories { display: flex; flex-direction: column; gap: 10px; }
.lib-cat-card {
    display: flex; align-items: center; gap: 14px;
    padding: 18px 20px; background: white;
    border: 1.5px solid #e2e8f0; border-radius: 16px;
    cursor: pointer; transition: all 0.2s;
    text-align: left; width: 100%;
    -webkit-tap-highlight-color: transparent;
}
.lib-cat-card:hover {
    border-color: #5BA8A0; transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(91,168,160,0.15);
}
.lib-cat-card:active { transform: scale(0.98); }
.lib-cat-icon { font-size: 2rem; flex-shrink: 0; }
.lib-cat-info { flex: 1; }
.lib-cat-info strong { display: block; font-size: 1.05rem; color: #2d3748; }
.lib-cat-info span { font-size: 0.82rem; color: #a0aec0; }
.lib-cat-arrow { font-size: 1.5rem; color: #cbd5e0; flex-shrink: 0; }

/* Item list */
.lib-items { display: flex; flex-direction: column; gap: 8px; }
.lib-item-card {
    display: flex; flex-direction: column; gap: 4px;
    padding: 16px 20px; background: white;
    border: 1.5px solid #e2e8f0; border-radius: 14px;
    cursor: pointer; transition: all 0.2s;
    text-align: left; width: 100%;
}
.lib-item-card:hover { border-color: #5BA8A0; background: #f0fdfa; }
.lib-item-card:active { transform: scale(0.98); }
.lib-item-card strong { font-size: 1rem; color: #2d3748; }
.lib-author { font-size: 0.82rem; color: #718096; font-style: italic; }

/* Reading view */
.lib-reading { background: white; border-radius: 20px; padding: 28px; border: 1.5px solid #e2e8f0; }
.lib-reading h2 { font-size: 1.3rem; color: #2d3748; margin-bottom: 4px; }
.lib-author-line { color: #718096; font-style: italic; margin: 0 0 16px; font-size: 0.9rem; }

.lib-controls {
    display: flex; gap: 10px; margin-bottom: 20px;
}
.lib-btn-read {
    padding: 12px 20px; background: #5BA8A0; color: white;
    border: none; border-radius: 12px; font-size: 1rem;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.lib-btn-read:hover { background: #4a9990; }
.lib-btn-stop {
    padding: 12px 16px; background: white; color: #718096;
    border: 1.5px solid #e2e8f0; border-radius: 12px;
    font-size: 1rem; cursor: pointer;
}
.lib-btn-stop:hover { border-color: #fc8181; color: #e53e3e; }

.lib-text {
    font-size: 18px; line-height: 1.8; color: #2d3748;
    white-space: pre-line; font-family: Georgia, 'Times New Roman', serif;
}

/* Mobile */
@media (max-width: 480px) {
    .lib-module { padding: 12px; }
    .lib-reading { padding: 20px 16px; }
    .lib-cat-card { padding: 14px 16px; }
    .lib-controls { flex-direction: column; }
}
