/*
 * My LMS — Frontend Styles
 * Minimal, clean styles that work alongside any WordPress theme.
 * All classes are prefixed with .my-lms- to avoid conflicts.
 */

/* ── WRAPPER ──────────────────────────────────────────────────────────────── */
.my-lms-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* ── BUTTONS ──────────────────────────────────────────────────────────────── */
.my-lms-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.15s, color 0.15s;
}
.my-lms-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.my-lms-btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.my-lms-btn-outline {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
}
.my-lms-btn-outline:hover { background: #eff6ff; }

/* ── NOTICES ──────────────────────────────────────────────────────────────── */
.my-lms-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 14px;
}
.my-lms-notice-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── COURSE HERO ──────────────────────────────────────────────────────────── */
.my-lms-course-hero {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 40px;
}
.my-lms-course-thumbnail { flex: 0 0 340px; }
.my-lms-course-thumbnail img { width: 100%; border-radius: 10px; }
.my-lms-course-header { flex: 1; }
.my-lms-course-title { font-size: 28px; margin: 0 0 12px; }
.my-lms-course-excerpt { color: #555; margin-bottom: 16px; }
.my-lms-course-meta { display: flex; gap: 16px; margin-bottom: 20px; color: #666; font-size: 14px; }
.my-lms-course-meta span::before { margin-right: 4px; }

/* ── CURRICULUM ───────────────────────────────────────────────────────────── */
.my-lms-curriculum h2 { font-size: 22px; margin-bottom: 16px; }
.my-lms-section { border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.my-lms-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.my-lms-section-header h3 { margin: 0; font-size: 15px; }
.my-lms-section-count { font-size: 13px; color: #9ca3af; }
.my-lms-lesson-list { list-style: none; margin: 0; padding: 0; }
.my-lms-lesson-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}
.my-lms-lesson-item:last-child { border-bottom: none; }
.my-lms-lesson-item.locked { color: #9ca3af; }
.my-lms-lesson-item a { text-decoration: none; color: #1e40af; }
.my-lms-lesson-item a:hover { text-decoration: underline; }
.my-lms-lesson-title { flex: 1; }
.my-lms-lesson-duration { font-size: 12px; color: #9ca3af; }
.my-lms-lock { font-size: 12px; }

/* ── COURSE GRID (archive) ────────────────────────────────────────────────── */
.my-lms-archive-title { font-size: 28px; margin-bottom: 28px; }
.my-lms-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.my-lms-course-card { border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
.my-lms-card-thumbnail img { width: 100%; display: block; }
.my-lms-card-body { padding: 16px; }
.my-lms-card-title { font-size: 17px; margin: 0 0 8px; }
.my-lms-card-title a { text-decoration: none; color: inherit; }
.my-lms-card-excerpt { font-size: 14px; color: #555; margin-bottom: 12px; }
.my-lms-card-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; font-size: 13px; color: #666; }
.my-lms-badge { padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.my-lms-badge-enrolled { background: #dcfce7; color: #166534; }

/* ── LESSON PAGE ──────────────────────────────────────────────────────────── */
.my-lms-lesson-wrap { display: flex; gap: 32px; align-items: flex-start; }
.my-lms-lesson-sidebar {
    flex: 0 0 260px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    position: sticky;
    top: 24px;
    max-height: 80vh;
    overflow-y: auto;
}
.my-lms-sidebar-header {
    padding: 12px 16px;
    background: #1e40af;
    font-weight: 600;
}
.my-lms-sidebar-header a { color: #fff; text-decoration: none; font-size: 14px; }
.my-lms-sidebar-section { border-bottom: 1px solid #f3f4f6; }
.my-lms-sidebar-section-title { margin: 0; padding: 10px 16px 4px; font-size: 12px; font-weight: 700; color: #9ca3af; text-transform: uppercase; }
.my-lms-sidebar-section ul { list-style: none; margin: 0; padding: 0 0 8px; }
.my-lms-sidebar-section li a { display: block; padding: 6px 16px; font-size: 13px; text-decoration: none; color: #374151; }
.my-lms-sidebar-section li a:hover { background: #f3f4f6; }
.my-lms-sidebar-section li.active a { background: #eff6ff; color: #1d4ed8; font-weight: 600; }
.my-lms-lesson-main { flex: 1; min-width: 0; }
.my-lms-lesson-title { font-size: 26px; margin-bottom: 6px; }
.my-lms-lesson-meta { color: #9ca3af; font-size: 14px; margin-bottom: 20px; }

/* ── VIDEO ────────────────────────────────────────────────────────────────── */
.my-lms-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    margin-bottom: 28px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.my-lms-video-wrapper iframe,
.my-lms-video-wrapper video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ── DOWNLOAD BOX ─────────────────────────────────────────────────────────── */
.my-lms-download-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 24px 0;
}

/* ── LESSON NAV ───────────────────────────────────────────────────────────── */
.my-lms-lesson-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .my-lms-course-hero { flex-direction: column; }
    .my-lms-course-thumbnail { flex: unset; width: 100%; }
    .my-lms-lesson-wrap { flex-direction: column; }
    .my-lms-lesson-sidebar { position: static; max-height: none; width: 100%; flex: unset; }
}

/* ── TEST PAGE ────────────────────────────────────────────────────────────── */
.my-lms-test-header { margin-bottom: 28px; }
.my-lms-back-link { font-size: 14px; color: #2563eb; text-decoration: none; display: inline-block; margin-bottom: 10px; }
.my-lms-back-link:hover { text-decoration: underline; }
.my-lms-test-meta { display: flex; gap: 20px; font-size: 14px; color: #666; margin-top: 8px; }

/* Timer */
.my-lms-timer {
    background: #1e40af;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

/* Questions */
.my-lms-questions { display: flex; flex-direction: column; gap: 24px; margin-bottom: 32px; }
.my-lms-question-block { border: 1px solid #e5e7eb; border-radius: 8px; padding: 18px 20px; background: #fafafa; }
.my-lms-question-text { font-size: 16px; font-weight: 500; margin: 0 0 14px; }
.my-lms-answer-choices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.my-lms-answer-choices li label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 8px 12px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff; transition: background 0.1s; }
.my-lms-answer-choices li label:hover { background: #eff6ff; border-color: #bfdbfe; }

/* Result */
.my-lms-test-result { border-radius: 12px; padding: 24px 28px; margin-bottom: 32px; display: flex; align-items: center; gap: 24px; }
.result-passed { background: #f0fdf4; border: 2px solid #86efac; }
.result-failed  { background: #fff7ed; border: 2px solid #fed7aa; }
.my-lms-score-circle { text-align: center; }
.my-lms-score-number { display: block; font-size: 42px; font-weight: 800; line-height: 1; }
.my-lms-score-label  { font-size: 15px; font-weight: 600; }
.result-passed .my-lms-score-number { color: #16a34a; }
.result-failed  .my-lms-score-number { color: #ea580c; }

/* Review */
.my-lms-test-review h2 { font-size: 20px; margin-bottom: 16px; }
.my-lms-review-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px 18px; margin-bottom: 12px; }
.review-correct { border-color: #86efac; background: #f0fdf4; }
.review-wrong   { border-color: #fca5a5; background: #fff5f5; }
.my-lms-review-question { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; margin: 0 0 10px; }
.my-lms-review-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.review-correct .my-lms-review-badge { background: #dcfce7; color: #166534; }
.review-wrong   .my-lms-review-badge { background: #fee2e2; color: #991b1b; }
.my-lms-review-choices { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.my-lms-review-choices li { padding: 5px 10px; border-radius: 5px; }
.choice-correct { background: #dcfce7; color: #166534; font-weight: 600; }
.choice-selected-wrong { background: #fee2e2; color: #991b1b; }
.my-lms-review-explanation { font-size: 13px; color: #555; background: #fffbeb; border-left: 3px solid #fbbf24; padding: 6px 10px; border-radius: 0 4px 4px 0; margin-top: 8px; }
.my-lms-test-submit { padding-top: 8px; }

/* ── CURRICULUM BADGES (quiz/test in lesson list) ─────────────────────────── */
.my-lms-item-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
}
.badge-quiz { background: #fef9c3; color: #854d0e; }
.badge-test { background: #fce7f3; color: #9d174d; }
.my-lms-test-row { border-top: 1px dashed #e5e7eb; margin-top: 4px; padding-top: 8px; }

/* ══ NOTES PANEL (frontend) ══════════════════════════════════════════════════ */

.my-lms-notes-panel {
    margin-top: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}
.my-lms-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}
.my-lms-notes-header h3 { margin: 0; font-size: 16px; }

.my-lms-new-note-form { padding: 14px 18px; border-bottom: 1px solid #e5e7eb; background: #fffbeb; }
.my-lms-note-textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.my-lms-note-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.my-lms-visibility-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    color: #374151;
}

/* Notes list */
.my-lms-notes-list { padding: 12px 18px; }
.my-lms-notes-loading { color: #9ca3af; font-size: 13px; font-style: italic; }

.my-lms-note-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
}
.my-lms-note-item.note-shared { border-left: 3px solid #7c3aed; background: #faf5ff; }
.my-lms-note-item.note-private { border-left: 3px solid #6b7280; }

.my-lms-note-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #9ca3af;
}
.my-lms-note-visibility-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
}
.badge-private { background: #f3f4f6; color: #374151; }
.badge-shared  { background: #ede9fe; color: #5b21b6; }

.my-lms-note-content { font-size: 14px; color: #1f2937; line-height: 1.6; white-space: pre-wrap; }
.my-lms-note-actions { margin-top: 8px; display: flex; gap: 8px; }
.my-lms-note-delete-btn {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}
.my-lms-note-delete-btn:hover { text-decoration: underline; }

.my-lms-shared-notes-section { border-top: 1px solid #e5e7eb; padding: 12px 18px; }
.my-lms-shared-notes-heading { font-size: 13px; font-weight: 600; color: #7c3aed; margin: 0 0 10px; }

/* ── UNENROLL ─────────────────────────────────────────────────────────────── */
.my-lms-enrolled-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.my-lms-unenroll-form { display: inline; }
.my-lms-btn-unenroll {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.my-lms-btn-unenroll:hover {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fff5f5;
}
.my-lms-notice-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 10px 16px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
}

/* ══ FEEDBACK WIDGET ═════════════════════════════════════════════════════════ */

/* Floating trigger */
.lms-feedback-trigger {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px 10px 14px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transition: background .15s, transform .15s, box-shadow .15s;
}
.lms-feedback-trigger:hover {
    background: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0,0,0,.3);
}

/* Overlay — centered on screen */
.lms-feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 9100;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal */
.lms-feedback-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,.3);
    animation: lms-modal-in .2s ease;
    box-sizing: border-box;
}
@keyframes lms-modal-in {
    from { opacity:0; transform:translateY(16px) scale(.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

/* All inner content uses consistent 20px side padding */
.lms-feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.lms-feedback-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}
.lms-feedback-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.lms-feedback-close:hover { color: #0f172a; }

.lms-feedback-context-label {
    padding: 8px 20px;
    font-size: 12px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

/* Type buttons — vertical list */
.lms-feedback-types {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px 0;
}
.lms-feedback-type-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}
.lms-feedback-type-btn:hover { border-color: #94a3b8; background: #fff; }
.lms-feedback-type-btn.active { border-color: #2563eb; background: #eff6ff; }
.lms-fb-icon  { font-size: 22px; flex-shrink: 0; }
.lms-fb-text  { display: flex; flex-direction: column; gap: 2px; }
.lms-fb-label { font-size: 13px; font-weight: 700; color: #0f172a; }
.lms-fb-desc  { font-size: 12px; color: #64748b; line-height: 1.4; }

/* Question select — always shown */
.lms-feedback-question-wrap { padding: 14px 20px 0; }
.lms-feedback-question-select {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    box-sizing: border-box;
    cursor: pointer;
}
.lms-feedback-question-select:focus { border-color: #2563eb; outline: none; }

/* Field label */
.lms-feedback-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin: 14px 20px 6px;
}

/* Textarea — full width within padding */
.lms-feedback-textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin: 0;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    resize: vertical;
    min-height: 90px;
    transition: border-color .15s;
    box-sizing: border-box;
}
.lms-feedback-textarea:focus { border-color: #2563eb; outline: none; }

/* Wrap the textarea so padding is applied by the parent */
.lms-feedback-textarea-wrap {
    padding: 0 20px;
}

/* Footer */
.lms-feedback-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 18px;
    margin-top: 10px;
}
.lms-feedback-status {
    font-size: 13px;
    color: #16a34a;
    font-weight: 500;
    flex: 1;
}
.lms-feedback-submit { white-space: nowrap; flex-shrink: 0; }

/* ══ SECURE PDF VIEWER ═══════════════════════════════════════════════════════ */

.lms-pdf-viewer-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 28px;
    background: #1a1a2e;
}

/* Toolbar */
.lms-pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #16213e;
    gap: 12px;
    flex-wrap: wrap;
}
.lms-pdf-toolbar-left,
.lms-pdf-toolbar-center,
.lms-pdf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lms-pdf-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    line-height: 1;
}
.lms-pdf-btn:hover { background: rgba(255,255,255,.2); }
.lms-pdf-btn-text { font-size: 12px; font-family: inherit; padding: 5px 10px; }
.lms-pdf-page-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #cbd5e1;
}
.lms-pdf-page-info input {
    width: 44px;
    text-align: center;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 4px;
    color: #fff;
    padding: 3px 4px;
    font-size: 13px;
    font-family: inherit;
}
.lms-pdf-zoom-label {
    font-size: 12px;
    color: #94a3b8;
    min-width: 38px;
    text-align: center;
}

/* Canvas area */
.lms-pdf-canvas-wrap {
    min-height: 560px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    padding: 20px;
    background: #525659;
    position: relative;
}
#lms-pdf-canvas {
    display: none;
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
    max-width: 100%;
    /* Disable text selection on the canvas */
    user-select: none;
    -webkit-user-select: none;
}

/* Loading spinner */
.lms-pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    font-size: 14px;
}
.lms-pdf-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lms-spin .7s linear infinite;
}
@keyframes lms-spin { to { transform: rotate(360deg); } }

/* Error */
.lms-pdf-error {
    padding: 32px;
    text-align: center;
    color: #fca5a5;
    background: #525659;
}

/* Fullscreen */
.lms-pdf-viewer-wrap:fullscreen .lms-pdf-canvas-wrap {
    min-height: calc(100vh - 52px);
}

/* ══ PDF VIEWER WITH ANNOTATIONS ════════════════════════════════════════════ */

.lms-pdf-outer {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
    margin-bottom: 28px;
}

.lms-pdf-viewer-wrap {
    flex: 1;
    min-width: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px 0 0 10px;
    overflow: visible;
    background: #1a1a2e;
    position: relative;
}
.lms-pdf-sidebar.open ~ .lms-pdf-viewer-wrap,
.lms-pdf-outer:has(.lms-pdf-sidebar.open) .lms-pdf-viewer-wrap {
    border-radius: 10px 0 0 10px;
}

/* Toolbar */
.lms-pdf-toolbar {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    background: #16213e;
    border-radius: 10px 0 0 0;
    gap: 8px;
    flex-wrap: wrap;
}
.lms-pdf-toolbar-left,
.lms-pdf-toolbar-center,
.lms-pdf-toolbar-right {
    display: flex;
    align-items: center;
    gap: 5px;
}
.lms-pdf-toolbar-right { margin-left: auto; }

.lms-pdf-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: #e2e8f0;
    border-radius: 5px;
    padding: 5px 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-family: inherit;
    transition: background .12s;
    line-height: 1;
    white-space: nowrap;
}
.lms-pdf-btn:hover { background: rgba(255,255,255,.22); }
.lms-pdf-btn-text { padding: 5px 10px; }

.lms-pdf-mode-group { display: flex; gap: 3px; }
.lms-pdf-mode-btn.active { background: rgba(255,255,255,.28); border-color: rgba(255,255,255,.4); }

.lms-pdf-colors { display: flex; gap: 4px; align-items: center; }
.lms-pdf-color-btn {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .12s;
    padding: 0;
}
.lms-pdf-color-btn:hover { transform: scale(1.2); }
.lms-pdf-color-btn.active { border-color: #fff; transform: scale(1.15); }

.lms-pdf-page-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #cbd5e1;
}
.lms-pdf-page-info input {
    width: 40px;
    text-align: center;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 4px;
    color: #fff;
    padding: 3px 4px;
    font-size: 12px;
    font-family: inherit;
}
.lms-pdf-zoom-label { font-size: 12px; color: #94a3b8; min-width: 34px; text-align: center; }

/* Canvas area — scrollable in both directions when zoomed */
.lms-pdf-canvas-wrap {
    min-height: 80vh;
    max-height: 90vh;
    overflow: auto;          /* scrollbars appear automatically when content overflows */
    padding: 20px;
    background: #525659;
    border-radius: 0 0 0 10px;
    position: relative;
    /* Use a block layout so the page container can be wider than the wrap
       and horizontal scrolling works correctly */
    display: block;
    text-align: center;      /* centers the page container horizontally */
}

/* Page container — inline-block so text-align:center works,
   and it can grow beyond the wrap width triggering the scrollbar */
.lms-pdf-page-container {
    position: relative;
    display: inline-block;
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
    /* Allow the container to be larger than its parent */
    vertical-align: top;
}
#lms-pdf-canvas {
    display: block;
    position: relative;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
}
#lms-pdf-canvas:not([width]) { display: none; }

/* Text layer — must be above canvas (z-index 2) with pointer-events enabled */
.lms-pdf-text-layer {
    position: absolute;
    top: 0; left: 0;
    overflow: hidden;
    line-height: 1;
    z-index: 2;
    pointer-events: auto;
    /* Text is transparent so canvas shows through */
    color: transparent;
}
/* PDF.js v3 injects spans and divs with class .pdf-text-layer children */
.lms-pdf-text-layer span,
.lms-pdf-text-layer div {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
    pointer-events: auto;
    /* Allow background-color highlights to show through canvas */
    mix-blend-mode: multiply;
    border-radius: 2px;
    transition: background-color .1s;
}
.lms-pdf-text-layer ::selection,
.lms-pdf-text-layer span::selection,
.lms-pdf-text-layer div::selection {
    background: rgba(37, 99, 235, 0.3);
    color: transparent;
}

/* Highlight SVG — only for note indicator dots now
   pointer-events: none at root, children still clickable */
.lms-pdf-highlight-layer {
    position: absolute;
    top: 0; left: 0;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
}
.lms-pdf-highlight-layer rect,
.lms-pdf-highlight-layer circle {
    pointer-events: all;
    cursor: pointer;
}

/* When highlights are hidden, remove background from all highlighted spans */
.lms-pdf-highlights-hidden .lms-pdf-text-layer span {
    background-color: transparent !important;
}

/* Selection popup */
.lms-pdf-selection-popup {
    position: absolute;
    z-index: 200;
    background: #1e293b;
    border-radius: 8px;
    padding: 5px 6px;
    display: flex;
    gap: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
    pointer-events: all;
}
.lms-pdf-popup-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    color: #e2e8f0;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    transition: background .12s;
}
.lms-pdf-popup-btn:hover { background: rgba(255,255,255,.22); }

/* Compose form */
.lms-pdf-compose {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,.25);
    width: min(420px, 90%);
    overflow: hidden;
}
.lms-pdf-compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 8px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}
.lms-pdf-compose-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.lms-pdf-compose-close:hover { color: #0f172a; }
.lms-pdf-compose-citation {
    padding: 6px 14px 0;
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    letter-spacing: .02em;
}
.lms-pdf-compose-quote {
    margin: 6px 14px;
    padding: 6px 10px;
    background: #f1f5f9;
    border-left: 3px solid #94a3b8;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    color: #475569;
    font-style: italic;
}
.lms-editor-toolbar {
    display: flex;
    gap: 2px;
    padding: 6px 10px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    flex-wrap: wrap;
}
.lms-editor-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    color: #374151;
    line-height: 1.4;
    transition: all .1s;
}
.lms-editor-btn:hover { background: #e5e7eb; border-color: #d1d5db; }
.lms-editor-sep { width: 1px; background: #e5e7eb; margin: 2px 2px; display: inline-block; }

.lms-pdf-compose-text {
    display: block;
    width: 100%;
    min-height: 80px;
    max-height: 220px;
    overflow-y: auto;
    padding: 10px 14px;
    border: none;
    border-top: 1px solid #f1f5f9;
    font-family: inherit;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    line-height: 1.6;
    box-sizing: border-box;
}
.lms-pdf-compose-text:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}
.lms-pdf-compose-text h2 { font-size: 16px; font-weight: 600; margin: 6px 0 2px; }
.lms-pdf-compose-text h3 { font-size: 14px; font-weight: 600; margin: 4px 0 2px; }
.lms-pdf-compose-text ul,
.lms-pdf-compose-text ol { padding-left: 20px; margin: 4px 0; }
.lms-pdf-compose-text a { color: #2563eb; text-decoration: underline; }

.lms-pdf-compose-actions {
    padding: 8px 14px 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

/* Spinner + error */
.lms-pdf-loading {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    color: #cbd5e1; font-size: 14px;
}
.lms-pdf-spinner {
    width: 30px; height: 30px;
    border: 3px solid rgba(255,255,255,.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lms-spin .7s linear infinite;
}
.lms-pdf-error {
    padding: 32px; text-align: center; color: #fca5a5; background: #525659;
}

/* ── ANNOTATIONS SIDEBAR ─────────────────────────────────────────────────── */
.lms-pdf-sidebar {
    width: 0;
    overflow: hidden;
    transition: width .25s ease;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: none;
    border-radius: 0 10px 10px 0;
    display: flex;
    flex-direction: column;
    max-height: 620px;
}
.lms-pdf-sidebar.open { width: 300px; overflow: visible; }

.lms-pdf-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 0 10px 0 0;
    flex-shrink: 0;
}
.lms-pdf-sidebar-header h3 { margin: 0; font-size: 14px; font-weight: 700; color: #0f172a; white-space: nowrap; }
.lms-pdf-sidebar-close {
    background: none; border: none; font-size: 18px; color: #94a3b8; cursor: pointer; padding: 0; line-height: 1;
}
.lms-pdf-sidebar-close:hover { color: #0f172a; }

.lms-pdf-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.lms-pdf-sidebar-tab {
    flex: 1;
    padding: 7px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color .12s;
    white-space: nowrap;
}
.lms-pdf-sidebar-tab:hover { color: #374151; }
.lms-pdf-sidebar-tab.active { color: #2563eb; border-bottom-color: #2563eb; }

.lms-pdf-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
}
.lms-pdf-sidebar-empty {
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
    padding: 20px 10px;
    line-height: 1.6;
}
.lms-pdf-sidebar-footer {
    padding: 10px 12px;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}

/* Individual annotation items */
.lms-ann-item {
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 10px 10px 8px;
    margin-bottom: 8px;
    background: #fafafa;
    transition: box-shadow .12s;
}
.lms-ann-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,.06); }

.lms-ann-header {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.lms-ann-type { font-size: 11px; font-weight: 700; color: #374151; white-space: nowrap; display: flex; align-items: center; gap: 3px; }
.lms-ann-color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.lms-ann-citation { font-size: 11px; color: #2563eb; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lms-ann-date { font-size: 10px; color: #9ca3af; white-space: nowrap; }
.lms-ann-goto {
    background: none; border: none; color: #6b7280; cursor: pointer; padding: 1px 3px; line-height: 1;
}
.lms-ann-goto:hover { color: #2563eb; }
.lms-ann-delete {
    background: none; border: none; color: #d1d5db; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px;
}
.lms-ann-delete:hover { color: #dc2626; }
.lms-ann-edit {
    background: none; border: none; color: #94a3b8;
    cursor: pointer; font-size: 11px; padding: 0 3px;
    font-family: inherit; line-height: 1;
}
.lms-ann-edit:hover { color: #2563eb; }

.lms-ann-quote {
    font-size: 12px;
    color: #475569;
    font-style: italic;
    padding: 5px 8px;
    background: #f1f5f9;
    border-left: 2px solid #94a3b8;
    border-radius: 0 3px 3px 0;
    margin-bottom: 5px;
    line-height: 1.5;
}
.lms-ann-content {
    font-size: 13px;
    color: #1f2937;
    line-height: 1.55;
    margin-bottom: 4px;
    white-space: pre-wrap;
}

/* Fullscreen adjustments */
.lms-pdf-outer:fullscreen .lms-pdf-canvas-wrap { min-height: calc(100vh - 52px); }
.lms-pdf-outer:fullscreen .lms-pdf-sidebar { max-height: 100vh; }

@media (max-width: 768px) {
    .lms-pdf-sidebar.open { position: absolute; right: 0; top: 0; z-index: 100; width: 280px; max-height: 100%; border-radius: 0 10px 10px 0; }
    .lms-pdf-toolbar { border-radius: 10px 10px 0 0; }
}

/* ══ DISCUSSION BOARD ════════════════════════════════════════════════════════ */

.lms-disc-login-notice { color: var(--color-text-secondary, #6b7280); font-size:14px; padding:16px 0; }

/* Board wrapper — becomes flex row when panel is open */
.lms-disc-board {
    margin-top: 40px;
    position: relative;
}

/* Header */
.lms-disc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.lms-disc-title { font-size: 20px; font-weight: 600; margin: 0; }

/* Compose form */
.lms-disc-compose { margin-bottom: 20px; }
.lms-disc-compose-inner {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 22px;
    background: #fafafa;
}
.lms-disc-compose-heading { font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.lms-disc-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin: 12px 0 5px;
}
.lms-disc-title-input,
.lms-disc-content-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: inherit;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}
.lms-disc-title-input:focus,
.lms-disc-content-input:focus { border-color: #2563eb; outline: none; }
.lms-disc-content-input { resize: vertical; min-height: 100px; }

/* Thread type selector */
.lms-disc-type-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.lms-disc-type-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all .12s;
}
.lms-disc-type-option input[type="radio"] { display: none; }
.lms-disc-type-option:hover { border-color: #94a3b8; }
.lms-disc-type-option.active { border-color: #2563eb; background: #eff6ff; color: #1e40af; }
.lms-disc-type-icon { font-size: 16px; }

/* Note picker */
.lms-disc-note-picker select {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
}

.lms-disc-compose-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.lms-disc-compose-status { font-size: 13px; }

/* Filter tabs */
.lms-disc-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.lms-disc-filter {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    color: #374151;
    transition: all .12s;
}
.lms-disc-filter:hover { border-color: #94a3b8; }
.lms-disc-filter.active { background: #1e293b; border-color: #1e293b; color: #fff; }

/* Loading / empty */
.lms-disc-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px;
    color: #9ca3af;
    font-size: 14px;
}
.lms-disc-empty {
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
    padding: 24px 0;
}

/* Thread cards */
.lms-disc-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 10px;
    background: #fff;
    cursor: pointer;
    transition: box-shadow .15s, border-color .15s;
}
.lms-disc-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.07); border-color: #d1d5db; }

.lms-disc-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.lms-disc-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #0f172a;
    flex: 1;
}
.lms-disc-card-excerpt {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 10px;
    line-height: 1.55;
}
.lms-disc-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #9ca3af;
    flex-wrap: wrap;
}
.lms-disc-card-admin {
    margin-left: auto;
    display: flex;
    gap: 4px;
}
.lms-disc-card-mod {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    font-family: inherit;
    color: #374151;
}
.lms-disc-card-mod:hover { background: #f3f4f6; }
.lms-disc-card-mod-delete { color: #dc2626 !important; border-color: #fca5a5 !important; }

/* Type + status badges */
.lms-disc-type-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.lms-disc-type-discussion  { background: #dbeafe; color: #1e40af; }
.lms-disc-type-question    { background: #fef9c3; color: #854d0e; }
.lms-disc-type-shared_note { background: #ede9fe; color: #5b21b6; }
.lms-disc-pin-badge  { font-size: 11px; color: #d97706; font-weight: 600; }
.lms-disc-lock-badge { font-size: 11px; color: #dc2626; font-weight: 600; }
.lms-disc-admin-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    background: #dbeafe; color: #1e40af; padding: 1px 5px; border-radius: 6px;
}

/* Thread detail panel */
.lms-disc-thread-panel {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    margin-top: 12px;
    overflow: hidden;
}
.lms-disc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}
.lms-disc-panel-actions { display: flex; gap: 6px; }
.lms-disc-back-btn {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    padding: 0;
}
.lms-disc-back-btn:hover { text-decoration: underline; }
.lms-disc-panel-content { padding: 0 20px 20px; }

/* Thread detail */
.lms-disc-thread-hero { padding: 20px 0 16px; border-bottom: 1px solid #f1f5f9; margin-bottom: 16px; }
.lms-disc-thread-meta-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.lms-disc-thread-title { font-size: 20px; font-weight: 700; margin: 0 0 10px; line-height: 1.3; }
.lms-disc-author-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; flex-wrap: wrap; }
.lms-disc-dot { color: #d1d5db; }
.lms-disc-reply-count { color: #6b7280; }

/* Avatars */
.lms-disc-avatar    { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lms-disc-avatar-sm { width: 26px; height: 26px; }
.lms-disc-avatar-xs { width: 20px; height: 20px; }
.lms-disc-author-name { font-weight: 600; color: #1f2937; }

.lms-disc-thread-body {
    font-size: 15px;
    line-height: 1.7;
    color: #1f2937;
    margin-bottom: 16px;
}
.lms-disc-thread-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
}

/* Like button */
.lms-disc-like-btn {
    background: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    color: #6b7280;
    transition: all .12s;
}
.lms-disc-like-btn:hover { border-color: #f87171; color: #f87171; }
.lms-disc-like-btn.liked { border-color: #f87171; color: #f87171; background: #fff5f5; }

/* Delete button */
.lms-disc-delete-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.lms-disc-delete-btn:hover { color: #dc2626; }

/* Replies */
.lms-disc-replies { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.lms-disc-no-replies { color: #9ca3af; font-size: 14px; font-style: italic; }
.lms-disc-reply {
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    animation: lms-fade-in .25s ease;
}
.lms-disc-reply:last-child { border-bottom: none; }
.lms-disc-reply-nested {
    margin-left: 28px;
    padding-left: 14px;
    border-left: 2px solid #e2e8f0;
}
.lms-disc-reply-new { background: #fffbeb; border-radius: 6px; padding: 14px; margin: 0 -14px 10px; transition: background 1.5s; }
@keyframes lms-fade-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.lms-disc-reply-header { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; flex-wrap: wrap; }
.lms-disc-reply-body { font-size: 14px; line-height: 1.6; color: #1f2937; margin-bottom: 8px; }
.lms-disc-reply-footer { display: flex; align-items: center; gap: 10px; }

.lms-disc-quote-reply-btn {
    background: none; border: none; color: #2563eb; font-size: 12px;
    font-weight: 600; cursor: pointer; padding: 0; font-family: inherit;
}
.lms-disc-quote-reply-btn:hover { text-decoration: underline; }

/* Reply compose */
.lms-disc-reply-compose { border-top: 1px solid #f1f5f9; padding-top: 16px; }
.lms-disc-reply-quote-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #374151;
}
.lms-disc-reply-quote-clear {
    background: none; border: none; font-size: 16px; color: #9ca3af;
    cursor: pointer; padding: 0; line-height: 1; margin-left: auto;
}
.lms-disc-reply-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.lms-disc-reply-textarea {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: inherit;
    background: #fff;
    resize: vertical;
    transition: border-color .15s;
}
.lms-disc-reply-textarea:focus { border-color: #2563eb; outline: none; }
.lms-disc-reply-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; justify-content: flex-end; }
.lms-disc-reply-status { font-size: 13px; }
.lms-disc-locked-notice { color: #9ca3af; font-size: 14px; font-style: italic; margin-top: 16px; }

@media (max-width: 768px) {
    .lms-disc-type-row { flex-direction: column; }
    .lms-disc-reply-nested { margin-left: 12px; padding-left: 10px; }
}

/* ── PDF CITATION + QUOTE IN NOTES PANEL ─────────────────────────────────── */
.my-lms-note-citation {
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 4px;
    letter-spacing: .02em;
}
.my-lms-note-quote {
    font-size: 12px;
    color: #475569;
    font-style: italic;
    padding: 5px 10px;
    background: #f1f5f9;
    border-left: 2px solid #94a3b8;
    border-radius: 0 4px 4px 0;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* ── CITATION LINK (jumps to PDF page) ───────────────────────────────────── */
.my-lms-note-citation-link {
    text-decoration: none;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    transition: color .12s;
}
.my-lms-note-citation-link:hover { color: #1d4ed8; }
.my-lms-note-citation-link:hover .my-lms-note-citation-arrow { opacity: 1; }
.my-lms-note-citation-arrow {
    font-size: 10px;
    font-weight: 400;
    opacity: 0;
    transition: opacity .12s;
    white-space: nowrap;
    background: #dbeafe;
    color: #1e40af;
    padding: 1px 5px;
    border-radius: 4px;
}

/* ── NOTES EXPORT GROUP ───────────────────────────────────────────────────── */
.my-lms-export-group {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}
.my-lms-export-label { color: #6b7280; font-weight: 500; }
.my-lms-notes-export-btn {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background .12s;
}
.my-lms-notes-export-btn:hover { background: #eff6ff; color: #1d4ed8; }
.my-lms-export-sep { color: #d1d5db; }

/* ── PDF LAUNCH BUTTON ───────────────────────────────────────────────────── */
.my-lms-pdf-launch-wrap { margin: 20px 0; }
.my-lms-pdf-launch-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    flex-wrap: wrap;
}
.my-lms-pdf-launch-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.my-lms-pdf-launch-info strong {
    font-size: 15px;
    color: #0f172a;
}
.my-lms-pdf-launch-info span {
    font-size: 13px;
    color: #6b7280;
}
.my-lms-pdf-launch-btn {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* ── NOTES SEARCH + HASHTAGS ─────────────────────────────────────────────── */

/* Search bar */
.my-lms-notes-search-wrap {
    margin-bottom: 12px;
}
.my-lms-notes-search-row {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.my-lms-notes-search-input {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: inherit;
    background: #fff;
    transition: border-color .15s;
    box-sizing: border-box;
}
.my-lms-notes-search-input:focus { border-color: #2563eb; outline: none; }
.my-lms-notes-search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.my-lms-notes-search-clear:hover { color: #374151; }

/* Tag cloud */
.my-lms-notes-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}
.my-lms-tag-pill {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #5b21b6;
    cursor: pointer;
    font-family: inherit;
    transition: all .12s;
    line-height: 1.4;
}
.my-lms-tag-pill:hover { border-color: #7c3aed; background: #ede9fe; }
.my-lms-tag-pill.active { background: #5b21b6; border-color: #5b21b6; color: #fff; }

/* Autocomplete dropdown */
.my-lms-note-textarea-wrap { position: relative; }
.my-lms-tag-autocomplete {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1e293b;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    z-index: 100;
    overflow: hidden;
}
.my-lms-ac-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #e2e8f0;
    cursor: pointer;
    transition: background .1s;
}
.my-lms-ac-item:hover { background: rgba(255,255,255,.12); }

/* Tag pills inside notes */
.my-lms-note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}
.my-lms-note-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid #ede9fe;
    background: #f5f3ff;
    color: #5b21b6;
    cursor: pointer;
    font-family: inherit;
    transition: all .12s;
    line-height: 1.4;
}
.my-lms-note-tag:hover { background: #ede9fe; border-color: #7c3aed; }
.my-lms-note-tag.active { background: #5b21b6; border-color: #5b21b6; color: #fff; }

/* Keyword highlight in search results */
mark.my-lms-note-highlight {
    background: #fef08a;
    color: #713f12;
    border-radius: 2px;
    padding: 0 1px;
    font-style: normal;
}

/* ── NOTE TYPE BADGES (highlight / PDF note) ─────────────────────────────── */
.my-lms-note-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    margin-right: 4px;
}
.my-lms-note-highlight-badge {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.my-lms-note-pdf-badge {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.my-lms-note-color-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.1);
}
/* Highlight notes get a subtle left border matching the highlight color */
.my-lms-note-is-highlight {
    border-left: 3px solid #FFEB3B;
}

/* ── NOTE EDIT BUTTON ────────────────────────────────────────────────────── */
.my-lms-note-edit-btn {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    margin-right: 10px;
}
.my-lms-note-edit-btn:hover { text-decoration: underline; }

/* ── RICH TEXT EDITOR (notes panel + PDF compose) ────────────────────────── */
.my-lms-notes-editor-toolbar {
    display: flex;
    gap: 2px;
    padding: 7px 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
    align-items: center;
}
.my-lms-editor-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    color: #374151;
    line-height: 1.4;
    transition: all .1s;
}
.my-lms-editor-btn:hover { background: #e5e7eb; border-color: #d1d5db; }
.my-lms-editor-sep {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: #e2e8f0;
    margin: 0 3px;
    vertical-align: middle;
}

/* Contenteditable note area */
.my-lms-note-textarea[contenteditable] {
    min-height: 90px;
    max-height: 260px;
    overflow-y: auto;
    padding: 10px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-family: inherit;
    color: inherit;
    background: #fff;
    outline: none;
    line-height: 1.65;
    transition: border-color .15s;
    box-sizing: border-box;
}
.my-lms-note-textarea[contenteditable]:focus { border-color: #2563eb; }
.my-lms-note-textarea[contenteditable]:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}
/* Rich content rendering in notes */
.my-lms-note-content h2 { font-size: 15px; font-weight: 600; margin: 6px 0 3px; }
.my-lms-note-content h3 { font-size: 14px; font-weight: 600; margin: 4px 0 2px; }
.my-lms-note-content ul,
.my-lms-note-content ol { padding-left: 20px; margin: 4px 0; }
.my-lms-note-content li { margin: 2px 0; }
.my-lms-note-content a { color: #2563eb; text-decoration: underline; word-break: break-word; }
.my-lms-note-content a:hover { color: #1d4ed8; }
.my-lms-note-content p { margin: 3px 0; }

/* ══ TEMPLATE SELECTOR ═══════════════════════════════════════════════════════ */

.my-lms-template-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px 0 12px;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 12px;
}
.my-lms-template-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-right: 2px;
}
.my-lms-tpl-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    transition: all .13s;
    line-height: 1.4;
}
.my-lms-tpl-btn:hover { border-color: #6b7280; background: #f3f4f6; }
.my-lms-tpl-btn.my-lms-tpl-active {
    background: #1e40af;
    border-color: #1e40af;
    color: #fff;
}

/* Hide inactive panes */
.my-lms-tpl-pane.my-lms-tpl-hidden { display: none !important; }

/* ══ CORNELL METHOD ══════════════════════════════════════════════════════════ */

.my-lms-cornell-wrap {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.my-lms-cornell-hint {
    padding: 9px 14px;
    font-size: 12px;
    color: #4b5563;
    background: #f0f7ff;
    border-bottom: 1px solid #dbeafe;
    line-height: 1.5;
}
.my-lms-cornell-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid #e2e8f0;
}
@media (max-width: 600px) {
    .my-lms-cornell-grid { grid-template-columns: 1fr; }
}
.my-lms-cornell-col-left {
    border-right: 1px solid #e2e8f0;
}
.my-lms-cornell-col-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    padding: 6px 12px 4px;
    background: #f9fafb;
    border-bottom: 1px solid #f0f0f0;
}
.my-lms-cornell-field {
    min-height: 120px;
    padding: 10px 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: #1f2937;
    line-height: 1.65;
    outline: none;
    box-sizing: border-box;
}
.my-lms-cornell-field:focus { background: #fefce8; }
.my-lms-cornell-field:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    white-space: pre-wrap;
}
.my-lms-cornell-summary-wrap {
    background: #f0fdf4;
}
.my-lms-cornell-summary-wrap .my-lms-cornell-col-label {
    background: #dcfce7;
    border-bottom: 1px solid #bbf7d0;
}
.my-lms-cornell-summary-hint {
    font-weight: 400;
    color: #9ca3af;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
}
.my-lms-cornell-summary { min-height: 80px; }

/* Cornell rendered note (saved, in notes list) */
.lms-cornell-note { font-size: 13.5px; }
.lms-cornell-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    border: 1px solid #e2e8f0;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
    border-bottom: none;
}
.lms-cornell-keywords { border-right: 1px solid #e2e8f0; background: #f9fafb; }
.lms-cornell-zone-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    padding: 5px 10px 4px;
    background: #f0f0f0;
    border-bottom: 1px solid #e2e8f0;
}
.lms-cornell-zone-body { padding: 8px 10px; line-height: 1.6; }
.lms-cornell-summary-zone {
    border: 1px solid #e2e8f0;
    border-top: 2px solid #86efac;
    border-radius: 0 0 6px 6px;
    background: #f0fdf4;
}
.lms-cornell-summary-zone .lms-cornell-zone-label { background: #dcfce7; border-bottom: 1px solid #bbf7d0; }

/* ══ FEYNMAN TECHNIQUE ════════════════════════════════════════════════════════ */

.my-lms-feynman-wrap {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.my-lms-feynman-hint {
    padding: 9px 14px;
    font-size: 12px;
    color: #4b5563;
    background: #faf5ff;
    border-bottom: 1px solid #e9d5ff;
    line-height: 1.5;
}
.my-lms-feynman-step {
    border-bottom: 1px solid #f3f4f6;
}
.my-lms-feynman-step:last-child { border-bottom: none; }
.my-lms-feynman-step-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 8px 14px 5px;
    background: #fafafa;
    border-bottom: 1px dashed #e9ecef;
}
.my-lms-feynman-step-num {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #7c3aed;
    background: #ede9fe;
    padding: 2px 7px;
    border-radius: 8px;
    flex-shrink: 0;
}
.my-lms-feynman-step[data-step="1"] .my-lms-feynman-step-num { background: #dbeafe; color: #1d4ed8; }
.my-lms-feynman-step[data-step="2"] .my-lms-feynman-step-num { background: #d1fae5; color: #065f46; }
.my-lms-feynman-step[data-step="3"] .my-lms-feynman-step-num { background: #fef9c3; color: #854d0e; }
.my-lms-feynman-step[data-step="4"] .my-lms-feynman-step-num { background: #fce7f3; color: #9d174d; }
.my-lms-feynman-step-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.my-lms-feynman-field {
    min-height: 70px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-family: inherit;
    color: #1f2937;
    line-height: 1.65;
    outline: none;
    box-sizing: border-box;
}
.my-lms-feynman-field:focus { background: #fffbeb; }
.my-lms-feynman-field:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    white-space: pre-wrap;
}

/* Feynman rendered note (saved) */
.lms-feynman-note {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 13.5px;
}
.lms-feynman-step-saved { border-bottom: 1px solid #f3f4f6; }
.lms-feynman-step-saved:last-child { border-bottom: none; }
.lms-feynman-step-saved-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #7c3aed;
    background: #f5f3ff;
    padding: 5px 12px;
    border-bottom: 1px solid #ede9fe;
}
.lms-feynman-step-saved-body { padding: 8px 12px; line-height: 1.6; }

/* ══ OUTLINE FORMAT ══════════════════════════════════════════════════════════ */

.my-lms-outline-wrap {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.my-lms-outline-hint {
    padding: 9px 14px;
    font-size: 12px;
    color: #4b5563;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
    line-height: 1.5;
}
.my-lms-outline-title-field {
    display: block;
    padding: 10px 14px 8px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    outline: none;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
    min-height: 38px;
}
.my-lms-outline-title-field:empty:before {
    content: attr(data-placeholder);
    color: #d1d5db;
    font-weight: 400;
    pointer-events: none;
}
.my-lms-outline-title-field:focus { background: #fffbeb; }
.my-lms-outline-list {
    padding: 8px 0;
    min-height: 80px;
}
.my-lms-outline-item {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 3px 14px 3px 4px;
    transition: padding-left .1s;
}
.my-lms-outline-bullet {
    flex-shrink: 0;
    margin-top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #374151;
    display: inline-block;
}
.my-lms-outline-bullet.my-lms-outline-level-0 { background: #1e40af; width: 7px; height: 7px; border-radius: 2px; }
.my-lms-outline-bullet.my-lms-outline-level-1 { background: #374151; width: 6px; height: 6px; border-radius: 50%; }
.my-lms-outline-bullet.my-lms-outline-level-2 { background: #9ca3af; width: 5px; height: 5px; border-radius: 50%; }
.my-lms-outline-bullet.my-lms-outline-level-3 { background: #d1d5db; width: 4px; height: 4px; border-radius: 50%; border: 1px solid #9ca3af; }
.my-lms-outline-bullet.my-lms-outline-level-4 { background: none; width: 8px; height: 1px; background: #d1d5db; margin-top: 10px; border-radius: 0; }
.my-lms-outline-item-text {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.65;
    color: #1f2937;
    outline: none;
    min-height: 22px;
    padding: 1px 0;
}
.my-lms-outline-item-text:empty:before {
    content: attr(data-placeholder);
    color: #d1d5db;
    pointer-events: none;
}
.my-lms-outline-item-text:focus { color: #111827; }
.my-lms-outline-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: #f9fafb;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}
.my-lms-outline-add-btn {
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.my-lms-outline-add-btn:hover { text-decoration: underline; }
.my-lms-outline-help {
    font-size: 11px;
    color: #9ca3af;
}

/* Outline rendered note (saved) */
.lms-outline-note { font-size: 13.5px; }
.lms-outline-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}
.lms-outline-body { line-height: 1.7; }
.lms-outline-item {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin: 2px 0;
}
.lms-outline-bullet {
    flex-shrink: 0;
    margin-top: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #374151;
}
.lms-outline-level-0 { width: 7px; height: 7px; background: #1e40af; border-radius: 2px; }
.lms-outline-level-1 { width: 6px; height: 6px; }
.lms-outline-level-2 { width: 5px; height: 5px; background: #9ca3af; }
.lms-outline-level-3 { width: 4px; height: 4px; background: #d1d5db; border: 1px solid #9ca3af; }
.lms-outline-level-4 { width: 8px; height: 1px; background: #d1d5db; margin-top: 11px; border-radius: 0; }
.lms-outline-text { flex: 1; }

/* ══ PROBLEM FRAMING TEMPLATE ════════════════════════════════════════════════ */

.my-lms-problem-wrap {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.my-lms-problem-hint {
    padding: 9px 14px;
    font-size: 12px;
    color: #4b5563;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
    line-height: 1.5;
}
.my-lms-problem-step {
    border-bottom: 1px solid #f3f4f6;
    transition: opacity .2s;
}
.my-lms-problem-step:last-child { border-bottom: none; }
.my-lms-problem-step.my-lms-problem-locked { opacity: .45; }
.my-lms-problem-step-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px 5px;
    background: #fafafa;
    border-bottom: 1px dashed #e9ecef;
}
.my-lms-problem-step-num {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #c2410c;
    background: #ffedd5;
    padding: 2px 7px;
    border-radius: 8px;
    flex-shrink: 0;
}
.my-lms-problem-step[data-step="1"] .my-lms-problem-step-num { background: #dbeafe; color: #1d4ed8; }
.my-lms-problem-step[data-step="2"] .my-lms-problem-step-num { background: #d1fae5; color: #065f46; }
.my-lms-problem-step[data-step="3"] .my-lms-problem-step-num { background: #fef3c7; color: #92400e; }
.my-lms-problem-step-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    flex: 1;
}
.my-lms-problem-lock-badge {
    font-size: 11px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 8px;
}
.my-lms-problem-field {
    min-height: 70px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-family: inherit;
    color: #1f2937;
    line-height: 1.65;
    outline: none;
    box-sizing: border-box;
}
.my-lms-problem-field:focus { background: #fffbeb; }
.my-lms-problem-field[contenteditable="false"] { background: #f9fafb; cursor: not-allowed; }
.my-lms-problem-field:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    white-space: pre-wrap;
    font-style: italic;
}

/* Problem note rendered (saved state) */
.lms-problem-note { font-size: 13.5px; }
.lms-problem-step-saved {
    border-bottom: 1px solid #f3f4f6;
    padding: 10px 14px;
}
.lms-problem-step-saved:last-child { border-bottom: none; }
.lms-problem-step-saved.lms-problem-step-1 { background: #eff6ff; border-left: 3px solid #3b82f6; }
.lms-problem-step-saved.lms-problem-step-2 { background: #f0fdf4; border-left: 3px solid #22c55e; }
.lms-problem-step-saved.lms-problem-step-3 { background: #fffbeb; border-left: 3px solid #f59e0b; }
.lms-problem-step-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 5px;
}
.lms-problem-step-body { line-height: 1.6; }

/* ══ SCATTER / CONNECT CANVAS ════════════════════════════════════════════════ */

.my-lms-canvas-wrap {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.my-lms-canvas-hint {
    padding: 9px 14px;
    font-size: 12px;
    color: #4b5563;
    background: #f5f3ff;
    border-bottom: 1px solid #ddd6fe;
    line-height: 1.5;
}
.my-lms-canvas-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fafafa;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}
.my-lms-canvas-tool-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 6px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    transition: all .12s;
}
.my-lms-canvas-tool-btn:hover { border-color: #6366f1; color: #4338ca; background: #eef2ff; }
.my-lms-canvas-tool-btn.my-lms-canvas-tool-danger:hover { border-color: #ef4444; color: #dc2626; background: #fef2f2; }
.my-lms-canvas-hint-tip {
    font-size: 11px;
    color: #9ca3af;
    margin-left: auto;
}
.my-lms-canvas-stage-wrap {
    background: #fafbfc;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}
.my-lms-canvas-stage {
    display: block;
    width: 100%;
    height: 280px;
    cursor: crosshair;
    touch-action: none;
}
.my-lms-canvas-rebuild-wrap {
    padding: 10px 14px;
}
.my-lms-canvas-rebuild-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 6px;
}
.my-lms-canvas-rebuild-field {
    min-height: 70px;
    padding: 9px 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: #1f2937;
    line-height: 1.65;
    outline: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    background: #fefce8;
}
.my-lms-canvas-rebuild-field:focus { border-color: #a3e635; background: #f7fee7; }
.my-lms-canvas-rebuild-field:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    font-style: italic;
}

/* Canvas note rendered (saved state) */
.lms-canvas-note { font-size: 13.5px; }
.lms-canvas-note-header {
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    background: #f5f3ff;
    border-bottom: 1px solid #ddd6fe;
}
.lms-canvas-note-nodes {
    padding: 10px 12px 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lms-canvas-node-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px 3px 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #6366f1;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.lms-canvas-note-edges {
    padding: 6px 12px 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.lms-canvas-edge-item {
    font-size: 11px;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 2px 8px;
}
.lms-canvas-note-rebuild {
    padding: 10px 12px;
    background: #fefce8;
    border-top: 1px solid #fef08a;
}
.lms-canvas-note-rebuild-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 4px;
}
.lms-canvas-note-rebuild-body { line-height: 1.6; }

/* ── COMPARISON NOTE TYPE ─────────────────────────────────────────────────── */
.my-lms-comparison-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.my-lms-comparison-hint {
    padding: 9px 14px;
    background: #faf5ff;
    border-bottom: 1px solid #e9d5ff;
    font-size: 12.5px;
    color: #6b21a8;
}
.my-lms-comparison-headers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid #7c3aed;
}
.my-lms-comparison-col-header {
    padding: 10px 14px 8px;
}
.my-lms-comparison-col-header:first-child {
    border-right: 1px solid #e2e8f0;
    background: #eff6ff;
}
.my-lms-comparison-col-header:last-child {
    background: #f0fdf4;
}
.my-lms-comparison-col-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    margin-bottom: 5px;
}
.my-lms-comparison-col-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    min-height: 24px;
    outline: none;
    border-bottom: 2px solid transparent;
}
.my-lms-comparison-col-name:focus { border-bottom-color: #7c3aed; }
.my-lms-comparison-col-name:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}
.my-lms-comparison-row { border-bottom: 1px solid #e2e8f0; }
.my-lms-comparison-row-label {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e2e8f0;
}
.my-lms-comparison-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.my-lms-comparison-cell {
    padding: 10px 14px;
    min-height: 70px;
    font-size: 13.5px;
    line-height: 1.55;
    outline: none;
    color: #374151;
}
.my-lms-comparison-cell:first-child {
    border-right: 1px solid #e2e8f0;
    background: #fafafe;
}
.my-lms-comparison-cell:focus { background: #fefce8; }
.my-lms-comparison-cell:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    font-style: italic;
}
.my-lms-comparison-synthesis-wrap {
    background: #faf5ff;
    border-top: 2px solid #7c3aed;
    padding: 12px 14px;
}
.my-lms-comparison-synthesis-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b21a8;
    margin-bottom: 8px;
}
.my-lms-comparison-synthesis-label em { font-weight: 400; color: #7c3aed; }
.my-lms-comparison-synthesis-field {
    min-height: 80px;
    font-size: 13.5px;
    line-height: 1.6;
    outline: none;
    color: #1e293b;
    padding: 4px 0;
}
.my-lms-comparison-synthesis-field:focus { }
.my-lms-comparison-synthesis-field:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    font-style: italic;
}

/* Saved comparison note rendering */
.lms-comparison-note { font-size: 13.5px; }
.lms-comparison-header-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 9px 12px 8px;
    background: linear-gradient(90deg, #eff6ff 0%, #faf5ff 100%);
    border-bottom: 2px solid #7c3aed;
}
.lms-comparison-concept-label {
    font-weight: 700;
    font-size: 13px;
    color: #1e293b;
}
.lms-comparison-vs {
    font-size: 16px;
    text-align: center;
    padding: 0 12px;
    color: #7c3aed;
}
.lms-comparison-row-block { border-bottom: 1px solid #e2e8f0; }
.lms-comparison-row-title {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e2e8f0;
}
.lms-comparison-cells {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.lms-comparison-cell {
    padding: 8px 12px;
    line-height: 1.55;
    font-size: 13px;
}
.lms-comparison-cell:first-child { border-right: 1px solid #e2e8f0; background: #fafafe; }
.lms-comparison-synthesis {
    background: #faf5ff;
    border-top: 2px solid #7c3aed;
    padding: 10px 12px;
}
.lms-comparison-synthesis-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b21a8;
    margin-bottom: 6px;
}
.lms-comparison-synthesis-body { line-height: 1.6; color: #1e293b; }

/* ── LEARNING LOG NOTE TYPE ───────────────────────────────────────────────── */
.my-lms-ll-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.my-lms-ll-hint {
    padding: 9px 14px;
    background: #f0fdfa;
    border-bottom: 1px solid #99f6e4;
    font-size: 12.5px;
    color: #134e4a;
}
.my-lms-ll-field-wrap {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.my-lms-ll-field-wrap:last-child { border-bottom: none; }
.my-lms-ll-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.my-lms-ll-field {
    min-height: 48px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #1e293b;
    outline: none;
    padding: 6px 10px;
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
}
.my-lms-ll-field:focus { background: #fffbeb; border-color: #fbbf24; }
.my-lms-ll-field:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    font-style: italic;
}
.my-lms-ll-plateau-nudge {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 5px;
    font-size: 12.5px;
    color: #92400e;
    line-height: 1.5;
}

/* Saved learning log rendering */
.lms-ll-note { font-size: 13.5px; }
.lms-ll-field-block { padding: 8px 12px; border-bottom: 1px solid #f0fdf4; }
.lms-ll-field-block:last-child { border-bottom: none; }
.lms-ll-what   { background: #f0fdf4; border-left: 3px solid #22c55e; }
.lms-ll-why    { background: #eff6ff; border-left: 3px solid #3b82f6; }
.lms-ll-learning { background: #fffbeb; border-left: 3px solid #f59e0b; }
.lms-ll-field-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 4px;
}
.lms-ll-field-body { line-height: 1.6; color: #1e293b; }

/* ── ANALOGY BUILDER NOTE TYPE ────────────────────────────────────────────── */
.my-lms-analogy-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.my-lms-analogy-hint {
    padding: 9px 14px;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
    font-size: 12.5px;
    color: #7c2d12;
}
.my-lms-analogy-field-wrap {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.my-lms-analogy-inversion-wrap { background: #fffbeb; }
.my-lms-analogy-field-wrap:last-of-type { border-bottom: none; }
.my-lms-analogy-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.my-lms-analogy-optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 11px;
}
.my-lms-analogy-field {
    min-height: 52px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #1e293b;
    outline: none;
    padding: 6px 10px;
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
}
.my-lms-analogy-field:focus { background: #fffbeb; border-color: #fb923c; }
.my-lms-analogy-like-field { min-height: 80px; }
.my-lms-analogy-field:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    font-style: italic;
}
.my-lms-analogy-source-wrap {
    padding: 10px 14px;
    background: #f0fdf4;
    border-top: 1px solid #bbf7d0;
    font-size: 12.5px;
}
.my-lms-analogy-source-note { color: #166534; }
.my-lms-analogy-source-title { font-weight: 600; }

/* Saved analogy note rendering */
.lms-analogy-note { font-size: 13.5px; }
.lms-analogy-source-note {
    padding: 6px 12px;
    font-size: 11.5px;
    color: #166534;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
}
.lms-analogy-concept {
    padding: 10px 12px;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
    border-left: 3px solid #ea580c;
}
.lms-analogy-like {
    padding: 10px 12px;
    background: #fffbeb;
    border-bottom: 1px solid #fef08a;
    border-left: 3px solid #f59e0b;
}
.lms-analogy-like-text {
    font-size: 14px;
    font-style: italic;
    color: #1e293b;
}
.lms-analogy-wrong {
    padding: 10px 12px;
    background: #f9fafb;
    border-left: 3px solid #9ca3af;
}
.lms-analogy-field-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 4px;
}
.lms-analogy-field-body { line-height: 1.6; color: #1e293b; }

/* Analogy trigger button in ZPD reframe */
.my-lms-zpd-analogy-btn {
    padding: 5px 12px;
    border: 1px solid #ea580c;
    border-radius: 5px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s;
}
.my-lms-zpd-analogy-btn:hover { background: #ffedd5; }

/* ── PDF Thumbnail Strip (inline viewer) ─────────────────────────────────── */
.lms-pdf-thumb-strip {
    display: none;
    width: 96px; flex-shrink: 0;
    background: #3a3d42; border-right: 1px solid rgba(255,255,255,.12);
    overflow-y: auto; overflow-x: hidden;
    flex-direction: column; align-items: center; gap: 8px; padding: 10px 0;
}
.lms-pdf-thumb-strip.open { display: flex; }
.lms-pdf-thumb-item {
    width: 76px; flex-shrink: 0; cursor: pointer; border-radius: 4px;
    border: 2px solid transparent; overflow: hidden; position: relative;
    transition: border-color .12s; background: #1e2228;
}
.lms-pdf-thumb-item:hover { border-color: rgba(255,255,255,.4); }
.lms-pdf-thumb-item.active { border-color: #2563eb; }
.lms-pdf-thumb-item canvas { display: block; width: 100%; height: auto; }
.lms-pdf-thumb-num {
    position: absolute; bottom: 0; left: 0; right: 0;
    text-align: center; font-size: 9px; color: #cbd5e1;
    background: rgba(0,0,0,.55); padding: 2px 0; line-height: 1.4;
}
.lms-pdf-thumb-dots {
    position: absolute; top: 3px; right: 3px;
    display: flex; gap: 2px; flex-wrap: wrap; max-width: 26px;
}
.lms-pdf-thumb-dot { width: 6px; height: 6px; border-radius: 50%; display: block; }

/* ── PDF Bookmarks Panel (inline viewer) ────────────────────────────────── */
.lms-pdf-bookmarks-panel {
    display: none; position: absolute; top: 44px; right: 0; z-index: 400;
    width: 300px; max-height: 420px; overflow-y: auto;
    background: #fff; border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
    flex-direction: column; border: 1px solid #e5e7eb;
}
.lms-pdf-bookmarks-panel.open { display: flex; }
.lms-pdf-bm-hdr {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; border-bottom: 1px solid #f1f5f9; background: #f8fafc;
    flex-shrink: 0;
}
.lms-pdf-bm-hdr h4 { margin: 0; font-size: 13px; font-weight: 700; color: #0f172a; }
.lms-pdf-bm-close { background: none; border: none; font-size: 16px; color: #94a3b8; cursor: pointer; }
.lms-pdf-bm-list { flex: 1; padding: 6px 8px; }
.lms-pdf-bm-empty { color: #9ca3af; font-size: 12px; text-align: center; padding: 14px 8px; }
.lms-pdf-bm-item {
    border: 1px solid #f1f5f9; border-radius: 6px; padding: 7px 8px;
    margin-bottom: 5px; background: #fafafa;
    display: flex; align-items: flex-start; gap: 7px;
}
.lms-pdf-bm-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.lms-pdf-bm-body { flex: 1; min-width: 0; }
.lms-pdf-bm-name {
    font-size: 12px; font-weight: 600; color: #0f172a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.lms-pdf-bm-name[contenteditable=true] {
    outline: 1px solid #2563eb; border-radius: 2px;
    white-space: normal; word-break: break-word; padding: 0 2px;
}
.lms-pdf-bm-meta { font-size: 10px; color: #6b7280; margin-top: 1px; }
.lms-pdf-bm-actions { display: flex; gap: 3px; margin-top: 4px; }
.lms-pdf-bm-go {
    font-size: 10px; background: #2563eb; color: #fff; border: none;
    border-radius: 3px; padding: 2px 7px; cursor: pointer; font-family: inherit;
}
.lms-pdf-bm-go:hover { background: #1d4ed8; }
.lms-pdf-bm-rename {
    font-size: 10px; background: none; border: 1px solid #e5e7eb;
    border-radius: 3px; padding: 2px 5px; cursor: pointer; color: #374151; font-family: inherit;
}
.lms-pdf-bm-del {
    font-size: 10px; background: none; border: 1px solid #fca5a5;
    border-radius: 3px; padding: 2px 5px; cursor: pointer; color: #dc2626; font-family: inherit;
}

/* Outer wrapper for thumb strip + canvas wrap in inline viewer */
.lms-pdf-viewer-body {
    display: flex; flex-direction: row; flex: 1; overflow: hidden; min-height: 0;
    position: relative;
}

/* ── Viewer body layout (thumb strip + canvas + sidebar) ─────────────────── */
.lms-pdf-viewer-body {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
    background: #525659;
}
.lms-pdf-viewer-body .lms-pdf-canvas-wrap {
    flex: 1;
    min-width: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ZETTELKASTEN LAYER — v1.1.70
   Note type selector, [[note:id]] links, atomic nudge, backlinks, inbox
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Note Type Selector ──────────────────────────────────────────────────── */
.my-lms-note-type-selector {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid #f3f4f6;
    background: #fafafa;
}
.my-lms-note-type-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-right: 2px;
    white-space: nowrap;
}
.my-lms-ntype-btn {
    border: 1.5px solid #e5e7eb;
    background: #fff;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #374151;
    transition: all .15s;
    white-space: nowrap;
}
.my-lms-ntype-btn:hover { border-color: #9ca3af; background: #f9fafb; }
.my-lms-ntype-btn.my-lms-ntype-active {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
    font-weight: 600;
}
.my-lms-ntype-btn[data-ntype="fleeting"].my-lms-ntype-active  { background: #f59e0b; border-color: #f59e0b; }
.my-lms-ntype-btn[data-ntype="literature"].my-lms-ntype-active { background: #3b82f6; border-color: #3b82f6; }
.my-lms-ntype-btn[data-ntype="permanent"].my-lms-ntype-active  { background: #10b981; border-color: #10b981; }

/* ── Note Type Nudge ─────────────────────────────────────────────────────── */
.my-lms-ntype-nudge {
    margin: 0;
    padding: 8px 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}
.my-lms-ntype-nudge[data-ntype="fleeting"]  { background: #fffbeb; border-left: 3px solid #f59e0b; }
.my-lms-ntype-nudge[data-ntype="literature"] { background: #eff6ff; border-left: 3px solid #3b82f6; }
.my-lms-ntype-nudge[data-ntype="permanent"] { background: #ecfdf5; border-left: 3px solid #10b981; }

/* ── Zettelkasten type badge on saved notes ──────────────────────────────── */
.my-lms-note-ztype-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
}
.my-lms-note-ztype-badge.ztype-fleeting  { background: #fef3c7; color: #92400e; }
.my-lms-note-ztype-badge.ztype-literature { background: #dbeafe; color: #1e40af; }
.my-lms-note-ztype-badge.ztype-permanent { background: #d1fae5; color: #065f46; }

/* Fleeting notes get muted treatment in the notes list */
.my-lms-note-item.note-fleeting {
    opacity: .82;
    border-left-color: #f59e0b !important;
    background: #fffdf0 !important;
}

/* ── [[note:id]] link rendering ──────────────────────────────────────────── */
.my-lms-note-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #3b82f6;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    background: #eff6ff;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid #bfdbfe;
    transition: background .12s;
}
.my-lms-note-link:hover { background: #dbeafe; text-decoration: none; }

/* Flash animation when jumping to a linked note */
@keyframes lmsLinkFlash {
    0%   { box-shadow: 0 0 0 0 rgba(59,130,246,.5); }
    50%  { box-shadow: 0 0 0 6px rgba(59,130,246,.15); }
    100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}
.my-lms-note-linked-flash {
    animation: lmsLinkFlash .6s ease-out 2;
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ── Note-link autocomplete dropdown ────────────────────────────────────── */
.my-lms-notelink-autocomplete {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
    z-index: 200;
}
.my-lms-notelink-ac-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .1s;
}
.my-lms-notelink-ac-item:last-child { border-bottom: none; }
.my-lms-notelink-ac-item:hover { background: #f0f9ff; }
.my-lms-notelink-ac-icon { font-size: 14px; flex-shrink: 0; }
.my-lms-notelink-ac-title { flex: 1; font-weight: 500; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-lms-notelink-ac-id { font-size: 11px; color: #9ca3af; flex-shrink: 0; }

/* ── Atomic Note Nudge ───────────────────────────────────────────────────── */
.my-lms-atomic-nudge {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    margin-top: 4px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 6px;
    font-size: 12px;
    color: #78350f;
    line-height: 1.5;
}
.my-lms-atomic-nudge-dismiss {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0 2px;
}
.my-lms-atomic-nudge-dismiss:hover { color: #374151; }

/* ── Permanent Note Link Requirement ─────────────────────────────────────── */
.my-lms-permanent-link-req {
    font-size: 12px;
    line-height: 1.5;
}
.my-lms-permanent-link-status { display: inline-block; }
.my-lms-permanent-link-pending { color: #b45309; }
.my-lms-permanent-link-ok      { color: #065f46; }
.my-lms-permanent-link-req code {
    background: #f3f4f6;
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 11px;
    font-family: monospace;
}

/* ── Backlinks ────────────────────────────────────────────────────────────── */
.my-lms-note-backlinks {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e5e7eb;
    font-size: 12px;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.my-lms-backlinks-label {
    font-weight: 600;
    color: #9ca3af;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.my-lms-backlink-item {
    font-size: 12px;
    color: #6366f1;
    text-decoration: none;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #c7d2fe;
    transition: background .12s;
}
.my-lms-backlink-item:hover { background: #e0e7ff; text-decoration: none; }

/* ── Fleeting Inbox Button ────────────────────────────────────────────────── */
.my-lms-fleeting-inbox-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 5px 10px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.my-lms-fleeting-inbox-btn:hover { border-color: #9ca3af; background: #f3f4f6; }
.my-lms-fleeting-inbox-btn.my-lms-inbox-has-items {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
    font-weight: 600;
}
.my-lms-inbox-badge {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 99px;
    padding: 1px 5px;
    line-height: 1.4;
}

/* ── Fleeting Inbox Panel ────────────────────────────────────────────────── */
.my-lms-fleeting-inbox {
    border: 1.5px solid #fde68a;
    border-radius: 10px;
    background: #fffbeb;
    margin: 0 0 14px;
    overflow: hidden;
}
.my-lms-fleeting-inbox-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #fde68a;
    background: #fef3c7;
}
.my-lms-fleeting-inbox-title {
    font-weight: 700;
    font-size: 13.5px;
    color: #78350f;
}
.my-lms-fleeting-inbox-desc {
    font-size: 12px;
    color: #92400e;
    flex: 1;
}
.my-lms-fleeting-inbox-close {
    margin-left: auto;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 12px;
    color: #92400e;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}
.my-lms-fleeting-inbox-close:hover { background: #fde68a; }
.my-lms-fleeting-inbox-list {
    padding: 10px 14px;
    max-height: 320px;
    overflow-y: auto;
}

/* ── Inbox items ─────────────────────────────────────────────────────────── */
.my-lms-inbox-item {
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fff;
}
.my-lms-inbox-item:last-child { margin-bottom: 0; }
.my-lms-inbox-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 11.5px;
}
.my-lms-inbox-item-age {
    font-weight: 700;
    color: #d97706;
}
.my-lms-inbox-item-date { color: #9ca3af; }
.my-lms-inbox-item-content {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}
.my-lms-inbox-item-actions {
    display: flex;
    gap: 8px;
}
.my-lms-inbox-promote-btn, .my-lms-inbox-discard-btn {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    border: 1.5px solid;
    transition: all .12s;
}
.my-lms-inbox-promote-btn {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
    font-weight: 600;
}
.my-lms-inbox-promote-btn:hover { background: #d1fae5; border-color: #34d399; }
.my-lms-inbox-discard-btn {
    background: #fff;
    border-color: #e5e7eb;
    color: #6b7280;
}
.my-lms-inbox-discard-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }
.my-lms-inbox-empty {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 13px;
}
.my-lms-inbox-empty-icon { font-size: 28px; display: block; margin-bottom: 6px; }

/* ── Knowledge Graph button in notes header ──────────────────────────────── */
.my-lms-knowledge-graph-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 1.5px solid #4338ca;
    border-radius: 8px;
    color: #a5b4fc;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    font-weight: 600;
}
.my-lms-knowledge-graph-btn:hover {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
    color: #e0e7ff;
    text-decoration: none;
}

/* ── BUILD GROUP 6: ZPD FLAG + RETURN TO + DIFFICULTY REFRAME + FEYNMAN CALIBRATION ── */

/* ── ZPD FLAG BUTTON ──────────────────────────────────────────────────────────── */
.my-lms-zpd-flag-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    opacity: 0.5;
    transition: opacity .15s, transform .15s;
    border-radius: 4px;
    line-height: 1;
    margin-left: auto;
}
.my-lms-zpd-flag-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}
.my-lms-note-zpd-flagged .my-lms-zpd-flag-btn {
    opacity: 1;
}

/* Flagged note gets a subtle amber left border */
.my-lms-note-item.my-lms-note-zpd-flagged {
    border-left: 3px solid #f59e0b;
    background: linear-gradient(to right, rgba(245,158,11,.04) 0%, transparent 60px);
}

/* ── ZPD REFRAME PROMPT ────────────────────────────────────────────────────────── */
.my-lms-zpd-reframe {
    margin: 8px 0 6px;
    padding: 10px 12px;
    background: rgba(245,158,11,.08);
    border: 1px solid rgba(245,158,11,.3);
    border-radius: 8px;
    font-size: 13px;
}
.my-lms-zpd-reframe-prompt {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
    line-height: 1.45;
    color: #78350f;
}
.my-lms-zpd-reframe-icon {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}
.my-lms-zpd-confusion-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 60px;
    padding: 7px 9px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    resize: vertical;
    margin-bottom: 6px;
}
.my-lms-zpd-confusion-input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,.2);
}
.my-lms-zpd-reframe-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.my-lms-zpd-save-confusion-btn {
    padding: 4px 12px;
    font-size: 12px;
    font-family: inherit;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background .15s;
}
.my-lms-zpd-save-confusion-btn:hover { background: #d97706; }
.my-lms-zpd-saved-msg {
    font-size: 12px;
    color: #059669;
    font-weight: 600;
}

/* ── RETURN TO PANEL ───────────────────────────────────────────────────────────── */
.my-lms-return-to-btn {
    position: relative;
}
.my-lms-return-to-btn.my-lms-return-to-has-items {
    background: linear-gradient(135deg, #78350f 0%, #b45309 100%);
    border-color: #f59e0b;
    color: #fef3c7;
}
.my-lms-return-to-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    margin-left: 2px;
    vertical-align: middle;
}
.my-lms-return-to-panel {
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffbeb;
    margin-bottom: 14px;
    overflow: hidden;
}
.my-lms-return-to-header {
    padding: 12px 14px 8px;
    border-bottom: 1px solid #fde68a;
    background: #fef9ee;
}
.my-lms-return-to-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.my-lms-return-to-title {
    font-size: 14px;
    font-weight: 700;
    color: #78350f;
    flex: 1;
}
.my-lms-return-to-scope {
    display: flex;
    gap: 4px;
}
.my-lms-return-scope-btn {
    padding: 3px 9px;
    font-size: 11px;
    font-family: inherit;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 5px;
    cursor: pointer;
    color: #78350f;
    font-weight: 600;
    transition: background .15s;
}
.my-lms-return-scope-btn.my-lms-return-scope-active,
.my-lms-return-scope-btn:hover {
    background: #fde68a;
}
.my-lms-return-to-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #92400e;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: inherit;
}
.my-lms-return-to-close:hover { background: #fde68a; }
.my-lms-return-to-desc {
    font-size: 12px;
    color: #92400e;
    line-height: 1.45;
}
.my-lms-return-to-list {
    padding: 10px 14px;
}
.my-lms-return-to-empty {
    text-align: center;
    padding: 20px 10px;
    color: #92400e;
}
.my-lms-return-to-empty-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}
.my-lms-return-to-triage {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    background: rgba(245,158,11,.1);
    border: 1px dashed #f59e0b;
    border-radius: 7px;
    font-size: 13px;
    color: #78350f;
    margin-bottom: 12px;
    line-height: 1.45;
}
.my-lms-return-to-triage-icon { font-size: 15px; flex-shrink: 0; }
.my-lms-return-to-group {
    margin-bottom: 14px;
}
.my-lms-return-to-group-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #fde68a;
}
.my-lms-rt-item {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #fde68a;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.my-lms-rt-item-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 11px;
}
.my-lms-rt-item-age { color: #9ca3af; }
.my-lms-rt-item-type {
    color: #6b7280;
    font-weight: 600;
}
.my-lms-rt-item-citation {
    font-size: 11px;
    color: #2563eb;
    margin-bottom: 4px;
}
.my-lms-rt-item-content {
    color: #374151;
    line-height: 1.45;
    margin-bottom: 6px;
}
.my-lms-rt-item-confusion {
    padding: 5px 8px;
    background: rgba(245,158,11,.07);
    border-radius: 5px;
    font-size: 12px;
    color: #78350f;
    margin-bottom: 6px;
}
.my-lms-rt-confusion-label {
    font-weight: 600;
    margin-right: 4px;
}
.my-lms-rt-sit-nudge {
    font-size: 12px;
    color: #7c3aed;
    background: rgba(124,58,237,.07);
    border-radius: 5px;
    padding: 5px 8px;
    margin-bottom: 6px;
}
.my-lms-rt-item-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.my-lms-rt-resolve-btn,
.my-lms-rt-renew-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-family: inherit;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background .15s;
}
.my-lms-rt-resolve-btn {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}
.my-lms-rt-resolve-btn:hover { background: #a7f3d0; }
.my-lms-rt-renew-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}
.my-lms-rt-renew-btn:hover { background: #e5e7eb; }

/* ── PDF SIDEBAR: ZPD FLAG ─────────────────────────────────────────────────────── */
.lms-ann-zpd-flag {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 1px 3px;
    opacity: 0.45;
    border-radius: 3px;
    transition: opacity .15s;
    line-height: 1;
}
.lms-ann-zpd-flag:hover { opacity: 1; }
.lms-ann-zpd-flagged { border-left: 3px solid #f59e0b !important; background: rgba(245,158,11,.04) !important; }
.lms-ann-zpd-flagged .lms-ann-zpd-flag { opacity: 1; }
.lms-ann-zpd-reframe {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    font-size: 11px;
    color: #78350f;
    background: rgba(245,158,11,.08);
    border-radius: 5px;
    padding: 5px 7px;
    margin: 5px 0 3px;
    line-height: 1.4;
}
.lms-ann-zpd-icon { flex-shrink: 0; }
.lms-ann-confusion-saved {
    margin-top: 5px;
    padding: 4px 7px;
    background: rgba(245,158,11,.12);
    border-radius: 4px;
    font-size: 11px;
    font-style: italic;
    color: #92400e;
}

/* ── FEYNMAN CALIBRATION PROMPT ───────────────────────────────────────────────── */
.my-lms-feynman-calibration {
    margin: 10px 0 4px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
}
.my-lms-feynman-calib-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.my-lms-feynman-calib-icon { font-size: 18px; }
.my-lms-feynman-calib-title {
    font-size: 14px;
    font-weight: 700;
    color: #0c4a6e;
}
.my-lms-feynman-calib-framing {
    font-size: 12px;
    color: #0369a1;
    line-height: 1.5;
    padding: 8px 10px;
    background: rgba(14,165,233,.08);
    border-radius: 6px;
    margin-bottom: 12px;
}
.my-lms-feynman-calib-q1,
.my-lms-feynman-calib-q2 {
    margin-bottom: 12px;
}
.my-lms-feynman-calib-label {
    font-size: 13px;
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 6px;
}
.my-lms-feynman-calib-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.my-lms-feynman-star-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #bae6fd;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #0369a1;
    transition: all .15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}
.my-lms-feynman-star-btn:hover,
.my-lms-feynman-star-btn.active {
    background: #0369a1;
    border-color: #0369a1;
    color: #fff;
}
.my-lms-feynman-star-label {
    font-size: 12px;
    color: #0369a1;
    margin-left: 6px;
    font-weight: 600;
}
.my-lms-feynman-calib-stars.my-lms-calib-error .my-lms-feynman-star-btn {
    border-color: #ef4444;
}
.my-lms-feynman-change-input {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    font-size: 13px;
    font-family: inherit;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    resize: vertical;
    margin-bottom: 4px;
}
.my-lms-feynman-change-input:focus {
    outline: none;
    border-color: #0369a1;
    box-shadow: 0 0 0 2px rgba(3,105,161,.15);
}
.my-lms-feynman-calib-hint {
    font-size: 11px;
    color: #0369a1;
    font-style: italic;
    line-height: 1.4;
}
.my-lms-feynman-calib-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.my-lms-feynman-calib-save-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-family: inherit;
    background: #0369a1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background .15s;
}
.my-lms-feynman-calib-save-btn:hover { background: #0284c7; }
.my-lms-feynman-calib-skip-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-family: inherit;
    background: none;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
}
.my-lms-feynman-calib-skip-btn:hover { background: #f0f9ff; }

/* ── FEYNMAN CALIBRATION SAVED DISPLAY ────────────────────────────────────────── */
.my-lms-feynman-calib-display {
    margin: 8px 0 4px;
    padding: 8px 12px;
    background: rgba(14,165,233,.07);
    border: 1px solid #bae6fd;
    border-radius: 7px;
    font-size: 12px;
}
.my-lms-feynman-calib-display-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.my-lms-feynman-calib-display-label {
    font-weight: 700;
    color: #0c4a6e;
    white-space: nowrap;
}
.my-lms-feynman-calib-display-stars {
    display: flex;
    gap: 2px;
}
.my-lms-feynman-star-dot {
    color: #bae6fd;
    font-size: 12px;
}
.my-lms-feynman-star-dot.filled {
    color: #0369a1;
}
.my-lms-feynman-calib-display-level {
    color: #0369a1;
    font-weight: 600;
}
.my-lms-feynman-calib-display-change {
    color: #374151;
    line-height: 1.45;
    font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════════════════
   BUILD GROUP 7 — Claim Tagging, Prediction, Evaluation Prompt
   v1.1.73
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── CLAIM TAGGING — dots in toolbar ─────────────────────────────────────── */
.my-lms-claim-sep { width: 1px; height: 16px; background: #e2e8f0; align-self: center; }
.my-lms-claim-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
    flex-shrink: 0;
}
.my-lms-claim-btn { display: inline-flex; align-items: center; gap: 2px; }
.my-lms-claim-btn:hover { background: #f1f5f9; }

/* claim type colors */
.claim-fact       { background: #16a34a; }
.claim-inference  { background: #2563eb; }
.claim-assumption { background: #d97706; }
.claim-question   { background: #7c3aed; }

/* Inline claim spans in note content */
span[data-claim-type],
span.lms-claim-tag {
    border-radius: 3px;
    padding: 0 3px;
    font-size: 0.93em;
    position: relative;
}
span.lms-claim-tag::after,
span[data-claim-type]::after {
    font-size: 9px;
    font-weight: 700;
    vertical-align: super;
    margin-left: 2px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
span.claim-fact,
span[data-claim-type="fact"] {
    background: #dcfce7;
    color: #14532d;
}
span.claim-fact::after,
span[data-claim-type="fact"]::after { content: 'fact'; color: #16a34a; }

span.claim-inference,
span[data-claim-type="inference"] {
    background: #dbeafe;
    color: #1e3a8a;
}
span.claim-inference::after,
span[data-claim-type="inference"]::after { content: 'infer'; color: #2563eb; }

span.claim-assumption,
span[data-claim-type="assumption"] {
    background: #fef3c7;
    color: #78350f;
}
span.claim-assumption::after,
span[data-claim-type="assumption"]::after { content: 'assume'; color: #d97706; }

span.claim-question,
span[data-claim-type="question"] {
    background: #ede9fe;
    color: #3b0764;
}
span.claim-question::after,
span[data-claim-type="question"]::after { content: '?'; color: #7c3aed; }

/* Claim summary line below a note */
.my-lms-claim-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 5px 0 4px;
    border-top: 1px dashed #e5e7eb;
    margin-top: 6px;
    font-size: 11.5px;
}
.lms-claim-count {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.lms-claim-count.claim-fact       { background: #dcfce7; color: #166534; }
.lms-claim-count.claim-inference  { background: #dbeafe; color: #1e40af; }
.lms-claim-count.claim-assumption { background: #fef3c7; color: #92400e; }
.lms-claim-count.claim-question   { background: #ede9fe; color: #4c1d95; }

/* Confidence interval nudge */
.my-lms-claim-interval-nudge {
    display: none;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 9px 12px;
    margin-top: 6px;
    font-size: 12.5px;
    color: #78350f;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.my-lms-claim-interval-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.my-lms-claim-interval-text { flex: 1; line-height: 1.45; }
.my-lms-claim-interval-dismiss {
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    flex-shrink: 0;
    margin-top: 2px;
    text-decoration: underline;
}
.my-lms-claim-interval-dismiss:hover { color: #78350f; }

/* ── EVALUATION PROMPT ────────────────────────────────────────────────────── */
.my-lms-eval-prompt {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 10px 12px;
    margin-top: 8px;
}
.my-lms-eval-prompt-label {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12.5px;
    color: #166534;
    margin-bottom: 8px;
    line-height: 1.45;
}
.my-lms-eval-prompt-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.my-lms-eval-prompt-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.my-lms-eval-input {
    flex: 1;
    border: 1px solid #86efac;
    border-radius: 5px;
    padding: 6px 9px;
    font-size: 13px;
    background: #fff;
    color: #111827;
    outline: none;
}
.my-lms-eval-input:focus { border-color: #16a34a; box-shadow: 0 0 0 2px #bbf7d0; }
.my-lms-eval-input.my-lms-eval-input-error { border-color: #dc2626; box-shadow: 0 0 0 2px #fee2e2; }
.my-lms-eval-save-btn {
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.my-lms-eval-save-btn:hover { background: #15803d; }
.my-lms-eval-skip-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 6px 4px;
    text-decoration: underline;
}
.my-lms-eval-skip-btn:hover { color: #374151; }

/* Saved evaluation display */
.my-lms-eval-display {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 6px 0 2px;
    font-size: 12.5px;
    color: #374151;
    border-top: 1px dashed #d1fae5;
    margin-top: 6px;
}
.my-lms-eval-display-icon { flex-shrink: 0; font-size: 13px; }
.my-lms-eval-display-text { color: #166534; font-style: italic; line-height: 1.4; }

/* ── PRE-READING MODAL ────────────────────────────────────────────────────── */
.my-lms-prereading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.my-lms-prereading-overlay[style*="display: block"],
.my-lms-prereading-overlay[style*="display:block"] {
    display: flex !important;
}
.my-lms-prereading-modal {
    background: #fff;
    border-radius: 12px;
    padding: 28px 28px 24px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    position: relative;
}
.my-lms-prereading-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.my-lms-prereading-icon { font-size: 22px; }
.my-lms-prereading-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}
.my-lms-prereading-framing {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 18px;
}
.my-lms-prereading-q1,
.my-lms-prereading-q2 { margin-bottom: 16px; }
.my-lms-prereading-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
}
.my-lms-prereading-belief-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13.5px;
    color: #111827;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}
.my-lms-prereading-belief-input:focus { border-color: #6366f1; box-shadow: 0 0 0 2px #e0e7ff; }
.my-lms-prereading-belief-input.my-lms-prereading-input-error { border-color: #dc2626; }
.my-lms-prereading-conf-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.my-lms-prereading-conf-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #f9fafb;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: all 0.12s;
}
.my-lms-prereading-conf-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}
.my-lms-prereading-conf-btn:hover:not(.active) { border-color: #818cf8; background: #eef2ff; }
.my-lms-prereading-conf-row.my-lms-prereading-conf-error .my-lms-prereading-conf-btn {
    border-color: #dc2626;
}
.my-lms-prereading-conf-label {
    font-size: 12.5px;
    color: #6b7280;
    font-style: italic;
    margin-left: 4px;
}
.my-lms-prereading-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 20px;
}
.my-lms-prereading-submit-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.my-lms-prereading-submit-btn:hover { background: #4f46e5; }
.my-lms-prereading-submit-btn:disabled { opacity: 0.7; cursor: default; }
.my-lms-prereading-skip-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px;
}
.my-lms-prereading-skip-btn:hover { color: #374151; }
.my-lms-prereading-status {
    margin-top: 8px;
    font-size: 12.5px;
    min-height: 16px;
}

/* ── BELIEF RECORD CARD ───────────────────────────────────────────────────── */
.my-lms-belief-record-wrap {
    margin-bottom: 16px;
}
.my-lms-belief-record {
    background: #f5f3ff;
    border: 1px solid #c4b5fd;
    border-radius: 8px;
    padding: 16px;
    font-size: 13.5px;
}
.my-lms-belief-record-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.my-lms-belief-record-icon { font-size: 18px; }
.my-lms-belief-record-title {
    font-size: 15px;
    font-weight: 700;
    color: #4c1d95;
}
.my-lms-belief-record-pre,
.my-lms-belief-record-post,
.my-lms-belief-record-post-prompt {
    background: #fff;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 10px;
}
.my-lms-belief-record-pre:last-child,
.my-lms-belief-record-post:last-child { margin-bottom: 0; }
.my-lms-belief-record-phase-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7c3aed;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.my-lms-belief-change-badge {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 11.5px;
    background: #e0e7ff;
    color: #3730a3;
    padding: 1px 7px;
    border-radius: 10px;
}
.my-lms-belief-record-belief {
    color: #1f2937;
    line-height: 1.5;
    margin-bottom: 4px;
}
.my-lms-belief-record-conf {
    font-size: 12px;
    color: #7c3aed;
    font-style: italic;
}
.my-lms-belief-record-post-q {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 13.5px;
}
.my-lms-belief-record-changed-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.my-lms-belief-changed-btn {
    border: 2px solid #c4b5fd;
    background: #faf5ff;
    color: #4c1d95;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.12s;
}
.my-lms-belief-changed-btn.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}
.my-lms-belief-changed-btn:hover:not(.active) { background: #ede9fe; }
.my-lms-belief-record-post-text { margin-top: 4px; }
.my-lms-belief-post-input {
    width: 100%;
    border: 1px solid #c4b5fd;
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 13px;
    color: #111827;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 8px;
}
.my-lms-belief-post-input:focus { border-color: #7c3aed; box-shadow: 0 0 0 2px #ede9fe; }
.my-lms-belief-post-save-btn {
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.my-lms-belief-post-save-btn:hover { background: #6d28d9; }
.my-lms-belief-post-save-btn:disabled { opacity: 0.6; cursor: default; }

/* Belief Record button in notes header */
.my-lms-belief-record-btn {
    background: #f5f3ff;
    color: #4c1d95;
    border: 1px solid #c4b5fd;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.12s;
}
.my-lms-belief-record-btn:hover { background: #ede9fe; }


/* ── NOTE CONNECTIONS PANEL (lesson page) ────────────────────────────────── */
.my-lms-note-connections-btn {
    font-size: 11.5px;
    padding: 3px 9px;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    cursor: pointer;
    transition: all 0.1s;
    margin-left: 4px;
}
.my-lms-note-connections-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4f46e5;
}

.my-lms-note-connections-panel {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    padding: 10px 12px;
    margin-top: 10px;
    font-size: 12.5px;
}

.my-lms-conn-section {
    margin-bottom: 10px;
}
.my-lms-conn-section:last-child {
    margin-bottom: 0;
}
.my-lms-conn-heading {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 5px;
}
.my-lms-conn-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 4px 6px;
    border-radius: 5px;
    transition: background 0.1s;
    cursor: default;
}
.my-lms-conn-item:hover {
    background: #eef2ff;
}
.my-lms-conn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

/* Knowledge Graph btn in notes header — already exists but refresh style */
.my-lms-knowledge-graph-btn {
    background: #f5f3ff;
    color: #4c1d95;
    border: 1px solid #c4b5fd;
    font-weight: 600;
    transition: background 0.12s;
}
.my-lms-knowledge-graph-btn:hover {
    background: #ede9fe;
}

/* ── BUILD GROUP 11: Timestamps, Sort, Note History, Web Snapshots ──────────── */

/* Sort control in notes header */
.my-lms-notes-sort-group {
    display: flex;
    align-items: center;
    gap: 5px;
}
.my-lms-notes-sort-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.my-lms-notes-sort-select {
    font-size: 12px;
    padding: 4px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    outline: none;
    transition: border-color .12s;
}
.my-lms-notes-sort-select:focus {
    border-color: #6366f1;
}

/* Timestamps on notes */
.my-lms-note-timestamps {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 11.5px;
    color: #9ca3af;
    flex-wrap: wrap;
}
.my-lms-note-created {
    color: #9ca3af;
}
.my-lms-note-modified {
    color: #6366f1;
    opacity: .85;
}

/* History button */
.my-lms-note-history-btn {
    background: #f5f3ff !important;
    color: #6d28d9 !important;
    border-color: #c4b5fd !important;
    font-size: 11.5px !important;
}
.my-lms-note-history-btn:hover {
    background: #ede9fe !important;
}

/* Note history panel */
.my-lms-note-history-panel {
    background: #faf9ff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 8px;
}
.note-hist-loading {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
    padding: 6px 0;
}
.note-hist-empty {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}
.note-hist-wrap {}
.note-hist-header {
    font-size: 13px;
    font-weight: 700;
    color: #4c1d95;
    margin-bottom: 4px;
}
.note-hist-desc {
    font-size: 11.5px;
    color: #9ca3af;
    margin-bottom: 10px;
    line-height: 1.5;
}
.note-hist-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.note-hist-item:last-child { margin-bottom: 0; }
.note-hist-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.note-hist-version {
    font-size: 11px;
    font-weight: 700;
    color: #7c3aed;
    background: #f5f3ff;
    border: 1px solid #c4b5fd;
    border-radius: 4px;
    padding: 1px 6px;
}
.note-hist-date {
    font-size: 11.5px;
    color: #9ca3af;
}
.note-hist-type {
    font-size: 11px;
    color: #d1d5db;
    font-style: italic;
}
.note-hist-preview {
    font-size: 12.5px;
    color: #374151;
    line-height: 1.55;
    margin-bottom: 8px;
    max-height: 80px;
    overflow: hidden;
    background: #faf9ff;
    border-radius: 5px;
    padding: 6px 8px;
    border: 1px solid #ede9fe;
    word-break: break-word;
}
.note-hist-restore-btn {
    font-size: 11.5px !important;
    color: #6d28d9 !important;
    border-color: #c4b5fd !important;
    background: #f5f3ff !important;
}
.note-hist-restore-btn:hover {
    background: #ede9fe !important;
}

/* Snapshot toast in knowledge graph */
.kg-snapshot-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #334155;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
    z-index: 500;
    opacity: 0;
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}
.kg-snapshot-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── SPACED RETRIEVAL QUEUE ────────────────────────────────────────────────── */

/* Header button with badge */
.my-lms-retrieval-queue-btn {
    position: relative;
}
.my-lms-retrieval-queue-btn.my-lms-retrieval-has-items {
    background: #6366f1 !important;
    color: #fff !important;
    border-color: #6366f1 !important;
}
.my-lms-retrieval-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    margin-left: 3px;
    vertical-align: middle;
}

/* Retrieval Panel */
.my-lms-retrieval-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}
.my-lms-retrieval-panel-header {
    padding: 12px 16px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.my-lms-retrieval-panel-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}
.my-lms-retrieval-panel-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}
.my-lms-retrieval-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #94a3b8;
    padding: 2px 6px;
}
.my-lms-retrieval-panel-close:hover { color: #374151; }
.my-lms-retrieval-panel-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}
.my-lms-retrieval-panel-list {
    padding: 8px 0;
}

/* Empty state */
.my-lms-retrieval-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    color: #64748b;
    font-size: 13px;
}
.my-lms-retrieval-empty-icon {
    font-size: 20px;
}

/* Group header */
.my-lms-retrieval-group {
    margin-bottom: 4px;
}
.my-lms-retrieval-group-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 16px 4px;
}

/* Individual item */
.my-lms-retrieval-item {
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 16px;
    transition: background 0.15s;
}
.my-lms-retrieval-item:last-child { border-bottom: none; }
.my-lms-retrieval-item:hover { background: #fafbff; }

.my-lms-retrieval-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.my-lms-retrieval-item-icon { font-size: 16px; }
.my-lms-retrieval-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}
.my-lms-retrieval-item-age {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}
.my-lms-retrieval-item-preview {
    font-size: 12.5px;
    color: #475569;
    line-height: 1.45;
    margin-bottom: 10px;
    max-height: 60px;
    overflow: hidden;
}

/* Mode selector */
.my-lms-retrieval-mode-select {
    margin-bottom: 10px;
}
.my-lms-retrieval-mode-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #6366f1;
    margin-bottom: 6px;
}
.my-lms-retrieval-mode-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.my-lms-retrieval-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    flex: 1;
    min-width: 120px;
    transition: border-color 0.15s, background 0.15s;
    text-align: left;
}
.my-lms-retrieval-mode-btn:hover {
    border-color: #a5b4fc;
    background: #eef2ff;
}
.my-lms-retrieval-mode-btn.my-lms-retrieval-mode-active {
    border-color: #6366f1;
    background: #eef2ff;
}
.my-lms-retrieval-mode-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
    display: block;
    margin-bottom: 2px;
}
.my-lms-retrieval-mode-desc {
    font-size: 11px;
    color: #6b7280;
    display: block;
    line-height: 1.35;
}

/* Response area */
.my-lms-retrieval-response-area {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
}
.my-lms-retrieval-response-prompt {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.4;
}
.my-lms-retrieval-response-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    color: #1e293b;
    background: #fff;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.my-lms-retrieval-response-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.my-lms-retrieval-input-error { border-color: #ef4444 !important; }
.my-lms-retrieval-submit-row { margin-top: 8px; }
.my-lms-retrieval-submit-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.my-lms-retrieval-submit-btn:hover { background: #4f46e5; }

/* Rating row */
.my-lms-retrieval-rating-row {
    margin-top: 10px;
}
.my-lms-retrieval-rating-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.my-lms-retrieval-rating-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.my-lms-retrieval-rating-btn {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    background: #f8fafc;
    color: #374151;
}
.my-lms-rating-fluent:hover, .my-lms-rating-fluent:disabled[data-selected] {
    background: #dcfce7; border-color: #16a34a; color: #15803d;
}
.my-lms-rating-hesitant:hover {
    background: #fef9c3; border-color: #ca8a04; color: #854d0e;
}
.my-lms-rating-struggled:hover {
    background: #fee2e2; border-color: #dc2626; color: #b91c1c;
}

/* Feedback message */
.my-lms-retrieval-feedback {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    padding: 8px 0 4px;
}
.my-lms-retrieval-review-link {
    font-size: 12px;
    color: #6366f1;
    text-decoration: underline;
}

/* Item action buttons */
.my-lms-retrieval-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.my-lms-retrieval-dismiss-btn,
.my-lms-retrieval-snooze-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11.5px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}
.my-lms-retrieval-dismiss-btn:hover { background: #dcfce7; border-color: #16a34a; color: #15803d; }
.my-lms-retrieval-snooze-btn:hover { background: #fef9c3; border-color: #ca8a04; color: #854d0e; }

/* Note list — retrieval due badge */
.my-lms-note-retrieval-due-badge {
    display: inline-block;
    background: #eef2ff;
    color: #6366f1;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    border: 1px solid #c7d2fe;
}

/* Retrieval history panel (on note item) */
.my-lms-retrieval-hist-wrap {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 10px 14px;
    font-size: 12.5px;
}
.my-lms-retrieval-hist-header {
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}
.my-lms-retrieval-mode-summary {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.my-lms-retrieval-mode-count {
    font-size: 11px;
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 7px;
    border-radius: 8px;
}
.my-lms-retrieval-hist-item {
    border-top: 1px solid #e9eef5;
    padding: 6px 0;
}
.my-lms-retrieval-hist-item-date {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 4px;
}
.my-lms-retrieval-hist-item-content {
    font-size: 12.5px;
    color: #374151;
    line-height: 1.4;
}
.my-lms-retrieval-next-due {
    margin-top: 10px;
    font-size: 11.5px;
    color: #6366f1;
    font-weight: 600;
}

/* Retrieval response in note child — rendered HTML */
.lms-retrieval-response {
    background: #eef2ff;
    border-left: 3px solid #6366f1;
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
}
.lms-retrieval-response-mode {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.lms-retrieval-response-text {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.5;
}
.lms-retrieval-response-rating {
    display: inline-block;
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
}
.lms-retrieval-rating-fluent   { background: #dcfce7; color: #15803d; }
.lms-retrieval-rating-hesitant { background: #fef9c3; color: #854d0e; }
.lms-retrieval-rating-struggled { background: #fee2e2; color: #b91c1c; }


/* ═══════════════════════════════════════════════════════════════
   BUILD GROUP 12 — PRIN-SIMPLES + KNOWLEDGE DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

/* Prin-simple button in note actions */
.my-lms-prinsimple-btn {
    color: #92400e;
    border-color: #fde68a;
    background: #fffbeb;
}
.my-lms-prinsimple-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #78350f;
}
.my-lms-prinsimple-btn.my-lms-prinsimple-active {
    background: #f59e0b;
    border-color: #d97706;
    color: #fff;
    font-weight: 700;
}
.my-lms-prinsimple-btn.my-lms-prinsimple-active:hover {
    background: #d97706;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUILD GROUP 14 — Orientation, Effort Warning, Mistake Journal, Integrated Check
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Shared modal overlay ─────────────────────────────────────────────────── */
.lms-effort-warning-overlay,
.lms-integrated-check-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.lms-modal-open {
    overflow: hidden;
}

/* ── Misinterpreted Effort Warning Modal ──────────────────────────────────── */
.lms-effort-warning-modal {
    background: #fff;
    border-radius: 14px;
    padding: 36px 40px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    text-align: center;
}

.lms-effort-warning-icon {
    font-size: 42px;
    margin-bottom: 16px;
    line-height: 1;
}

.lms-effort-warning-headline {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 14px;
}

.lms-effort-warning-body {
    font-size: 18px;
    font-weight: 600;
    color: #1d4ed8;
    margin: 0 0 12px;
    line-height: 1.4;
}

.lms-effort-warning-sub {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 24px;
}

.lms-effort-warning-dismiss {
    font-size: 15px;
    padding: 10px 28px !important;
    border-radius: 8px !important;
}

/* ── Isolated / Integrated Self-Check Modal ───────────────────────────────── */
.lms-integrated-check-modal {
    background: #fff;
    border-radius: 14px;
    padding: 32px 36px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    text-align: center;
}

.lms-integrated-check-icon {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
}

.lms-integrated-check-headline {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.lms-integrated-check-body {
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
    margin: 0 0 8px;
}

.lms-integrated-check-sub {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 20px;
}

.lms-integrated-check-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.lms-integrated-check-btns .my-lms-btn {
    font-size: 13px;
    padding: 8px 16px !important;
    flex: 1;
    min-width: 160px;
    max-width: 220px;
}

.lms-integrated-check-skip {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
}

.lms-integrated-check-skip:hover { color: #6b7280; }

.lms-integrated-check-feedback {
    margin-top: 16px;
    font-size: 13px;
    color: #374151;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.5;
}

/* ── Mistake Journal template ─────────────────────────────────────────────── */
.my-lms-mj-wrap {
    padding: 4px 0;
}

.my-lms-mj-hint {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 16px;
    line-height: 1.5;
}

.my-lms-mj-field-wrap {
    margin-bottom: 16px;
}

.my-lms-mj-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.my-lms-mj-optional {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
}

.my-lms-mj-field {
    min-height: 80px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: #111827;
    line-height: 1.6;
    outline: none;
    transition: border-color 0.15s;
    background: #fff;
}

.my-lms-mj-field:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    display: block;
}

.my-lms-mj-field:focus { border-color: #6366f1; }

.my-lms-mj-field-wrong { min-height: 90px; }
.my-lms-mj-field-tried { min-height: 70px; }
.my-lms-mj-field-learned { min-height: 70px; }

.my-lms-mj-private-notice {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
}

/* Mistake Journal note display in notes list */
.lms-mistake-field {
    margin-bottom: 10px;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
}
.lms-mistake-field strong {
    color: #111827;
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

/* ── Orientation Lesson ───────────────────────────────────────────────────── */
.lms-orientation-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 0 40px;
}

.lms-orientation-header {
    text-align: center;
    margin-bottom: 32px;
}

.lms-orientation-badge {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 100px;
}

.lms-orient-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 36px;
    padding: 24px 28px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.lms-orient-section-intro      { border-left: 4px solid #6366f1; background: #f5f3ff; }
.lms-orient-section-difficulty { border-left: 4px solid #ef4444; background: #fff7f7; }
.lms-orient-section-effort     { border-left: 4px solid #f59e0b; background: #fffbeb; }
.lms-orient-section-tools      { border-left: 4px solid #10b981; background: #f0fdf4; }
.lms-orient-section-closing    { border-left: 4px solid #3b82f6; background: #eff6ff; }

.lms-orient-section-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 42px;
    text-align: center;
    margin-top: 2px;
    line-height: 1;
}

.lms-orient-section-content {
    flex: 1;
    min-width: 0;
}

.lms-orient-section-headline {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
    line-height: 1.3;
}

.lms-orient-section-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.75;
    white-space: pre-line;
}

.lms-orientation-footer {
    text-align: center;
    margin-top: 8px;
    padding: 20px 28px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.lms-orientation-proust {
    font-size: 15px;
    color: #64748b;
    font-style: italic;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .lms-orient-section {
        flex-direction: column;
        gap: 10px;
        padding: 18px 16px;
    }
    .lms-effort-warning-modal,
    .lms-integrated-check-modal {
        padding: 24px 20px;
    }
    .lms-integrated-check-btns { flex-direction: column; align-items: center; }
}

/* Mistake Journal note item styling */
.lms-mistake-journal-badge {
    background: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

.lms-note-is-mistake-journal {
    border-left: 3px solid #f59e0b !important;
    background: #fffdf5 !important;
}

.lms-mistake-journal-note {
    font-size: 14px;
}

/* Orientation lesson: admin meta box clean up */
#my-lms-orientation-settings textarea,
#my-lms-orientation-settings input[type="text"] {
    font-family: inherit;
    line-height: 1.5;
}

/* ============================================================
   BUILD GROUP 15 — Pre-Lesson Self-Assessment, Prerequisite
   Prompts, and Scaffold Framing
   ============================================================ */

/* ── Pre-Lesson Self-Assessment Overlay ───────────────────── */

.my-lms-pre-lesson-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    animation: lmsFadeIn 0.3s ease;
}

.my-lms-pre-lesson-overlay.my-lms-pre-lesson-exiting {
    animation: lmsFadeOut 0.35s ease forwards;
}

@keyframes lmsFadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes lmsFadeOut { from { opacity:1; } to { opacity:0; } }

.my-lms-pre-lesson-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22), 0 4px 16px rgba(0,0,0,0.10);
    max-width: 520px;
    width: 100%;
    padding: 36px 32px 28px;
    animation: lmsSlideUp 0.32s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes lmsSlideUp {
    from { transform: translateY(32px); opacity:0; }
    to   { transform: translateY(0);    opacity:1; }
}

.my-lms-pre-lesson-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.my-lms-pre-lesson-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.my-lms-pre-lesson-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.my-lms-pre-lesson-subtitle {
    font-size: 14px;
    color: #64748b;
}

.my-lms-pre-lesson-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.my-lms-pre-lesson-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
    font-family: inherit;
}

.my-lms-pre-lesson-opt:hover {
    border-color: #93c5fd;
    background: #eff6ff;
    transform: translateX(2px);
}

.my-lms-pre-lesson-opt.my-lms-pre-lesson-opt-selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.my-lms-pre-lesson-opt-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.my-lms-pre-lesson-opt-label {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.4;
}

.my-lms-pre-lesson-feynman {
    margin-bottom: 16px;
}

.my-lms-pre-lesson-feynman-inner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px 18px;
}

.my-lms-pre-lesson-feynman-inner strong {
    display: block;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 6px;
}

.my-lms-pre-lesson-feynman-inner p {
    font-size: 13px;
    color: #78350f;
    margin: 0 0 10px;
    line-height: 1.5;
}

.my-lms-pre-lesson-feynman-input {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
}

.my-lms-pre-lesson-footer {
    text-align: right;
}

/* ── Prerequisite Concept Prompt ──────────────────────────── */

.my-lms-prereq-prompt {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    animation: lmsFadeIn 0.25s ease;
}

.my-lms-prereq-prompt-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
}

.my-lms-prereq-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.my-lms-prereq-content {
    flex: 1;
    min-width: 0;
}

.my-lms-prereq-content strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 5px;
}

.my-lms-prereq-list {
    margin: 0 0 6px 0;
    padding-left: 18px;
}

.my-lms-prereq-list li {
    font-size: 13px;
    color: #0c4a6e;
    margin-bottom: 2px;
}

.my-lms-prereq-note {
    font-size: 12px;
    color: #0369a1;
    font-style: italic;
}

.my-lms-prereq-dismiss {
    flex-shrink: 0;
    background: none;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: #0369a1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
    margin-top: 2px;
}

.my-lms-prereq-dismiss:hover {
    background: #bae6fd;
    color: #0c4a6e;
}

/* ── Scaffold Framing Banner ──────────────────────────────── */

.my-lms-scaffold-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 8px 0 10px;
}

.my-lms-scaffold-banner-text {
    font-size: 13px;
    color: #166534;
    line-height: 1.5;
    flex: 1;
}

.my-lms-scaffold-banner-text em {
    font-style: italic;
}

.my-lms-scaffold-banner-dismiss {
    flex-shrink: 0;
    background: none;
    border: 1px solid #86efac;
    border-radius: 5px;
    padding: 4px 10px;
    font-size: 12px;
    color: #166534;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.my-lms-scaffold-banner-dismiss:hover {
    background: #bbf7d0;
}

/* Body scroll lock when pre-lesson overlay is open */
body.lms-modal-open {
    overflow: hidden;
}

/* ── DEPENDENCY MAP TEMPLATE ───────────────────────────────────────────────── */

.my-lms-depmap-wrap {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.my-lms-depmap-hint {
    padding: 9px 14px;
    font-size: 12px;
    color: #4b5563;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    line-height: 1.5;
}

.my-lms-depmap-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fafafa;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
}

.my-lms-depmap-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 14px;
    background: #f9fafb;
    border-bottom: 1px solid #e9ecef;
    font-size: 11px;
    color: #6b7280;
    flex-wrap: wrap;
}

.my-lms-depmap-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.my-lms-depmap-legend-normal::before {
    content: '';
    display: inline-block;
    width: 12px; height: 12px;
    border: 2px solid #6366f1;
    border-radius: 3px;
    background: #fff;
}

.my-lms-depmap-legend-constraint::before {
    content: '';
    display: inline-block;
    width: 12px; height: 12px;
    border: 2.5px solid #f59e0b;
    border-radius: 3px;
    background: #fffbeb;
}

.my-lms-depmap-legend-arrow {
    font-family: monospace;
    color: #6366f1;
}

.my-lms-depmap-stage-wrap {
    background: #fafbfc;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.my-lms-depmap-stage {
    display: block;
    width: 100%;
    height: 300px;
    cursor: crosshair;
    touch-action: none;
}

.my-lms-depmap-constraint-wrap {
    padding: 8px 14px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.my-lms-depmap-constraint-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #92400e;
    white-space: nowrap;
}

.my-lms-depmap-constraint-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-lms-depmap-constraint-name {
    font-weight: 700;
    color: #78350f;
    font-size: 13px;
    background: #fef3c7;
    border: 1.5px solid #f59e0b;
    border-radius: 5px;
    padding: 1px 8px;
}

.my-lms-depmap-constraint-count {
    font-size: 11px;
    color: #92400e;
}

.my-lms-depmap-rebuild-wrap {
    padding: 10px 14px;
}

.my-lms-depmap-rebuild-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: 6px;
}

.my-lms-depmap-rebuild-field {
    min-height: 70px;
    padding: 9px 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: #1f2937;
    line-height: 1.65;
    outline: none;
    border: 1.5px solid #e2e8f0;
    border-radius: 6px;
    background: #fffbeb;
}

.my-lms-depmap-rebuild-field:focus {
    border-color: #f59e0b;
    background: #fef9ee;
}

.my-lms-depmap-rebuild-field:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    font-style: italic;
}

/* ── DEPENDENCY MAP NOTE (saved card display) ──────────────────────────────── */

.lms-depmap-note { font-size: 13.5px; }

.lms-depmap-note-header {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px 6px 0 0;
    padding: 6px 12px;
    letter-spacing: .01em;
}

.lms-depmap-note-nodes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 4px;
}

.lms-depmap-node-chip {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 5px;
    border: 1.5px solid #6366f1;
    background: #eef2ff;
    color: #3730a3;
}

.lms-depmap-node-chip.lms-depmap-node-constraint {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #78350f;
    font-weight: 700;
}

.lms-depmap-note-arrows {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 4px 12px 6px;
}

.lms-depmap-arrow-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11.5px;
    color: #4b5563;
    background: #f3f4f6;
    border-radius: 4px;
    padding: 2px 7px;
}

.lms-depmap-arrow-glyph {
    color: #6366f1;
    font-weight: 700;
}

.lms-depmap-arrow-label {
    color: #9ca3af;
    font-style: italic;
}

.lms-depmap-note-constraint {
    margin: 4px 12px 6px;
    padding: 5px 10px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    font-size: 12px;
    color: #92400e;
}

.lms-depmap-note-synthesis {
    border-top: 1px solid #fde68a;
    padding: 8px 12px;
    background: #fefce8;
}

.lms-depmap-synthesis-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #92400e;
    margin-bottom: 4px;
}

.lms-depmap-synthesis-body {
    font-size: 13px;
    line-height: 1.6;
    color: #1f2937;
}

/* ── Return To triage sub-tip ──────────────────────────────────────────────── */

.my-lms-return-to-triage-sub {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    color: #6b7280;
    font-style: italic;
}

/* ── GLOSSARY TERM TOOLTIPS ────────────────────────────────────────────────── */

.lms-glossary-term {
    display: inline;
    cursor: help;
}

.lms-glossary-term-link {
    color: #4338ca;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    font-weight: 600;
    transition: color .12s;
}

.lms-glossary-term-link:hover {
    color: #6366f1;
    text-decoration-style: solid;
}

/* Shared tooltip element — appended to body, absolutely positioned */
.lms-glossary-tooltip {
    position: absolute;
    z-index: 99999;
    max-width: 300px;
    min-width: 180px;
    background: #1f2937;
    color: #f9fafb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.55;
    box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .15s, transform .15s;
}

.lms-glossary-tooltip.lms-glossary-tooltip-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.lms-glossary-tooltip-term {
    font-weight: 700;
    font-size: 13.5px;
    color: #e0e7ff;
    margin-bottom: 4px;
}

.lms-glossary-tooltip-def {
    color: #d1d5db;
    font-size: 12.5px;
    line-height: 1.55;
}

.lms-glossary-tooltip-link {
    margin-top: 7px;
    font-size: 11px;
    color: #818cf8;
    font-style: italic;
}

/* ── GLOSSARY ADMIN PAGE ───────────────────────────────────────────────────── */

.my-lms-glossary-form-wrap {
    background: #f9fafb;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    max-width: 780px;
}

.my-lms-glossary-form-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 14px;
}

.my-lms-glossary-form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.my-lms-glossary-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
}

.my-lms-glossary-form-field label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.my-lms-glossary-form-field-def {
    flex: 1;
}

.my-lms-glossary-table {
    max-width: 900px;
}

/* ── Return To — foundational aging nudge (2+ weeks) ──────────────────────── */

.my-lms-rt-foundational-nudge {
    font-size: 11.5px;
    color: #7c3aed;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 6px;
    padding: 5px 9px;
    margin-top: 5px;
    line-height: 1.5;
}

/* ── Calibrated Encouragement Toast ───────────────────────────────────────── */

#lms-encouragement-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: opacity .35s ease, transform .35s ease;
    background: #0f172a;
    color: #f1f5f9;
    border: 1px solid #334155;
    border-left: 3px solid #10b981;
    border-radius: 12px;
    padding: 13px 16px 13px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    pointer-events: all;
}

#lms-encouragement-toast.lms-enc-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.lms-enc-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.lms-enc-message {
    font-size: 13px;
    line-height: 1.5;
    color: #e2e8f0;
    flex: 1;
}

.lms-enc-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
    transition: color .12s;
}

.lms-enc-close:hover { color: #e2e8f0; }

/* ── Struggle History section (dashboard) ─────────────────────────────────── */

.dash-struggle-empty {
    text-align: center;
    padding: 36px;
    color: #94a3b8;
    background: #fff;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.7;
}

.dash-struggle-empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.dash-struggle-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-struggle-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #10b981;
    border-radius: 10px;
    padding: 13px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dash-struggle-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.dash-struggle-body {
    flex: 1;
    min-width: 0;
}

.dash-struggle-excerpt {
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.4;
}

.dash-struggle-confusion {
    font-size: 12px;
    color: #6366f1;
    font-style: italic;
    margin-bottom: 5px;
}

.dash-struggle-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dash-struggle-duration {
    font-size: 11.5px;
    font-weight: 700;
    color: #10b981;
    background: #ecfdf5;
    border-radius: 6px;
    padding: 2px 7px;
}

.dash-struggle-dates {
    font-size: 11px;
    color: #94a3b8;
}

.dash-struggle-course {
    font-size: 11px;
    color: #6366f1;
    background: #eef2ff;
    border-radius: 5px;
    padding: 1px 6px;
}

.dash-struggle-count-badge {
    font-size: 11.5px;
    font-weight: 700;
    color: #10b981;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 2px 9px;
    margin-left: 6px;
}

/* ── BUILD GROUP 19: Q/E/C · ATOMIC NUDGE UPDATE · COMPASS ─────────────────── */

/* ── Q/E/C template ─────────────────────────────────────────────────────────── */
.my-lms-qec-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.my-lms-qec-hint {
    font-size: 12.5px;
    color: #4f6272;
    background: #f0f4ff;
    border-left: 3px solid #6366f1;
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    line-height: 1.5;
}
.my-lms-qec-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.my-lms-qec-step-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.my-lms-qec-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}
.my-lms-qec-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
}
.my-lms-qec-field {
    min-height: 60px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 13px;
    color: #1f2937;
    background: #fff;
    outline: none;
    line-height: 1.55;
    transition: border-color 0.15s;
}
.my-lms-qec-field:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.1);
}
.my-lms-qec-field-q { border-top: 2px solid #6366f1; }
.my-lms-qec-field-e { border-top: 2px solid #10b981; }
.my-lms-qec-field-c { border-top: 2px solid #f59e0b; }
.my-lms-qec-save-notice {
    font-size: 11.5px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 10px;
    line-height: 1.5;
}
/* Rendered Q/E/C note display */
.lms-qec-note { display: flex; flex-direction: column; gap: 6px; }
.lms-qec-atomic { font-size: 13px; color: #374151; line-height: 1.55; }
.lms-qec-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    font-size: 10px; font-weight: 800; color: #fff;
    margin-right: 4px; vertical-align: middle;
}
.lms-qec-atomic-q .lms-qec-badge { background: #6366f1; }
.lms-qec-atomic-e .lms-qec-badge { background: #10b981; }
.lms-qec-atomic-c .lms-qec-badge { background: #f59e0b; }

/* ── Atomic nudge update — stronger "why" message ──────────────────────────── */
.my-lms-atomic-nudge strong { font-weight: 700; }

/* ── Compass canvas overlay toggle button ──────────────────────────────────── */
.my-lms-canvas-compass-toggle { border-color: #6366f1; color: #6366f1; }
.my-lms-canvas-compass-toggle.my-lms-canvas-compass-on {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}
.lms-compass-canvas-overlay {
    pointer-events: none;
    position: absolute;
    top: 0; left: 0;
}

/* ── Compass modal overlay ──────────────────────────────────────────────────── */
.lms-compass-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.lms-compass-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    padding: 26px 28px 22px;
    width: min(680px, 96vw);
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.lms-compass-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.lms-compass-modal-icon { font-size: 26px; line-height: 1; }
.lms-compass-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 3px;
}
.lms-compass-modal-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}
.lms-compass-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.lms-compass-direction {
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #f8fafc;
    transition: border-color 0.15s;
}
.lms-compass-direction[data-dir="north"] { border-top: 3px solid #6366f1; }
.lms-compass-direction[data-dir="west"]  { border-top: 3px solid #10b981; }
.lms-compass-direction[data-dir="east"]  { border-top: 3px solid #f59e0b; }
.lms-compass-direction[data-dir="south"] { border-top: 3px solid #ef4444; }
.lms-compass-dir-header {
    display: flex;
    align-items: center;
    gap: 5px;
}
.lms-compass-dir-icon { font-size: 15px; }
.lms-compass-dir-label { font-size: 12.5px; font-weight: 700; color: #374151; }
.lms-compass-dir-desc  { font-size: 11.5px; color: #64748b; line-height: 1.45; }
.lms-compass-field {
    min-height: 48px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 12.5px;
    color: #1f2937;
    background: #fff;
    outline: none;
    line-height: 1.5;
}
.lms-compass-field:focus { border-color: #6366f1; }
.lms-compass-filled-count {
    font-size: 12px;
    color: #64748b;
    text-align: right;
}
.lms-compass-count-num { font-weight: 700; color: #6366f1; }
.lms-compass-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.lms-compass-note-text {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin: 0;
}
/* Compass atomic notes in note display */
.lms-compass-atomic { font-size: 12.5px; color: #374151; line-height: 1.5; padding: 3px 0; }
.lms-compass-atomic-badge {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    padding: 1px 5px; border-radius: 4px;
    background: #eef2ff; color: #6366f1;
    margin-right: 4px;
}
.lms-compass-dir-north .lms-compass-atomic-badge { background: #eef2ff; color: #6366f1; }
.lms-compass-dir-west  .lms-compass-atomic-badge { background: #ecfdf5; color: #059669; }
.lms-compass-dir-east  .lms-compass-atomic-badge { background: #fffbeb; color: #d97706; }
.lms-compass-dir-south .lms-compass-atomic-badge { background: #fef2f2; color: #dc2626; }

/* ── Link type selector overlay ─────────────────────────────────────────────── */
.lms-link-type-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.4);
    z-index: 10015;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(1px);
}
.lms-link-type-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    padding: 20px 22px 16px;
    width: min(420px, 94vw);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.lms-link-type-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 22px;
}
.lms-link-type-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 3px;
}
.lms-link-type-subtitle {
    font-size: 11.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}
.lms-link-type-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lms-link-type-btn {
    text-align: left;
    padding: 9px 12px;
    font-size: 12.5px;
    font-weight: 500;
    border: 1.5px solid #e2e8f0;
    border-radius: 7px;
    background: #f8fafc;
    color: #374151;
    cursor: pointer;
    transition: all 0.12s;
}
.lms-link-type-btn:hover { border-color: #6366f1; background: #eef2ff; color: #4338ca; }
.lms-link-type-btn[data-link-type="origin"]:hover    { border-color: #6366f1; background: #eef2ff; }
.lms-link-type-btn[data-link-type="similar"]:hover   { border-color: #10b981; background: #ecfdf5; }
.lms-link-type-btn[data-link-type="competing"]:hover { border-color: #f59e0b; background: #fffbeb; }
.lms-link-type-btn[data-link-type="leads-to"]:hover  { border-color: #ef4444; background: #fef2f2; }
.lms-link-type-btn-skip {
    border-style: dashed;
    color: #94a3b8;
    font-size: 11.5px;
}
.lms-link-type-btn-skip:hover { border-color: #94a3b8; background: #f1f5f9; color: #64748b; }

/* ── Compass requirement note in form actions ──────────────────────────────── */
.my-lms-compass-link-pending { font-size: 11.5px; color: #d97706; }
.my-lms-compass-link-ok      { font-size: 11.5px; color: #10b981; }

/* ── Lesson Entry Record Panel ─────────────────────────────────────────────── */

.my-lms-entry-record {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.my-lms-entry-record-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.my-lms-entry-record-icon { font-size: 16px; flex-shrink: 0; }

.my-lms-entry-record-title {
    font-size: 12px;
    font-weight: 700;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.my-lms-entry-record-date {
    font-size: 11px;
    color: #6b7280;
    margin-left: auto;
}

.my-lms-entry-record-admin-btn {
    background: none;
    border: 1px solid #bbf7d0;
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 11px;
    color: #166534;
    cursor: pointer;
    font-family: inherit;
}
.my-lms-entry-record-admin-btn:hover { background: #dcfce7; }

.my-lms-entry-record-response {
    font-size: 14px;
    font-weight: 600;
    color: #15803d;
}

.my-lms-entry-record-feynman {
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 6px;
    padding: 10px 12px;
}

.my-lms-entry-record-feynman-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 6px;
}

.my-lms-entry-record-feynman-text {
    font-size: 13px;
    color: #1f2937;
    line-height: 1.65;
    white-space: pre-wrap;
}

/* Admin/mentor: all entries table */
.my-lms-entry-all-row {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}
.my-lms-entry-all-row:last-child { border-bottom: none; }
.my-lms-entry-all-name { font-size: 14px; font-weight: 600; color: #0f172a; }
.my-lms-entry-all-response { font-size: 13px; color: #374151; margin-top: 2px; }
.my-lms-entry-all-feynman {
    margin-top: 8px; padding: 8px 10px;
    background: #f8fafc; border-left: 3px solid #94a3b8;
    border-radius: 0 4px 4px 0; font-size: 12px; color: #475569;
    line-height: 1.6; white-space: pre-wrap;
}
.my-lms-entry-all-feynman-label {
    font-size: 10px; font-weight: 700; color: #9ca3af;
    text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px;
}

/* ── Feynman edit widget ──────────────────────────────────────────────────── */

.my-lms-entry-record-feynman-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 8px;
}

.my-lms-feynman-edit-btn {
    background: none;
    border: 1px solid #bbf7d0;
    border-radius: 5px;
    padding: 3px 9px;
    font-size: 11px;
    color: #166534;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}
.my-lms-feynman-edit-btn:hover { background: #dcfce7; }

.my-lms-entry-record-feynman-display {
    font-size: 13px;
    color: #1f2937;
    line-height: 1.7;
    white-space: pre-wrap;
    min-height: 20px;
}

.my-lms-entry-record-feynman-edit {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Glossary toggle — lesson page ─────────────────────────────────────────── */

.lms-glossary-toggle-bar {
    display: flex;
    align-items: center;
    margin: 10px 0 16px;
}

.lms-glossary-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #e0e7ff;
    border-radius: 20px;
    padding: 4px 12px 4px 8px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    color: #4338ca;
    transition: background .15s, border-color .15s;
    user-select: none;
}
.lms-glossary-toggle-btn:hover { background: #eef2ff; }

.lms-glossary-toggle-btn.lms-glossary-toggle-on  { background: #eef2ff; border-color: #a5b4fc; }
.lms-glossary-toggle-btn.lms-glossary-toggle-off { color: #9ca3af; border-color: #e5e7eb; }
.lms-glossary-toggle-btn.lms-glossary-toggle-off:hover { background: #f9fafb; }

.lms-glossary-toggle-icon  { font-size: 14px; }
.lms-glossary-toggle-label { font-weight: 500; }
.lms-glossary-toggle-state {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: #c7d2fe;
    color: #3730a3;
}
.lms-glossary-toggle-off .lms-glossary-toggle-state {
    background: #e5e7eb;
    color: #9ca3af;
}

/* Hidden state — glossary terms lose their styling but text remains readable */
.lms-glossary-term.lms-glossary-hidden {
    cursor: default;
}
.lms-glossary-term.lms-glossary-hidden .lms-glossary-term-link {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    pointer-events: none;
}
