html {
    scroll-behavior: smooth;
}

.skoulou-file-picker {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.skoulou-file-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    padding: .58rem 1rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
    box-shadow: 0 8px 16px rgba(79, 70, 229, .24);
}

.skoulou-file-trigger:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 10px 18px rgba(79, 70, 229, .28);
}

.skoulou-file-trigger-disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    filter: none;
}

.skoulou-file-selected-name {
    font-size: .8rem;
    font-weight: 600;
    color: #475569;
    word-break: break-word;
}

.skoulou-file-input::file-selector-button {
    margin-right: .85rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #fff;
    padding: .58rem 1rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
    box-shadow: 0 8px 16px rgba(79, 70, 229, .24);
}

.skoulou-file-input:hover::file-selector-button {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 10px 18px rgba(79, 70, 229, .28);
}

.skoulou-file-input:active::file-selector-button {
    transform: translateY(0);
    filter: brightness(.98);
}

.skoulou-file-input:disabled::file-selector-button,
.skoulou-file-input[disabled]::file-selector-button {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    filter: none;
}

.skoulou-modal-surface {
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.skoulou-modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.25rem;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 rgba(148, 163, 184, 0.18);
}

.skoulou-modal-scroll::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.skoulou-modal-scroll::-webkit-scrollbar-track {
    margin: 0.65rem 0;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 999px;
}

.skoulou-modal-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(180deg, #64748b, #475569);
    background-clip: padding-box;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.skoulou-modal-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #475569, #334155);
    background-clip: padding-box;
}

.skoulou-modal-scroll .validation-summary-errors {
    position: sticky;
    top: 0;
    z-index: 25;
    margin: 0 0 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 0.95rem;
    border: 1px solid #fecaca;
    background: rgba(255, 241, 242, 0.98);
    color: #b91c1c;
    backdrop-filter: blur(2px);
}

.skoulou-modal-scroll .validation-summary-errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.skoulou-modal-scroll .validation-summary-errors li {
    margin: 0.15rem 0;
}

.skoulou-modal-scroll .skoulou-modal-sticky-messages {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: -0.1rem 0 0.9rem;
    padding-top: 0.1rem;
    background: linear-gradient(to bottom, rgba(255,255,255,0.98), rgba(255,255,255,0.9) 78%, rgba(255,255,255,0));
    backdrop-filter: blur(2px);
}

.skoulouapp-formula-palette {
    position: fixed;
    z-index: 4000;
    width: min(520px, calc(100vw - 24px));
    max-height: min(76vh, 680px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.1rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.24);
}

.skoulouapp-formula-palette-title {
    margin-bottom: .9rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
}

.skoulouapp-formula-group + .skoulouapp-formula-group {
    margin-top: .7rem;
}

.skoulouapp-formula-group h3 {
    margin: 0 0 .35rem;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #475569;
}

.skoulouapp-formula-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
}

.skoulouapp-formula-template {
    position: relative;
    display: flex;
    min-height: 4.2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    border: 1px solid #e2e8f0;
    border-radius: .55rem;
    background: #f8fafc;
    padding: .45rem .35rem;
    color: #0f172a;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.skoulouapp-formula-template:hover,
.skoulouapp-formula-template:focus-visible {
    border-color: var(--skoulou-accent-1);
    background: #eef2ff;
    outline: none;
    transform: translateY(-1px);
}

.skoulouapp-formula-preview {
    min-height: 1.35rem;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
}

.skoulouapp-formula-label {
    font-size: .72rem;
    font-weight: 700;
    color: #475569;
    text-align: center;
}

.skoulouapp-formula-favorite-toggle {
    position: absolute;
    top: .2rem;
    right: .2rem;
    width: 1.3rem;
    height: 1.3rem;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .9);
    color: #64748b;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.skoulouapp-formula-favorite-toggle.is-active {
    color: #f59e0b;
}

.skoulouapp-formula-delete-toggle {
    color: #dc2626;
    background: rgba(254, 242, 242, .96);
}

.skoulouapp-formula-delete-toggle.is-active {
    color: #dc2626;
}

@media (max-width: 430px) {
    .skoulouapp-formula-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.skoulouapp-formula-palette-close {
    width: 100%;
    margin-top: 1rem;
    border: 0;
    border-radius: .65rem;
    background: #e2e8f0;
    padding: .6rem;
    font-size: .8rem;
    font-weight: 700;
    color: #334155;
}

.ql-editor .ql-formula[data-value] {
    cursor: pointer;
    border-radius: .3rem;
    font-size: inherit;
}

.ql-editor .ql-formula[data-value]:hover {
    background: #eef2ff;
    outline: 2px solid rgba(79, 70, 229, .22);
}

.skoulouapp-formula-editor {
    position: fixed;
    z-index: 4001;
    width: min(360px, calc(100vw - 24px));
    border: 1px solid #cbd5e1;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .24);
}

.skoulouapp-formula-editor-title {
    display: block;
    font-size: .8rem;
    font-weight: 800;
    color: #334155;
}

.skoulouapp-formula-editor-input {
    width: 100%;
    margin-top: .55rem;
    border: 1px solid #cbd5e1;
    border-radius: .6rem;
    padding: .65rem .75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .85rem;
    color: #0f172a;
}

.skoulouapp-formula-editor-preview {
    display: grid;
    min-height: 3.25rem;
    margin-top: .75rem;
    place-items: center;
    border-radius: .65rem;
    background: #f8fafc;
    padding: .6rem;
    overflow-x: auto;
}

.skoulouapp-formula-editor-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;
    margin-top: .85rem;
}

.skoulouapp-formula-editor-primary-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
}

.skoulouapp-formula-editor-actions button {
    border: 0;
    border-radius: .55rem;
    padding: .55rem .8rem;
    font-size: .78rem;
    font-weight: 700;
}

.skoulouapp-formula-editor-cancel {
    background: #e2e8f0;
    color: #334155;
}

.skoulouapp-formula-editor-save {
    background: #4f46e5;
    color: #ffffff;
}

.skoulouapp-formula-editor-favorite {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #86efac;
}

/* ==========================================================================
   Theme tokens — default palette ("Indigo/Cyan") + 5 alternative schemes.
   Switch by setting data-theme="ocean" | "coral" | "slate" | "sage" | "navy" on <html>.
   ========================================================================== */
:root,
[data-theme="navy"] {
    --skoulou-bg-from: #f4f7fb;
    --skoulou-bg-to: #e6ecf5;
    --skoulou-bg-page: #f4f7fb;
    --skoulou-accent-1: #1e3a8a;
    --skoulou-accent-1-dark: #172554;
    --skoulou-accent-2: #2563eb;
    --skoulou-accent-2-dark: #1d4ed8;
    --skoulou-sidebar-from: #050b1f;
    --skoulou-sidebar-via: #1e3a8a;
    --skoulou-sidebar-to: #2563eb;
    --skoulou-kicker: #1e3a8a;
    --skoulou-glow-1: rgba(30, 58, 138, 0.18);
    --skoulou-glow-2: rgba(37, 99, 235, 0.14);
    --skoulou-selection: rgba(30, 58, 138, 0.25);
    --skoulou-focus-ring: rgba(30, 58, 138, 0.35);
}

[data-theme="ocean"] {
    --skoulou-bg-from: #f0f9ff;
    --skoulou-bg-to: #e0f2fe;
    --skoulou-bg-page: #f0f9ff;
    --skoulou-accent-1: #0284c7;
    --skoulou-accent-1-dark: #075985;
    --skoulou-accent-2: #14b8a6;
    --skoulou-accent-2-dark: #0f766e;
    --skoulou-sidebar-from: #0c1e3d;
    --skoulou-sidebar-via: #0369a1;
    --skoulou-sidebar-to: #14b8a6;
    --skoulou-kicker: #0369a1;
    --skoulou-glow-1: rgba(2, 132, 199, 0.16);
    --skoulou-glow-2: rgba(20, 184, 166, 0.14);
    --skoulou-selection: rgba(2, 132, 199, 0.25);
    --skoulou-focus-ring: rgba(2, 132, 199, 0.35);
}

