/* Shared sidebar for the Minna no Nihongo Part 2 index page and all lesson pages. */

.mn-sidebar {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.mn-side-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
}

.mn-side-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: #212529;
}

.mn-side-lessons {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mn-side-lessons a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #343a40;
    transition: background-color .15s ease, color .15s ease;
}

.mn-side-lessons a:hover {
    background: #f1f3f5;
}

.mn-side-lessons a.active {
    background: #212529;
    color: #fff;
}

.mn-side-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e9ecef;
    font-size: .78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.mn-side-lessons a.active .mn-side-num {
    background: #fff;
    color: #212529;
}

.mn-side-name {
    font-size: .88rem;
    line-height: 1.3;
}

.mn-side-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    color: #0d6efd;
}

.mn-side-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 8px;
    background: #212529;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
    margin-bottom: 10px;
}

.mn-side-cta:hover { background: #000; color: #fff; }

.mn-side-cta-alt {
    background: #eef5ff;
    color: #0d6efd;
    margin-bottom: 0;
}

.mn-side-cta-alt:hover { background: #dfeaff; color: #0d6efd; }

.mn-side-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mn-side-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 8px;
    text-decoration: none;
    color: #343a40;
    font-size: .88rem;
}

.mn-side-links a:hover {
    background: #f1f3f5;
}

.mn-side-links a i {
    color: #6c757d;
    width: 16px;
    text-align: center;
}

.mn-side-app {
    text-align: center;
    background: linear-gradient(180deg, #f8fff9, #fff);
    border-color: #d7f0dd;
}

.mn-app-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #212529;
    color: #3ddc84;
    font-size: 1.5rem;
    margin: 0 auto 12px;
}

.mn-app-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 6px;
}

.mn-app-subtitle {
    font-size: .85rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0 0 16px;
}

.mn-app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    background: #212529;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: .88rem;
    transition: background-color .15s ease;
}

.mn-app-btn:hover { background: #000; color: #fff; }
.mn-app-btn i { color: #3ddc84; }

@media (max-width: 991.98px) {
    .mn-sidebar {
        position: static;
        max-height: none;
        margin-top: 32px;
    }
}

/* Grammar / Vocabulary × Part 1 / Part 2 switcher */
.mn-side-group { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6c757d; margin: 4px 0 8px; }
.mn-side-group i { margin-right: 4px; }
.mn-side-parts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.mn-side-parts a { display: block; border: 1px solid #e9ecef; border-radius: 8px; padding: 9px 10px; text-decoration: none; color: #212529; background: #fff; }
.mn-side-parts a:hover { border-color: #0d6efd; color: #0d6efd; }
.mn-side-parts a.active { background: #212529; border-color: #212529; color: #fff; }
.mn-side-parts b { display: block; font-size: .9rem; }
.mn-side-parts span { display: block; font-size: .75rem; opacity: .75; }

/* Lesson word list (grammar lesson pages) */
.mn-side-words { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mn-side-words a { display: flex; align-items: baseline; gap: 10px; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: #212529; min-width: 0; }
.mn-side-words a:hover { background: #f1f5ff; }
.mn-side-words b { flex: 0 0 auto; font-size: .98rem; font-weight: 700; }
.mn-side-words span { flex: 1 1 auto; min-width: 0; font-size: .8rem; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-side-words a:hover b { color: #0d6efd; }

.mn-side-title i { opacity: .55; margin-right: 4px; font-size: .9em; }
.mn-side-sub { display: block; font-size: .74rem; opacity: .65; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-side-name { min-width: 0; }
.mn-side-words a.active { background: #212529; color: #fff; }
.mn-side-words a.active span { color: rgba(255,255,255,.7); }
.mn-side-words a.active b { color: #fff; }
