
/* =========================
   FULL NOTES PAGE
========================= */

.view-notes-page {
    width: min(980px, calc(100vw - 32px));
    margin: 24px auto 48px;
    color: #1f2937;
}

.view-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.view-notes-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: 0;
}

.view-notes-list {
    display: grid;
    gap: 14px;
}

.view-notes-page .note-item {
    margin-bottom: 0;
}

.view-notes-page .note-card {
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.view-notes-page .note-card:hover {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.view-notes-page .note-post a {
    color: inherit;
    text-decoration: none;
}

.view-notes-page .note-post a:hover {
    text-decoration: underline;
}

.note-date {
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.note-site-name {
    display: inline-block;
    margin-left: 8px;
    color: #0f766e;
    font-weight: 800;
}

.notes-export-btn {
    flex: 0 0 auto;
    background: #0f766e;
    color: #fff;
    border: 1px solid rgba(94, 234, 212, 0.35);
    border-radius: 7px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 6px 14px rgba(15, 118, 110, 0.18);
}

.notes-export-btn:hover {
    background: #115e59;
}

.notes-empty-message {
    margin: 0;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.notes-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.notes-more-btn {
    min-width: 132px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid rgba(14, 165, 233, 0.28);
    border-radius: 8px;
    background: #0f172a;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.notes-more-btn:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.notes-more-btn:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.notes-print-root {
    display: none;
}

@media (max-width: 600px) {
    #notes-sidebar {
        right: -100vw;
        width: 100vw;
        padding: 14px 14px calc(96px + env(safe-area-inset-bottom));
    }

    .notes-header {
        top: -14px;
        margin: -14px -14px 12px;
        padding: 12px 14px !important;
    }

    .note-card {
        padding: 11px;
    }

    .view-notes-page {
        width: min(100% - 24px, 980px);
        margin-top: 16px;
    }

    .view-notes-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .notes-export-btn {
        width: 100%;
    }
}

@media print {
    body * {
        visibility: hidden !important;
    }

    #notes-print-root,
    #notes-print-root * {
        visibility: visible !important;
    }

    #notes-print-root {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        margin: 0;
        padding: 0;
        color: #111827;
        background: #fff;
    }

    .notes-print-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid #cbd5e1;
    }

    .notes-print-header h2 {
        margin: 0 0 6px;
        font-size: 22px;
        line-height: 1.25;
        font-weight: 700;
    }

    .notes-print-subject {
        color: #475569;
        font-size: 13px;
        font-weight: 700;
    }

    .notes-export-btn,
    .delete-note-btn,
    #notes-toggle-btn,
    #notes-sidebar,
    #notes-overlay,
    #subjects-toggle,
    #subjects-panel,
    #subjects-overlay {
        display: none !important;
    }

    #notes-print-root .note-item {
        margin-bottom: 12px;
    }

    #notes-print-root .note-card {
        break-inside: avoid;
        box-shadow: none;
    }

    #notes-print-root .note-post a {
        text-decoration: none;
    }
}



.notes-layout{
    display:flex;
    gap:24px;
    align-items:flex-start;
}

.notes-sidebar{
    width:250px;
    flex-shrink:0;
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:10px;
    padding:15px;
    position:sticky;
    top:20px;
}

.subject-link{
    display:block;
    padding:10px 12px;
    margin-bottom:6px;
    text-decoration:none;
    color:#333;
    border-radius:6px;
    transition:.2s;
}

.subject-link:hover{
    background:#f3f4f6;
}

.notes-content{
    flex:1;
    min-width:0;
}

.subject-group{
    margin-bottom:35px;
}

.subject-heading{
    font-size:22px;
    font-weight:700;
    margin-bottom:15px;
    padding-bottom:10px;
    border-bottom:2px solid #e5e5e5;
    scroll-margin-top:20px;
}

/* =========================
   SUBJECTS SLIDE PANEL
========================= */

.subjects-float-btn {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1000000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.subjects-float-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.28);
}

.subjects-float-btn.hide {
    opacity: 0;
    transform: translateY(-72px);
    pointer-events: none;
}

.subjects-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000001;
    background: rgba(15, 23, 42, 0.36);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.subjects-overlay.active {
    opacity: 1;
    visibility: visible;
}

.subjects-slide-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000002;
    width: min(340px, 88vw);
    height: 100vh;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    background: #ffffff;
    color: #111827;
    border-right: 1px solid rgba(148, 163, 184, 0.26);
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.22);
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 0.26s ease;
}

.subjects-slide-panel.active {
    transform: translateX(0);
}

.subjects-panel-top {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.96) 100%);
    border-bottom: 1px solid #e5e7eb;
}

.subjects-panel-top span {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
}

.subjects-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.subjects-close-btn:hover {
    background: #eef2f7;
    transform: translateY(-1px);
}

.subjects-list {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.subjects-list .panel-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #ffffff;
    color: #243041;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.subjects-list .panel-link:hover,
.subjects-list .panel-link:focus-visible,
.subjects-list .panel-link.active {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #155e75;
    transform: translateX(2px);
}

.subjects-list .panel-link.active {
    box-shadow: inset 3px 0 0 #0891b2;
}

@media (max-width: 600px) {
    .subjects-float-btn {
        top: 14px;
        left: 14px;
        min-height: 40px;
        padding: 9px 14px;
        font-size: 13px;
    }

    .subjects-slide-panel {
        width: min(310px, 86vw);
    }
}