[data-theme="coral"] {
    --skoulou-bg-from: #fff5f2;
    --skoulou-bg-to: #ffe4de;
    --skoulou-bg-page: #fff5f2;
    --skoulou-accent-1: #ea580c;
    --skoulou-accent-1-dark: #c2410c;
    --skoulou-accent-2: #f43f5e;
    --skoulou-accent-2-dark: #be123c;
    --skoulou-sidebar-from: #4c0519;
    --skoulou-sidebar-via: #ea580c;
    --skoulou-sidebar-to: #f43f5e;
    --skoulou-kicker: #ea580c;
    --skoulou-glow-1: rgba(234, 88, 12, 0.18);
    --skoulou-glow-2: rgba(244, 63, 94, 0.14);
    --skoulou-selection: rgba(234, 88, 12, 0.25);
    --skoulou-focus-ring: rgba(234, 88, 12, 0.35);
}

[data-theme="slate"] {
    --skoulou-bg-from: #f8fafc;
    --skoulou-bg-to: #f1f5f9;
    --skoulou-bg-page: #f8fafc;
    --skoulou-accent-1: #334155;
    --skoulou-accent-1-dark: #1e293b;
    --skoulou-accent-2: #64748b;
    --skoulou-accent-2-dark: #475569;
    --skoulou-sidebar-from: #0f172a;
    --skoulou-sidebar-via: #334155;
    --skoulou-sidebar-to: #64748b;
    --skoulou-kicker: #334155;
    --skoulou-glow-1: rgba(51, 65, 85, 0.14);
    --skoulou-glow-2: rgba(100, 116, 139, 0.12);
    --skoulou-selection: rgba(51, 65, 85, 0.22);
    --skoulou-focus-ring: rgba(51, 65, 85, 0.3);
}

[data-theme="sage"] {
    --skoulou-bg-from: #f6f9f4;
    --skoulou-bg-to: #eaf1e4;
    --skoulou-bg-page: #f6f9f4;
    --skoulou-accent-1: #4d7c4a;
    --skoulou-accent-1-dark: #386641;
    --skoulou-accent-2: #84a98c;
    --skoulou-accent-2-dark: #6b8f71;
    --skoulou-sidebar-from: #1b2f1e;
    --skoulou-sidebar-via: #4d7c4a;
    --skoulou-sidebar-to: #84a98c;
    --skoulou-kicker: #4d7c4a;
    --skoulou-glow-1: rgba(77, 124, 74, 0.15);
    --skoulou-glow-2: rgba(132, 169, 140, 0.12);
    --skoulou-selection: rgba(77, 124, 74, 0.22);
    --skoulou-focus-ring: rgba(77, 124, 74, 0.3);
}


[id] {
    scroll-margin-top: 1.5rem;
}

/* ==========================================================================
   Theme-aware hero utility — replaces hardcoded Tailwind "from-indigo..."
   gradients on page hero banners so they follow the active color theme.
   ========================================================================== */
.skoulou-hero {
    background-image: linear-gradient(135deg, var(--skoulou-sidebar-from) 0%, var(--skoulou-sidebar-via) 55%, var(--skoulou-sidebar-to) 100%) !important;
    box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    position: relative;
    isolation: isolate;
}

.skoulou-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.10) 0%, transparent 45%),
                       radial-gradient(circle at 85% 85%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Deko-Elemente (.absolute) bleiben absolut, sonst nehmen sie Platz ein. */
.skoulou-hero > *:not(.absolute) {
    position: relative;
    z-index: 1;
}

.skoulou-hero-badge {
    background-image: linear-gradient(135deg, var(--skoulou-accent-1) 0%, var(--skoulou-accent-2) 100%) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skoulou-hero-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 32px -12px rgba(15, 23, 42, 0.35);
}

/* ======================================================================
   Unified teacher creation workspace
   ====================================================================== */
.teacher-create-shell {
    max-width: 86rem;
    margin-inline: auto;
}

.teacher-create-switch {
    width: fit-content;
}

.teacher-create-switch-btn {
    min-width: 11rem;
}

.teacher-create-context {
    border-left: 4px solid var(--skoulou-accent-2);
}

.teacher-create-embedded {
    margin-top: -0.1rem;
}

@media (max-width: 640px) {
    .teacher-create-switch {
        width: 100%;
    }

    .teacher-create-switch-btn {
        width: 100%;
        min-width: 0;
    }
}

/* ==========================================================================
   Student dashboard hero tuning (mobile-first readability + calmer layout)
   ========================================================================== */
.student-dashboard-hero {
    border-radius: 1.6rem !important;
}

.student-dashboard-upgrade-hint {
    max-width: 44rem;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .student-dashboard-page {
        gap: 0.9rem;
    }

    .student-dashboard-hero {
        padding: 1.15rem 1rem !important;
        border-radius: 1.35rem !important;
        box-shadow: 0 18px 40px -24px rgba(15, 23, 42, 0.52), 0 0 0 1px rgba(255, 255, 255, 0.12) inset !important;
    }

    .student-dashboard-hero h1 {
        margin-top: 0.55rem !important;
        font-size: 1.95rem !important;
        line-height: 1.12 !important;
    }

    .student-dashboard-hero p {
        line-height: 1.5;
    }

    .student-dashboard-meta {
        margin-top: 0.75rem !important;
        gap: 0.45rem !important;
    }

    .student-dashboard-meta .streak-badge,
    .student-dashboard-meta .xp-pill {
        width: 100%;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.45rem 0.68rem;
    }

    .student-dashboard-score-strip {
        margin-top: 0.75rem !important;
        margin-inline: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        gap: 0.55rem !important;
    }

    .student-dashboard-score-card {
        width: 100% !important;
        padding: 0.78rem 0.9rem !important;
        border-radius: 1rem !important;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.09)) !important;
    }

    .student-dashboard-score-card .text-2xl {
        font-size: 1.35rem !important;
        line-height: 1.1;
    }

    .student-dashboard-upgrade-hint {
        display: flex;
        width: 100%;
        margin-top: 0.75rem !important;
        border-radius: 1rem !important;
        padding: 0.72rem 0.85rem !important;
        font-size: 0.86rem !important;
        line-height: 1.4 !important;
    }

    .student-dashboard-actions {
        margin-top: 0.9rem !important;
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 0.45rem !important;
    }

    .student-dashboard-action {
        margin-left: 0 !important;
        width: 100%;
        min-height: 2.65rem;
        border-radius: 0.95rem !important;
        justify-content: center;
    }

    .student-dashboard-action-primary,
    .student-dashboard-action-secondary,
    .student-dashboard-action-locked {
        font-size: 0.86rem !important;
    }
}

/* Theme-aware solid control utility — replaces hardcoded bg-indigo-600/bg-violet-600/
   bg-emerald-600 CTA buttons and active-tab pills so they follow the active theme. */
.skoulou-btn-accent {
    background-image: none !important;
    background-color: var(--skoulou-accent-2) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.skoulou-btn-accent:hover {
    background-color: var(--skoulou-accent-2-dark) !important;
}

/* ==========================================================================
   Modern theme-aware form-control utility — consistent inputs/selects/
   textareas across the app: soft border, subtle shadow, smooth focus ring
   that follows the active color theme (via --skoulou-accent-2 / focus-ring).
   ========================================================================== */
.skoulou-input {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgb(226 232 240);
    background-color: #ffffff;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: rgb(15 23 42);
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.skoulou-input:hover {
    border-color: rgb(203 213 225);
}

.skoulou-input:focus {
    border-color: var(--skoulou-accent-2);
    box-shadow: 0 0 0 3px var(--skoulou-focus-ring), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.skoulou-input:disabled {
    background-color: rgb(248 250 252);
    color: rgb(100 116 139);
    cursor: not-allowed;
}

.skoulou-input.invalid {
    border-color: rgb(244 63 94);
    outline: none;
}

.skoulou-input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
}

select.skoulou-input {
    cursor: pointer;
}

textarea.skoulou-input {
    resize: vertical;
    min-height: 5.5rem;
}

.skoulou-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(51 65 85);
}

.skoulou-btn-accent:disabled {
    background-color: #cbd5e1 !important;
    color: #64748b !important;
}

.submit-loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 9999px;
    display: inline-block;
    animation: skoulou-spin 0.75s linear infinite;
}

.is-submit-loading {
    pointer-events: none;
}

@keyframes skoulou-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Full-bleed section utility \u2014 lets a home-page band break out of the
   .app-content horizontal padding to create a clear, edge-to-edge color
   separation between sections, while sidebar/nav layout stays intact.
   ========================================================================== */
.skoulou-full-bleed {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 0 !important;
}

