.theme-education {
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.2), transparent 30%),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 28%),
        linear-gradient(140deg, #eef7ff 0%, #f8fbef 48%, #fff7ed 100%);
}

.theme-education .ds-brand-badge,
.theme-education .ds-btn {
    background: linear-gradient(135deg, #0ea5e9, #f59e0b);
    color: #fff;
    box-shadow: 0 14px 30px rgba(14, 165, 233, 0.24);
}

.education-shell {
    width: min(1440px, calc(100% - 32px));
}

.education-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
    gap: 20px;
    margin-bottom: 22px;
}

.education-hero-copy,
.education-hero-panel,
.education-admin,
.education-library,
.education-reader {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(16, 34, 51, 0.12);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(10, 33, 53, 0.14);
}

.education-hero-copy {
    padding: 34px;
}

.education-hero-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 3.4vw, 3.35rem);
    line-height: 1.08;
    font-weight: 900;
}

.education-hero-copy p {
    margin: 0 0 22px;
    max-width: 820px;
    color: #44576a;
    line-height: 1.7;
}

.education-hero-panel {
    padding: 24px;
    display: grid;
    gap: 14px;
}

.education-stat {
    padding: 22px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.education-stat span {
    display: block;
    color: #64748b;
    font-weight: 700;
}

.education-stat strong {
    display: block;
    color: #0f172a;
    font-size: 2.4rem;
    font-weight: 900;
}

.education-admin {
    padding: 24px;
    margin-bottom: 22px;
}

.education-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
}

.education-section-head h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 900;
    color: #0f172a;
}

.education-section-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.education-upload-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.education-field,
.education-file-field {
    display: grid;
    gap: 8px;
}

.education-field-wide {
    grid-column: span 2;
}

.education-field label,
.education-file-field label {
    color: #334155;
    font-weight: 800;
    font-size: 0.9rem;
}

.education-file-field label {
    min-height: 48px;
    border: 1px dashed rgba(14, 165, 233, 0.42);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #f0f9ff;
    cursor: pointer;
}

.education-file-field input {
    width: 100%;
    font-size: 0.86rem;
}

.education-submit {
    justify-content: center;
    min-height: 48px;
}

.education-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.education-library,
.education-reader {
    padding: 20px;
}

.education-reader:fullscreen {
    width: 100vw;
    height: 100vh;
    padding: 16px;
    border-radius: 0;
    background: #eef2f7;
    overflow: hidden;
}

.education-reader:fullscreen .reader-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.education-reader:fullscreen .reader-stage {
    height: calc(100vh - 96px);
    min-height: 0;
    margin-top: 12px;
    background: #e2e8f0;
}

.education-reader:fullscreen .reader-page canvas {
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.24);
}

.book-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    max-height: 720px;
    overflow: auto;
    padding-right: 4px;
}

.book-card {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #fff;
    border-radius: 18px;
    padding: 14px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.book-card:hover,
.book-card.active {
    border-color: rgba(14, 165, 233, 0.55);
    background: #f0f9ff;
}

.book-card strong {
    display: block;
    color: #0f172a;
    font-weight: 900;
    line-height: 1.35;
}

.book-card span {
    display: block;
    color: #64748b;
    font-size: 0.88rem;
    margin-top: 6px;
}

.book-card .book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.book-card .book-meta em {
    font-style: normal;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
}

.reader-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.reader-title {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.reader-title strong {
    color: #0f172a;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-title span {
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
}

.reader-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.reader-btn {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reader-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.reader-stage {
    min-height: 640px;
    padding: 22px;
    background: #f8fafc;
    border-radius: 22px;
    margin-top: 16px;
    overflow: auto;
}

.reader-empty {
    min-height: 560px;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #64748b;
    text-align: center;
}

.reader-empty i {
    font-size: 2.4rem;
    color: #0ea5e9;
}

.reader-spread {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.reader-page {
    display: grid;
    justify-items: center;
    gap: 8px;
}

.reader-page canvas {
    max-width: 100%;
    height: auto;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}

.reader-page-label {
    color: #64748b;
    font-weight: 800;
    font-size: 0.85rem;
}

@media (max-width: 1120px) {
    .education-hero,
    .education-layout {
        grid-template-columns: 1fr;
    }

    .education-upload-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .education-shell {
        width: min(100% - 20px, 720px);
        padding-top: 14px;
    }

    .education-hero-copy,
    .education-hero-panel,
    .education-admin,
    .education-library,
    .education-reader {
        border-radius: 20px;
    }

    .education-hero-copy,
    .education-admin,
    .education-library,
    .education-reader {
        padding: 16px;
    }

    .education-upload-form {
        grid-template-columns: 1fr;
    }

    .education-field-wide {
        grid-column: auto;
    }

    .reader-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .reader-actions {
        justify-content: stretch;
    }

    .reader-btn {
        flex: 1;
    }

    .reader-stage {
        min-height: 480px;
        padding: 12px;
    }

    .reader-spread {
        grid-template-columns: 1fr;
    }
}