@media (min-width: 641px) {
    .skoulou-full-bleed {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .skoulou-full-bleed {
        margin-left: -2rem;
        margin-right: -2rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.skoulou-band-indigo {
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
}

.skoulou-band-teal {
    background: linear-gradient(180deg, #ecfeff 0%, #d1fae5 100%);
}

.skoulou-band-slate {
    background: #f8fafc;
}

.skoulou-hero-photo {
    background-size: cover;
    background-position: center;
}

.home-hero-screen {
    padding-top: 0;
    padding-bottom: 0;
}

@media (max-width: 640px) {
    .home-hero-screen.skoulou-full-bleed {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 641px) {
    .home-hero-screen {
        min-height: min(760px, calc(100svh - 2rem));
        height: min(760px, calc(100svh - 2rem));
    }
}

.home-hero-image {
    position: relative;
    z-index: 0;
    object-fit: cover;
    object-position: center 25%;
}

/* Mobile hero: subtly visible photo beneath the active theme */
.home-hero-mobile {
    position: relative;
    min-height: auto;
    background:
        radial-gradient(circle at 15% 12%, color-mix(in srgb, var(--skoulou-accent-2) 55%, transparent), transparent 42%),
        radial-gradient(circle at 85% 78%, color-mix(in srgb, var(--skoulou-accent-1) 45%, transparent), transparent 45%),
        linear-gradient(
            155deg,
            color-mix(in srgb, var(--skoulou-sidebar-from) 88%, transparent),
            color-mix(in srgb, var(--skoulou-sidebar-via) 86%, transparent) 55%,
            color-mix(in srgb, var(--skoulou-sidebar-to) 88%, transparent)
        ),
        url("images/hero-SKOULOUAPP - mobile.png") center 38% / cover no-repeat;
    background-color: var(--skoulou-sidebar-from);
}

.home-hero-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(2px);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--skoulou-accent-2) 72%, transparent),
        color-mix(in srgb, var(--skoulou-accent-1) 18%, transparent)
    );
}

.home-hero-orb-1 {
    width: 11rem;
    height: 11rem;
    top: -3rem;
    right: -3rem;
}

.home-hero-orb-2 {
    width: 8rem;
    height: 8rem;
    bottom: 18%;
    left: -2.5rem;
}

.home-hero-glyph {
    position: absolute;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    padding: 0.15rem 0.6rem;
}

@media (min-width: 641px) {
    .home-hero-screen {
        min-height: min(760px, calc(100svh - 2rem));
        height: min(760px, calc(100svh - 2rem));
    }

    .home-hero-image {
        object-fit: cover;
        object-position: center 40%;
    }
}

.home-hero-catalog-badge {
    background: linear-gradient(90deg, var(--skoulou-sidebar-from), var(--skoulou-accent-1), var(--skoulou-accent-2));
}

.home-intro-section {
    background:
        radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--skoulou-accent-2) 12%, transparent), transparent 34%),
        radial-gradient(circle at 88% 22%, color-mix(in srgb, var(--skoulou-accent-1) 10%, transparent), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, var(--skoulou-bg-page) 100%);
}

.home-intro-gradient {
    background-image: linear-gradient(90deg, var(--skoulou-accent-1), var(--skoulou-accent-2));
}

html, body {
    font-family: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: var(--skoulou-bg-page);
    color: #0f172a;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: clip;
    scrollbar-color: var(--skoulou-accent-2) rgba(15, 23, 42, 0.08);
    scrollbar-width: thin;
}

::selection {
    background: var(--skoulou-selection);
    color: #0f172a;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--skoulou-accent-1), var(--skoulou-accent-2));
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--skoulou-accent-1-dark), var(--skoulou-accent-2-dark));
    background-clip: padding-box;
}

a, .btn-link {
    color: var(--skoulou-accent-1);
}

.btn-primary {
    color: #fff;
    background-color: var(--skoulou-accent-1);
    border-color: var(--skoulou-accent-1-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--skoulou-focus-ring);
}

* {
    box-sizing: border-box;
}

h1:focus {
    outline: none;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

p {
    margin-top: 0;
}

main {
    min-width: 0;
}

#app,
.app-shell,
.app-main,
.app-content {
    min-width: 0;
    max-width: 100%;
}

#app {
    min-height: 100vh;
}

.app-route-loading {
    position: fixed;
    top: 0.75rem;
    left: 50%;
    z-index: 1500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(-50%);
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.92);
    padding: 0.55rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #475569;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
    animation: app-route-loading-in 0.16s ease 0.35s both;
}

@keyframes app-route-loading-in {
    from {
        opacity: 0;
        transform: translate(-50%, -0.5rem);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-route-loading {
        animation: none;
    }
}

/* ==========================================================================
   Modernisierung: Schrift, kompakte Heroes/Karten, Animationen
   ========================================================================== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --skoulou-font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

html, body {
    font-family: var(--skoulou-font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv11', 'ss01';
}

button, input, select, textarea {
    font-family: inherit;
}

.app-content h1, .app-content h2 {
    letter-spacing: -0.01em;
}

/* Heroes: kompakt auf allen Seiten (Schüler-Dashboard bleibt grosszügig) */
.app-content .skoulou-hero:not(.student-dashboard-hero) {
    padding: 0.85rem 1.25rem;
    padding-right: 4.25rem;
    border-radius: 1.25rem;
    box-shadow: 0 10px 28px -14px rgba(15, 23, 42, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.app-content .skoulou-hero:not(.student-dashboard-hero) h1 {
    margin-top: 0.15rem;
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 700;
}

.app-content .skoulou-hero:not(.student-dashboard-hero) h1 + p,
.app-content .skoulou-hero:not(.student-dashboard-hero) p {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    line-height: 1.45;
}

@media (min-width: 1280px) {
    .app-content .skoulou-hero:not(.student-dashboard-hero) h1 {
        font-size: 1.5rem;
    }
}

/* Grosse Karten allgemein kompakter */
.app-content .rounded-\[2rem\]:not(.skoulou-hero) {
    border-radius: 1.25rem;
}

.app-content .rounded-3xl {
    border-radius: 1.1rem;
}

.app-content .rounded-\[2rem\].p-8:not(.skoulou-hero),
.app-content .rounded-\[2rem\].p-6:not(.skoulou-hero) {
    padding: 1.1rem 1.25rem;
}

.app-content section.grid, .app-content section.flex {
    gap: 0.75rem;
}

/* Statistik-Kacheln kompakter */
.app-content .rounded-2xl.bg-gradient-to-br,
.app-content .rounded-3xl.bg-gradient-to-br {
    padding: 0.7rem 1rem;
    border-radius: 1rem;
}

.app-content .bg-gradient-to-br .text-2xl {
    font-size: 1.35rem;
    line-height: 1.2;
}

/* Fokus, Scrollbars, Buttons */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--skoulou-accent-2, #4f46e5);
    outline-offset: 2px;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

.app-content button:not(:disabled) {
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}

.app-content button:not(:disabled):active {
    transform: scale(.98);
}

.app-content table {
    font-size: 0.875rem;
}

.app-content .director-sticky-band .skoulou-input {
    padding-block: 0.45rem;
}

/* Sanfte Eintrittsanimationen */
@keyframes skoulou-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes skoulou-pop {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}

.app-content > * {
    animation: skoulou-fade-up .32s ease-out backwards;
}

.skoulou-tab-panel {
    animation: skoulou-fade-up .35s ease-out backwards;
}

.skoulou-tab-panel > * {
    animation: skoulou-pop .3s ease-out backwards;
}

.skoulou-card {
    animation: skoulou-fade-up .3s ease-out backwards;
}

.director-sticky-band .school-page-tabs button {
    min-height: 2.25rem;
    padding-block: .35rem;
}

.school-page-tabs button:hover {
    transform: translateY(-1px);
}

.school-page-tabs button[aria-selected="true"] {
    box-shadow: 0 6px 14px -6px var(--skoulou-accent-2, #4f46e5);
    animation: skoulou-pop .2s ease-out backwards;
}

.school-page-tabs button.skoulou-btn-accent,
[role="tablist"] button.skoulou-btn-accent,
.school-page-tabs button[aria-current="page"] {
    box-shadow: 0 6px 14px -6px var(--skoulou-accent-2, #4f46e5);
    animation: skoulou-pop .22s ease-out backwards;
}

[role="tab"][aria-selected="true"] {
    animation: skoulou-pop .22s ease-out backwards;
}

.school-page-tabs button,
[role="tablist"] button {
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.handbuch-tabs ~ section,
div:has(> [role="tablist"]) ~ *:not(.hidden):not(.fixed),
.director-sticky-band ~ *:not(.hidden):not(.fixed),
.school-page-tabs ~ *:not(.hidden),
[role="tablist"] ~ *:not(.hidden) {
    animation: skoulou-fade-up .28s ease-out backwards;
}

@media (prefers-reduced-motion: reduce) {
    .app-content > *, .skoulou-card, .school-page-tabs button[aria-selected="true"],
    .school-page-tabs button.skoulou-btn-accent, [role="tablist"] button.skoulou-btn-accent,
    .school-page-tabs ~ *, [role="tablist"] ~ *, .director-sticky-band ~ * {
        animation: none;
    }
}

/* Auth-/Kontaktseiten, Sidebar, Footer */
.app-content > section.max-w-2xl,
.app-content > section.max-w-3xl {
    animation: skoulou-pop .35s ease-out backwards;
    transition: box-shadow .3s ease, transform .3s ease;
}

.app-content > section.max-w-2xl:hover,
.app-content > section.max-w-3xl:hover {
    box-shadow: 0 24px 48px -24px rgba(8, 145, 178, .35);
}

.app-content form input.skoulou-input,
.app-content form input[class*="rounded-2xl"],
.app-content form select,
.app-content form textarea {
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.app-content form input.skoulou-input:focus,
.app-content form input[class*="rounded-2xl"]:focus,
.app-content form select:focus,
.app-content form textarea:focus {
    border-color: var(--skoulou-accent-2, #4f46e5);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .14);
}

.app-content form button[type="submit"]:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(15, 23, 42, .5);
}

.app-sidebar a {
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.app-sidebar a:hover {
    transform: translateX(3px);
}

.app-sidebar a.active {
    animation: skoulou-pop .25s ease-out backwards;
}

.app-footer {
    animation: skoulou-fade-up .4s ease-out backwards;
    font-size: .85rem;
}

.app-footer a {
    transition: color .2s ease, opacity .2s ease;
}

.app-footer a:hover {
    opacity: .8;
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .app-content > section.max-w-2xl, .app-content > section.max-w-3xl,
    .app-sidebar a.active, .app-footer { animation: none; }
    .app-sidebar a:hover { transform: none; }
}

/* Karten-/Listen-Animationen (Student, Lektionen, Provisionen, Abrechnung) */
.app-content article.group,
.student-learning-page article,
.app-content section.grid > div.grid > article,
.app-content .grid.gap-4 > article {
    animation: skoulou-fade-up .35s ease-out backwards;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.app-content .grid > article:nth-child(1) { animation-delay: .03s; }
.app-content .grid > article:nth-child(2) { animation-delay: .08s; }
.app-content .grid > article:nth-child(3) { animation-delay: .13s; }
.app-content .grid > article:nth-child(4) { animation-delay: .18s; }
.app-content .grid > article:nth-child(n+5) { animation-delay: .22s; }

.app-content .grid > article:hover {
    transform: translateY(-2px);
}

.app-content .skoulou-hero-badge {
    transition: transform .25s ease, box-shadow .25s ease;
}

.app-content .skoulou-hero-badge:hover {
    transform: translateY(-2px) scale(1.02);
}

.student-learning-page .skoulou-hero .rounded-2xl.bg-white\/10 {
    animation: skoulou-pop .4s ease-out backwards;
}

.app-content [class*="h-full rounded-full bg-emerald"] {
    transition: width .6s ease;
}

@media (prefers-reduced-motion: reduce) {
    .app-content article.group, .student-learning-page article,
    .app-content .grid > article, .app-content .skoulou-hero-badge,
    .student-learning-page .skoulou-hero .rounded-2xl.bg-white\/10 {
        animation: none;
        transition: none;
    }
}

/* Geöffnete Dropdowns immer über Folgeinhalt */
:has(> .z-\[4000\]) {
    position: relative;
    z-index: 4000;
}

/* Mobile / Tablet ergonomics */
html { -webkit-text-size-adjust: 100%; }
a, button, [role=tab], label, select, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.app-content--student { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }

@media (pointer: coarse), (max-width: 1024px) {
    button, [role=tab], .student-bottom-nav-item, a.rounded-full { min-height: 44px; }
    input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; min-height: 44px; }
    input[type=checkbox], input[type=radio] { width: 1.25rem; height: 1.25rem; }
    .school-page-tabs { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
    .school-page-tabs::-webkit-scrollbar { display: none; }
    .school-page-tabs > * { scroll-snap-align: start; flex-shrink: 0; }
    .app-content .grid > article:hover, .skoulou-hero-badge:hover, .school-page-tabs button:hover, .app-sidebar a:hover { transform: none; }
    button:active, [role=tab]:active { transform: scale(.97); }
    .director-sticky-band { border-radius: 0 0 1rem 1rem; }
    .app-content table { display: block; overflow-x: auto; }
}

@media (max-width: 767px) {
    .student-learning-page .grid, .student-exams-page .grid { grid-template-columns: 1fr; }
    .student-exercise-page .sticky { top: 0; }
    .student-bottom-nav-item { min-width: 3.5rem; }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .student-exercise-page, .student-exams-page { max-width: 56rem; margin-inline: auto; }
}

@media (max-height: 480px) and (orientation: landscape) {
    .student-bottom-nav-item span { display: none; }
}

@media (max-width: 640px) {
    .skoulou-modal-surface { max-height: 92dvh; width: 100%; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); }
}

.director-sticky-band {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: .625rem .875rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgb(226 232 240);
    box-shadow: 0 6px 18px -8px rgba(15, 23, 42, .25);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.school-page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.school-page-tabs button {
    min-height: 2.75rem;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

@media (max-width: 640px) {
    .school-page-tabs button {
        flex: 1 1 auto;
        font-size: .875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .school-page-tabs button {
        transition: none;
    }
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 10% -10%, var(--skoulou-glow-1), transparent 38%),
        radial-gradient(circle at 90% 0%, var(--skoulou-glow-2), transparent 42%),
        linear-gradient(180deg, var(--skoulou-bg-from) 0%, var(--skoulou-bg-to) 100%);
}

.app-sidebar {
    background: linear-gradient(160deg, var(--skoulou-sidebar-from) 0%, var(--skoulou-sidebar-via) 50%, var(--skoulou-sidebar-to) 100%);
    color: #f8fafc;
    box-shadow: 4px 0 32px rgba(15, 23, 42, 0.18);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem;
    flex-wrap: wrap;
    overflow-x: clip;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(238, 244, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.app-header-copy {
    min-width: 0;
}

.app-kicker {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #0f766e;
    font-weight: 700;
}

.app-title {
    margin: 0.25rem 0 0;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--skoulou-accent-1);
}

.app-header-actions,
.app-auth-group,
.app-profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-header-actions {
    align-items: flex-start;
    justify-content: flex-end;
    margin-left: auto;
    position: sticky;
    top: 0.75rem;
    z-index: 30;
}

.app-auth-group {
    align-items: flex-end;
    justify-content: flex-end;
}

.app-profile-card {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    min-width: 0;
}

.app-profile-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #475569;
    font-weight: 700;
}

.app-profile-name,
.app-link-pill {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.app-link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    text-decoration: none;
    white-space: nowrap;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-link-pill:hover {
    color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.app-link-pill-accent {
    color: #ffffff;
    background: linear-gradient(135deg, var(--skoulou-accent-1) 0%, var(--skoulou-accent-2) 100%);
}

.app-link-pill-accent:hover {
    color: #ffffff;
}

.app-profile-name {
    max-width: min(24rem, 100%);
    padding: 0.7rem 1rem;
    overflow-wrap: anywhere;
}

.app-logout-form {
    margin: 0;
    display: inline-flex;
}

.app-logout-form button.app-link-pill {
    cursor: pointer;
    font: inherit;
}

.app-content {
    padding: 0 1.5rem 2rem;
}

.app-footer {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.82);
    background:
        radial-gradient(circle at 12% 0%, var(--skoulou-glow-2), transparent 35%),
        linear-gradient(130deg, var(--skoulou-sidebar-from) 0%, var(--skoulou-sidebar-via) 48%, var(--skoulou-sidebar-to) 100%);
    box-shadow: 0 -12px 35px rgba(15, 23, 42, 0.09);
}

.app-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    max-width: 42rem;
}

.app-footer-logo {
    display: grid;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 0.65rem;
    color: #172554;
    background: linear-gradient(135deg, #ecfeff, #67e8f9);
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.32);
    font-size: 1.5rem;
    font-weight: 900;
}

.app-footer-logo img {
    width: 1.4rem;
    height: 1.4rem;
    display: block;
}

.app-footer-kicker,
.app-footer-title,
.app-footer-tagline,
.app-footer-heading {
    margin: 0;
}

.app-footer-kicker {
    color: #a5f3fc;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.app-footer-title {
    margin-top: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.app-footer-tagline {
    margin-top: 0;
    max-width: 36rem;
    font-size: 0.78rem;
    line-height: 1.3;
}

.app-footer-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    min-width: 0;
    font-size: 0.78rem;
}

.app-footer-heading {
    margin-bottom: 0.2rem;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-footer-contact a {
    width: fit-content;
    color: #cffafe;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.app-footer-contact a:hover,
.app-footer-contact a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.app-footer-bottom {
    flex: 1 1 100%;
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem 1.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.72rem;
    flex-wrap: wrap;
}

.brand-panel {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    position: relative;
    background: radial-gradient(circle at 0% 0%, var(--skoulou-glow-2), transparent 60%);
}

.brand-copy {
    padding-right: 3.5rem;
}

.brand-title {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-decoration: none;
    text-shadow: 0 0 24px var(--skoulou-glow-2);
}

.brand-title:hover {
    color: #ffffff;
}

.brand-subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
    border-radius: 999px;
}

.navbar-toggler:checked {
    background-color: rgba(255, 255, 255, 0.5);
}

.nav-overlay-backdrop {
    display: none;
}

.nav-scrollable {
    display: none;
    padding: 1rem 1rem 1.5rem;
    min-width: 0;
    overflow-x: clip;
}

.navbar-toggler:checked ~ .nav-scrollable {
    display: block;
}

.nav-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 0;
}

.nav-section-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
}

.nav-section-spacing {
    margin-top: 1.2rem;
}

.nav-item {
    font-size: 0.95rem;
}

.nav-link,
.nav-anchor-link,
.nav-subitem-link {
    color: #e2e8f0;
    text-decoration: none;
}

.nav-item .nav-link,
.nav-anchor-link {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid transparent;
    border-radius: 18px;
    min-height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1rem;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    min-width: 0;
    overflow-wrap: anywhere;
}

.nav-item .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    border-left-color: var(--skoulou-accent-2);
    color: white;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
}

.nav-subitem-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.4rem 0 0 1.4rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.14);
}

.nav-subitem-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    min-width: 0;
    overflow-wrap: anywhere;
}

.nav-link:hover,
.nav-anchor-link:hover,
.nav-subitem-link:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-1px) translateX(2px);
}

.bi {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    background-size: cover;
    flex-shrink: 0;
}

.bi-house-door-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 2 8h1v5.5a.5.5 0 0 0 .5.5h3.5a.5.5 0 0 0 .5-.5V10h1v3.5a.5.5 0 0 0 .5.5H12.5a.5.5 0 0 0 .5-.5V8h1a.5.5 0 0 0 .354-.854z'/%3E%3C/svg%3E");
}

.bi-book-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M1 2.828c.885-.37 2.154-.769 3.5-.769 1.465 0 2.827.436 3.5 1.087.673-.651 2.035-1.087 3.5-1.087 1.346 0 2.615.4 3.5.769V14.5c-.885-.37-2.154-.769-3.5-.769-1.465 0-2.827.436-3.5 1.087-.673-.651-2.035-1.087-3.5-1.087-1.346 0-2.615.4-3.5.769z'/%3E%3C/svg%3E");
}

.bi-checklist-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 2A.5.5 0 0 0 2 2.5v11a.5.5 0 0 0 .5.5h11a.5.5 0 0 0 .5-.5v-11A.5.5 0 0 0 13.5 2zm0-1h11A1.5 1.5 0 0 1 15 2.5v11a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 13.5v-11A1.5 1.5 0 0 1 2.5 1'/%3E%3Cpath d='M10.854 5.146a.5.5 0 0 1 0 .708L7.707 9l-1.561-1.561a.5.5 0 0 1 .708-.708L7.707 7.293l2.793-2.793a.5.5 0 0 1 .708 0M4 5.5A.5.5 0 0 1 4.5 5h1a.5.5 0 0 1 0 1h-1a.5.5 0 0 1-.5-.5m0 3A.5.5 0 0 1 4.5 8h1a.5.5 0 0 1 0 1h-1A.5.5 0 0 1 4 8.5m0 3A.5.5 0 0 1 4.5 11h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M2 3.5A.5.5 0 0 1 2.5 3h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 3.5m0 4A.5.5 0 0 1 2.5 7h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 7.5m0 4A.5.5 0 0 1 2.5 11h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 11.5'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm-5 3H7v3H4v2h3v3h2V9h3V7H9z'/%3E%3C/svg%3E");
}

.bi-person-badge-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 2a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1zM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0'/%3E%3Cpath d='M4.5 0A2.5 2.5 0 0 0 2 2.5V14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2.5A2.5 2.5 0 0 0 11.5 0zm0 1h7A1.5 1.5 0 0 1 13 2.5v10.795a4.2 4.2 0 0 0-.776-.492C11.392 12.387 10.063 12 8 12s-3.392.387-4.224.803a4.2 4.2 0 0 0-.776.492V2.5A1.5 1.5 0 0 1 4.5 1'/%3E%3C/svg%3E");
}

.bi-cash-stack-nav-menu {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M1 3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1H1zm7 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4'/%3E%3Cpath d='M0 5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1zm3 0a2 2 0 0 1-2 2v4a2 2 0 0 1 2 2h10a2 2 0 0 1 2-2V7a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}

.app-content > * {
    min-width: 0;
}

.grid {
    min-width: 0;
}

.grid > * {
    min-width: 0;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

:where(input[type="checkbox"], input[type="radio"], .form-check-input) {
    accent-color: var(--skoulou-accent-1);
    inline-size: 1.05rem;
    block-size: 1.05rem;
    border: 1.5px solid #94a3b8;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

:where(input[type="checkbox"], input[type="radio"], .form-check-input):hover {
    border-color: var(--skoulou-accent-1);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--skoulou-accent-1) 18%, white);
}

:where(input[type="checkbox"], input[type="radio"], .form-check-input):focus-visible {
    outline: none;
    border-color: var(--skoulou-accent-1);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--skoulou-accent-1) 24%, white), 0 0 0 6px color-mix(in oklab, var(--skoulou-accent-2) 20%, white);
}

:where(input[type="checkbox"], input[type="radio"], .form-check-input):checked {
    border-color: var(--skoulou-accent-1-dark);
    transform: translateY(-0.5px);
}

:where(input[type="checkbox"], input[type="radio"], .form-check-input):disabled {
    cursor: not-allowed;
    opacity: .55;
    box-shadow: none;
    filter: grayscale(.1);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.gradient-text {
    color: var(--skoulou-accent-1);
}

@keyframes
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-content > * {
    animation: fade-in-up 0.5s ease;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

section {
    scroll-margin-top: 6.5rem;
}

.teacher-dashboard > :nth-child(2) {
    order: 2;
}

.teacher-dashboard > :nth-child(6) {
    order: 3;
}

.teacher-dashboard > :nth-child(3) {
    order: 4;
}

.teacher-dashboard > :nth-child(4) {
    order: 5;
}

.teacher-dashboard > :nth-child(5) {
    order: 6;
}

@media (min-width: 1200px) {
    .app-shell {
        flex-direction: row;
    }

    .app-sidebar {
        width: clamp(17rem, 22vw, 20rem);
        height: 100vh;
        align-self: flex-start;
        position: sticky;
        top: 0;
        overflow: hidden;
    }

    .app-header {
        padding: 2rem 2rem 1rem;
    }

    .app-content {
        padding: 0 2rem 2rem;
    }

    .navbar-toggler {
        display: none;
    }

    .nav-scrollable {
        display: block;
        height: calc(100vh - 8.5rem);
        overflow-y: auto;
        overflow-x: clip;
    }
}

@media (max-width: 1199px) {
    .app-sidebar {
        position: sticky;
        top: 0;
        z-index: 1200;
    }

    .app-header {
        align-items: flex-start;
    }

    .app-header-actions,
    .app-auth-group,
    .app-profile-links {
        flex-wrap: nowrap;
        justify-content: flex-end;
    }

    .brand-panel {
        padding: 1rem 1rem 0.75rem;
        border-bottom: none;
    }

    .brand-copy {
        padding-right: 4rem;
    }

    .navbar-toggler {
        z-index: 1201;
    }

    .nav-overlay-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1190;
        backdrop-filter: blur(2px);
    }

    .nav-scrollable {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        width: min(22rem, calc(100vw - 2rem));
        max-height: calc(100vh - 2rem);
        padding: 1rem;
        overflow-y: auto;
        overflow-x: clip;
        border-radius: 1.75rem;
        background: linear-gradient(180deg, var(--skoulou-sidebar-from) 0%, var(--skoulou-sidebar-via) 55%, var(--skoulou-sidebar-to) 100%);
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-2rem);
        transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
        z-index: 1200;
    }

    .navbar-toggler:checked ~ .nav-overlay-backdrop,
    .navbar-toggler:checked ~ .nav-scrollable {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .navbar-toggler:checked ~ .nav-scrollable {
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .app-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 1.25rem 1rem 0.5rem;
    }

    .app-header-actions,
    .app-auth-group,
    .app-profile-card,
    .app-profile-links {
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .app-link-pill,
    .app-profile-name {
        max-width: 100%;
    }

    .app-link-pill {
        white-space: normal;
    }

    .app-content {
        padding: 0 1rem 1.5rem;
    }

    .app-footer {
        gap: 0.5rem;
        padding: 0.65rem 1rem;
    }

    .app-footer-contact {
        min-width: 0;
    }

    .app-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.skoulouapp-large-editor-modal {
    max-height: 96dvh;
}

.skoulouapp-large-editor-body {
    overflow-y: auto;
}

/* ===== Rich-Text-Editor: Schriftarten ===== */
/* Picker liegen über dem positionierten A4-Inhalt; die lange Liste scrollt
   innerhalb des Menüs statt über den Text hinauszulaufen. */
.skoulouapp-richtext .ql-toolbar.ql-snow {
    position: relative;
    z-index: 3;
    background: #fff;
}

.skoulouapp-richtext .ql-toolbar .ql-picker.ql-expanded {
    z-index: 4;
}

.skoulouapp-richtext .ql-toolbar .ql-picker-options {
    max-height: min(18rem, 50dvh);
    overflow-y: auto;
}

.skoulouapp-richtext .ql-toolbar .ql-picker.ql-font {
    width: 10rem;
}

.skoulouapp-richtext .skoulouapp-image-size {
    position: absolute;
    z-index: 2;
    box-sizing: border-box;
    border: 2px solid #2563eb;
    pointer-events: none;
}

.skoulouapp-richtext .skoulouapp-image-size[hidden] {
    display: none;
}

.skoulouapp-image-size .skoulouapp-image-align {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    background: #1e293b;
    box-shadow: 0 2px 8px #0f172a55;
    pointer-events: auto;
}

.skoulouapp-image-align button {
    min-width: 32px;
    min-height: 32px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #fff;
}

.skoulouapp-image-align button:hover,
.skoulouapp-image-align button:focus-visible {
    background: #475569;
}

.skoulouapp-richtext {
    position: relative;
}

.skoulouapp-richtext .ql-editor img {
    cursor: grab;
    touch-action: none;
}

.ql-editor img.ql-image-align-left,
.ql-editor img.ql-image-align-center,
.ql-editor img.ql-image-align-right {
    display: block;
    max-width: 100%;
}

.ql-editor img.ql-image-align-left {
    margin-left: 0;
    margin-right: auto;
}

.ql-editor img.ql-image-align-center {
    margin-left: auto;
    margin-right: auto;
}

.ql-editor img.ql-image-align-right {
    margin-left: auto;
    margin-right: 0;
}

.skoulouapp-richtext .ql-editor.skoulouapp-image-moving,
.skoulouapp-richtext .ql-editor.skoulouapp-image-moving img {
    cursor: grabbing;
}

.skoulouapp-richtext .skoulouapp-image-drop-marker {
    position: absolute;
    z-index: 2;
    width: 3px;
    border-radius: 3px;
    background: #2563eb;
    pointer-events: none;
}

.skoulouapp-richtext .skoulouapp-image-drop-marker[hidden] {
    display: none;
}

.skoulouapp-image-size .skoulouapp-image-size-handle {
    position: absolute;
    right: -9px;
    bottom: -9px;
    width: 22px;
    height: 22px;
    border: 2px solid #fff;
    border-radius: 5px;
    background: #2563eb;
    box-shadow: 0 1px 5px #0f172a66;
    cursor: nwse-resize;
    touch-action: none;
    pointer-events: auto;
}

/* Lesbare Beschriftungen im Schriftart-Dropdown und tatsächliche Anwendung der Schrift. */
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value]::before {
    content: attr(data-value);
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="sans-serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="sans-serif"]::before {
    content: "Sans Serif";
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
    content: "Serif";
    font-family: Georgia, "Times New Roman", serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
    content: "Monospace";
    font-family: "Courier New", Courier, monospace;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="inter"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="inter"]::before {
    content: "Inter";
    font-family: "Inter", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="roboto"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="roboto"]::before {
    content: "Roboto";
    font-family: "Roboto", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="nunito"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="nunito"]::before {
    content: "Nunito";
    font-family: "Nunito", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="arial"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="arial"]::before {
    content: "Arial";
    font-family: Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="arial-black"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="arial-black"]::before {
    content: "Arial Black";
    font-family: "Arial Black", Arial, sans-serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="georgia"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="georgia"]::before {
    content: "Georgia";
    font-family: Georgia, serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="times-new-roman"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="times-new-roman"]::before {
    content: "Times New Roman";
    font-family: "Times New Roman", Times, serif;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="comic-sans"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="comic-sans"]::before {
    content: "Comic Sans";
    font-family: "Comic Sans MS", "Comic Sans", cursive;
}

.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="courier-new"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="courier-new"]::before {
    content: "Courier New";
    font-family: "Courier New", Courier, monospace;
}

/* Anwendung der Schriftart im Editor-Inhalt. */
.ql-font-sans-serif { font-family: "Helvetica Neue", Arial, sans-serif; }
.ql-font-serif { font-family: Georgia, "Times New Roman", serif; }
.ql-font-monospace { font-family: "Courier New", Courier, monospace; }
.ql-font-inter { font-family: "Inter", Arial, sans-serif; }
.ql-font-roboto { font-family: "Roboto", Arial, sans-serif; }
.ql-font-nunito { font-family: "Nunito", Arial, sans-serif; }
.ql-font-arial { font-family: Arial, sans-serif; }
.ql-font-arial-black { font-family: "Arial Black", Arial, sans-serif; font-weight: 900; }
.ql-font-georgia { font-family: Georgia, serif; }
.ql-font-times-new-roman { font-family: "Times New Roman", Times, serif; }
.ql-font-comic-sans { font-family: "Comic Sans MS", "Comic Sans", cursive; }
.ql-font-courier-new { font-family: "Courier New", Courier, monospace; }

.ql-snow .ql-picker.ql-size {
    width: 5.75rem;
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value]::before {
    content: attr(data-value);
}

.ql-snow .ql-picker.ql-size .ql-picker-label:not([data-value])::before,
.ql-snow .ql-picker.ql-size .ql-picker-item:not([data-value])::before {
    content: "Par défaut";
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
    content: "Petit";
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
    content: "Grand";
}

.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
    content: "Très grand";
}

.ql-size-10px { font-size: 10px; }
.ql-size-12px { font-size: 12px; }
.ql-size-14px { font-size: 14px; }
.ql-size-16px { font-size: 16px; }
.ql-size-18px { font-size: 18px; }
.ql-size-20px { font-size: 20px; }
.ql-size-24px { font-size: 24px; }
.ql-size-28px { font-size: 28px; }
.ql-size-32px { font-size: 32px; }
.ql-size-36px { font-size: 36px; }
.ql-size-48px { font-size: 48px; }

/* Großeditor: Der Quill-Inhalt nutzt die gesamte Modalhöhe zwischen Kopf- und
   Aktionsleiste. Dadurch bleibt auch bei langen Texten eine große, nach unten
   ausgedehnte Bearbeitungsfläche erhalten. */
.skoulouapp-large-editor-modal {
    min-height: 34rem;
}

.skoulouapp-large-editor-body > .skoulouapp-richtext {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.skoulouapp-large-editor-body .ql-toolbar {
    flex: 0 0 auto;
}

.skoulouapp-large-editor-body .ql-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.skoulouapp-large-editor-body .ql-editor {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.skoulouapp-large-editor-body:has(> .skoulouapp-richtext--paged) {
    overflow-x: hidden;
    background: #f1f5f9;
}

.skoulouapp-large-editor-body > .skoulouapp-richtext--paged {
    flex: none;
    height: auto;
    min-height: 100%;
    width: min(100%, 210mm);
    margin-inline: auto;
}

.skoulouapp-large-editor-body .skoulouapp-richtext--paged .ql-toolbar {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

.skoulouapp-large-editor-body .skoulouapp-richtext--paged .ql-container.skoulouapp-paged {
    display: block;
    flex: none;
    overflow: visible;
}

.skoulouapp-large-editor-body .skoulouapp-richtext--paged .ql-container.skoulouapp-paged .ql-editor {
    display: block;
    flex: none;
    overflow: visible;
}

.skoulouapp-richtext[style*="--skoulou-richtext-min-height"] .ql-container,
.skoulouapp-richtext[style*="--skoulou-richtext-min-height"] .ql-editor {
    min-height: var(--skoulou-richtext-min-height);
}

/* Standardhöhe für alle RichTextEditor-Instanzen ohne explizite Höhenvorgabe:
   ca. 20 Zeilen für konsistente Bearbeitungsfläche. */
.skoulouapp-richtext:not([style*="--skoulou-richtext-min-height"]) .ql-container,
.skoulouapp-richtext:not([style*="--skoulou-richtext-min-height"]) .ql-editor {
    min-height: 10rem;
}

/* Globaler A4-Seitenmodus für RichTextEditor (nicht nur im Lehrer-Lektionseditor):
   Visuelle A4-Blätter mit automatischem vertikalem Seitenfluss. */
.skoulouapp-richtext--paged .ql-container.skoulouapp-paged {
    position: relative;
    border: none;
    background: transparent;
    font-size: inherit;
    overflow: hidden;
}

.skoulouapp-richtext--paged .skoulouapp-page-sheets {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.skoulouapp-richtext--paged .skoulouapp-page-sheet {
    position: absolute;
    left: 0;
    right: 0;
    height: 297mm;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 10px 34px rgba(15, 23, 42, 0.16);
}

.skoulouapp-richtext--paged .skoulouapp-page-sheet-footer {
    position: absolute;
    bottom: 6mm;
    right: 16mm;
    color: #94a3b8;
    font-size: 0.625rem;
    letter-spacing: 0.04em;
    line-height: 1;
}

.skoulouapp-richtext--paged .ql-container.skoulouapp-paged .ql-editor {
    position: relative;
    z-index: 1;
    padding: 16mm;
    min-height: 297mm;
    box-sizing: border-box;
    background: transparent;
}

.skoulouapp-richtext--paged .ql-container.skoulouapp-paged .ql-editor img {
    max-width: 100%;
    max-height: 250mm;
    object-fit: contain;
}

/* Konsistente Seitenoptik für gespeicherte Lesson-Ansichten (Voir le contenu / Élève)
   passend zum A4-Seitenkonzept des Editors. */
.lesson-content-pages {
    --lesson-page-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.lesson-content-page {
    position: relative;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.96) 100%);
    box-shadow: var(--lesson-page-shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lesson-content-page:hover {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    transform: translateY(-1px);
}

.lesson-content-page-number {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lesson-content-page .rich-content {
    color: #334155;
}

.lesson-content-nav {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.9) 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.lesson-content-nav > span {
    letter-spacing: 0.02em;
}

@media (max-width: 640px) {
    .lesson-content-page {
        border-radius: 0.85rem;
        padding: 0.9rem;
    }

    .lesson-content-page-number {
        font-size: 0.68rem;
    }

    .lesson-content-nav {
        gap: 0.65rem;
        padding: 0.65rem 0.75rem;
        border-radius: 0.85rem;
    }

    .lesson-content-nav button {
        padding-inline: 0.8rem;
        padding-block: 0.52rem;
        font-size: 0.76rem;
    }
}

.student-exercise-page,
.student-exams-page {
    margin-inline: -0.75rem;
}

.student-exercise-page .rich-content {
    font-size: 1rem;
    line-height: 1.85;
}

.student-exercise-page .progress-ring {
    width: 3rem;
    height: 3rem;
}

.student-exercise-page .progress-ring-label {
    font-size: 0.75rem;
}

.student-exercise-page .skoulouapp-richtext .ql-toolbar {
    padding: 0.35rem;
}

.student-exercise-page .skoulouapp-richtext .ql-toolbar .ql-formats {
    margin-right: 0.25rem;
}

.student-exercise-page .skoulouapp-richtext .ql-container,
.student-exercise-page .skoulouapp-richtext .ql-editor {
    font-size: 16px;
}

.student-exercise-page .skoulouapp-richtext .ql-container {
    min-height: 8.5rem;
}

.student-exercise-page .skoulouapp-richtext .ql-editor {
    min-height: 8.5rem;
}

@media (max-width: 639px) {
    .app-content--student .student-exercise-page,
    .app-content--student .student-exams-page,
    .app-content--student .student-learning-page {
        margin-inline: -0.75rem;
    }

    .app-content--student .student-exercise-page > div,
    .app-content--student .student-exams-page > div {
        border-radius: 0.9rem;
    }
}

@media (min-width: 1024px) {
    .student-exercise-page,
    .student-exams-page {
        margin-inline: 0;
    }

    .student-exercise-page .progress-ring {
        width: 4.5rem;
        height: 4.5rem;
    }

    .student-exercise-page .progress-ring-label {
        font-size: 0.95rem;
    }


@media (max-width: 640px) {
    .skoulouapp-large-editor-modal {
        min-height: 0;
    }
}

/* ===== Rich-Text-Editor: Farb-Buttons mit sichtbaren Farben ===== */
.ql-snow .ql-color-picker .ql-picker-item {
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 2px;
}

.ql-snow .ql-color-picker .ql-picker-label {
    padding: 2px 4px;
}

.ql-snow .ql-toolbar .ql-color,
.ql-snow .ql-toolbar .ql-background {
    border: 1px solid rgba(15, 23, 42, 0.18);
    border-radius: 0.35rem;
    margin-inline: 0.1rem;
}

.ql-snow .ql-toolbar .ql-color:hover,
.ql-snow .ql-toolbar .ql-background:hover,
.ql-snow .ql-toolbar .ql-color.ql-expanded,
.ql-snow .ql-toolbar .ql-background.ql-expanded {
    background: #f1f5f9;
    border-color: var(--skoulou-accent-1);
}

.ql-snow .ql-toolbar .ql-color .ql-picker-label svg .ql-color-label,
.ql-snow .ql-toolbar .ql-background .ql-picker-label svg .ql-color-label {
    stroke-width: 3;
}

.ql-snow .ql-toolbar button.ql-align {
    border: 1px solid transparent;
    border-radius: 0.35rem;
    margin-inline: 0.05rem;
}

.ql-snow .ql-toolbar button.ql-align:hover,
.ql-snow .ql-toolbar button.ql-align.ql-active {
    background: #eef2ff;
    border-color: var(--skoulou-accent-1);
}

/* Quill 2 rendert Nummerierungen/Aufzählungszeichen über .ql-ui::before.
   Die Marker erben die Schriftgröße nicht, wenn Quill die Größe nur auf den Text setzt. */
.ql-editor li.ql-size-small > .ql-ui::before,
.ql-editor li:has(.ql-size-small) > .ql-ui::before {
    font-size: 0.75em;
}

.ql-editor li.ql-size-large > .ql-ui::before,
.ql-editor li:has(.ql-size-large) > .ql-ui::before {
    font-size: 1.5em;
}

.ql-editor li.ql-size-huge > .ql-ui::before,
.ql-editor li:has(.ql-size-huge) > .ql-ui::before {
    font-size: 2.5em;
}

.ql-editor li.ql-size-small,
.ql-editor li.ql-size-large,
.ql-editor li.ql-size-huge,
.ql-editor li:has(.ql-size-small),
.ql-editor li:has(.ql-size-large),
.ql-editor li:has(.ql-size-huge) {
    line-height: 1.2;
}

.lesson-pdf-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lesson-pdf-page-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid #cbd5e1;
    font-size: 0.78rem;
    color: #475569;
    letter-spacing: 0.03em;
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    html,
    body,
    #app,
    .app-shell,
    .app-main,
    .app-content {
        background: #ffffff !important;
    }

    body * {
        visibility: hidden !important;
    }

    .pdf-export-root,
    .pdf-export-root * {
        visibility: visible !important;
    }

    body > :not(.app-shell),
    .app-sidebar,
    .app-header,
    .app-header-actions,
    .app-footer,
    .student-bottom-nav,
    #blazor-error-ui,
    .scroll-to-top-button {
        display: none !important;
    }

    .app-content > :not(.pdf-export-root) {
        display: none !important;
    }

    .app-content > .pdf-export-container {
        display: block !important;
    }

    .pdf-export-container > :not(.pdf-export-root) {
        display: none !important;
    }

    html,
    body {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #app {
        display: block !important;
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .app-shell,
    .app-main,
    .app-content {
        display: block !important;
        min-height: 0 !important;
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    .pdf-export-root {
        display: block !important;
        position: static !important;
        width: 186mm !important;
        max-width: 186mm !important;
        margin: 0 !important;
        padding: 18mm 0 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .no-print {
        display: none !important;
    }

    .pdf-export-root > * {
        width: 100% !important;
        max-width: 186mm !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .pdf-document {
        width: 100% !important;
        max-width: 186mm !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        box-shadow: none !important;
        border: 0 !important;
        outline: 0 !important;
        padding: 0 8mm !important;
    }

    .lesson-pdf-page {
        min-height: 0 !important;
        break-after: auto;
        page-break-after: auto;
        break-inside: auto;
        page-break-inside: auto;
    }

    .lesson-pdf-page:last-child {
        break-after: auto;
        page-break-after: auto;
    }
}

/* ==========================================================================
   Student mobile bottom navigation
   ========================================================================== */

/* Rendered only for authenticated students (see StudentBottomNav.razor). Visible on
   every breakpoint since the top navigation/footer is hidden for logged-in students. */
.student-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
    justify-content: center;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.98) 40%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 -10px 30px rgba(2, 6, 23, 0.4);
    /* Erzwingt einen eigenen GPU-Compositing-Layer. Ohne dies verschwinden
       position:fixed-Elemente auf echten iOS-/Android-Geräten teils beim
       Scrollen oder wenn die virtuelle Tastatur den Viewport neu berechnet. */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.app-main--student {
    padding-bottom: 6rem;
}

.student-bottom-nav-item {
    position: relative;
    flex: 1 1 0;
    max-width: 6.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.4rem 0.3rem;
    border-radius: 1.1rem;
    color: rgba(226, 232, 240, 0.55);
    text-decoration: none;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.student-bottom-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-size: 1.15rem;
    line-height: 1;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.student-bottom-nav-label {
    white-space: nowrap;
    opacity: 0.85;
}

.student-bottom-nav-item:hover {
    color: rgba(255, 255, 255, 0.85);
}

.student-bottom-nav-item:active {
    transform: scale(0.94);
}

.student-bottom-nav-item.active {
    color: #ffffff;
}

.student-bottom-nav-item.active .student-bottom-nav-icon {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #ffffff;
    transform: translateY(-0.15rem);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.45);
}

.student-bottom-nav-item.active .student-bottom-nav-label {
    opacity: 1;
    font-weight: 800;
}

@media (min-width: 640px) {
    .student-bottom-nav {
        gap: 0.5rem;
        padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    }

    .student-bottom-nav-item {
        max-width: 8rem;
        font-size: 0.72rem;
    }

    .student-bottom-nav-icon {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   Shared gamified UI utilities (progress rings, skeletons, toasts, cards)
   ========================================================================== */

.progress-ring {
    --ring-size: 4.5rem;
    --ring-thickness: 0.45rem;
    --ring-percent: 0;
    --ring-color: var(--skoulou-accent-2);
    position: relative;
    width: var(--ring-size);
    height: var(--ring-size);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--ring-color) calc(var(--ring-percent) * 1%), rgba(148, 163, 184, 0.2) 0);
    transition: background 0.4s ease;
}

.progress-ring::before {
    content: "";
    position: absolute;
    inset: var(--ring-thickness);
    border-radius: 50%;
    background: var(--app-surface, #0f172a);
}

.progress-ring-label {
    position: relative;
    z-index: 1;
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #1f2937;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
}

.xp-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, var(--skoulou-accent-2));
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3);
}

@keyframes skoulou-pop-in {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-stack-enter {
    animation: skoulou-pop-in 0.28s ease both;
}

@keyframes skoulou-bounce {
    0%, 100% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.06);
    }

    70% {
        transform: scale(0.97);
    }
}

.bounce-on-correct {
    animation: skoulou-bounce 0.4s ease;
}

@keyframes skoulou-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton-block {
    border-radius: 0.9rem;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.15) 25%, rgba(148, 163, 184, 0.3) 37%, rgba(148, 163, 184, 0.15) 63%);
    background-size: 400% 100%;
    animation: skoulou-shimmer 1.4s ease infinite;
}

.skoulou-toast-stack {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    pointer-events: none;
    width: min(92vw, 26rem);
}

.skoulou-toast {
    pointer-events: auto;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
    animation: skoulou-pop-in 0.25s ease both;
}

.skoulou-toast-success {
    border-left: 4px solid #22c55e;
}

.skoulou-toast-error {
    border-left: 4px solid #ef4444;
}

/* Progress dots used by the lesson exercise card-stack flow */
.exercise-dot {
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Lernpfad (learning path) view for the student lesson overview */
.lesson-path {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
}

.lesson-path-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1.75rem;
}

.lesson-path-item:last-child {
    padding-bottom: 0;
}

.lesson-path-connector {
    position: absolute;
    top: 2.75rem;
    left: 1.5rem;
    bottom: -0.25rem;
    width: 3px;
    background: #e2e8f0;
    border-radius: 999px;
    z-index: 0;
}

.lesson-path-item:last-child .lesson-path-connector {
    display: none;
}

.lesson-path-item--completed .lesson-path-connector {
    background: linear-gradient(180deg, #22c55e, #86efac);
}

.lesson-path-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    border: 3px solid #ffffff;
}

.lesson-path-node--completed {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.lesson-path-node--current {
    background: linear-gradient(135deg, var(--skoulou-accent-1), var(--skoulou-accent-2));
    animation: skoulou-pulse 1.8s ease infinite;
}

.lesson-path-node--open {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.lesson-path-node--locked {
    background: #cbd5e1;
    color: #64748b;
}

@keyframes skoulou-pulse {
    0%, 100% {
        box-shadow: 0 8px 20px rgba(99, 102, 241, 0.25), 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35), 0 0 0 8px rgba(99, 102, 241, 0);
    }
}

.lesson-path-card {
    flex: 1;
    min-width: 0;
}

@media (max-width: 1023px) {
    .student-learning-page {
        margin-inline: -0.75rem;
    }

    .lesson-path {
        padding: 0.25rem 0;
    }

    .lesson-path-item {
        gap: 0.55rem;
        padding-bottom: 1.1rem;
    }

    .lesson-path-connector {
        top: 2.35rem;
        left: 1.15rem;
        width: 2px;
    }

    .lesson-path-node {
        width: 2.35rem;
        height: 2.35rem;
        border-width: 2px;
        font-size: 0.95rem;
    }

    .lesson-path-card p,
    .lesson-path-card button {
        font-size: 0.8125rem;
    }
}

/* ============================================
   Hero Text Animations
   ============================================ */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(103, 232, 249, 0.5),
                     0 0 40px rgba(103, 232, 249, 0.3),
                     0 0 60px rgba(103, 232, 249, 0.2);
    }
    50% {
        text-shadow: 0 0 30px rgba(103, 232, 249, 0.8),
                     0 0 60px rgba(103, 232, 249, 0.5),
                     0 0 90px rgba(103, 232, 249, 0.3);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.hero-animate-badge {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-animate-title {
    animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

.hero-animate-subtitle {
    animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

.hero-animate-description {
    animation: fadeSlideUp 0.8s ease-out 0.6s both;
}

.hero-animate-buttons {
    animation: fadeSlideUp 0.8s ease-out 0.8s both;
}

.hero-animate-stats {
    animation: scaleIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 1s both;
}

.hero-gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

.hero-text-glow {
    animation: textGlow 3s ease-in-out infinite;
}

.hero-float {
    animation: float 3s ease-in-out infinite;
}

.hero-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

/* Staggered Stats Animation */
.hero-stat-1 {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s both;
}

.hero-stat-2 {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s both;
}

.hero-stat-3 {
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s both;
}

