:root {
    --ink: #171717;
    --paper: #fffdf5;
    --lime: #c8ff45;
    --purple: #8b5cf6;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background-color: #f5f0ff;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(200, 255, 69, .9) 0 10%, transparent 28%),
        radial-gradient(circle at 85% 80%, rgba(139, 92, 246, .35) 0 12%, transparent 30%),
        linear-gradient(135deg, #fff8dc 0%, #f3e8ff 100%);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body.admin-mode {
    min-width: 1160px;
    background: #edf1f5;
    background-image: none;
}

.admin-shell {
    display: flex;
    min-width: 1160px;
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    flex: 0 0 260px;
    flex-direction: column;
    width: 260px;
    height: 100vh;
    padding: 1.25rem .9rem 1rem;
    overflow-y: auto;
    color: #f8fafc;
    background: #171717;
    box-shadow: 5px 0 0 rgba(23, 23, 23, .12);
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 255, 69, .82) rgba(255, 255, 255, .07);
    scrollbar-gutter: stable;
}

.admin-sidebar::-webkit-scrollbar {
    width: 10px;
}

.admin-sidebar::-webkit-scrollbar-track {
    margin: .75rem 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
}

.admin-sidebar::-webkit-scrollbar-thumb {
    min-height: 3rem;
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(200, 255, 69, .82);
    background-clip: padding-box;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--lime);
    background-clip: padding-box;
}

.admin-sidebar-head {
    padding: .2rem .35rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #fff;
    text-decoration: none;
}

.admin-brand:hover { color: #fff; }
.admin-brand .brand-mark { flex: 0 0 auto; border-color: var(--lime); background: var(--lime); color: var(--ink); }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand strong { font-size: .95rem; font-weight: 950; letter-spacing: -.02em; }
.admin-brand small { margin-top: .14rem; color: #aeb6c2; font-size: .63rem; }

.admin-sidebar-nav {
    display: grid;
    gap: .18rem;
    padding-top: 1.15rem;
}

.admin-sidebar-label {
    margin: .85rem .65rem .28rem;
    color: #8d97a5;
    font-size: .6rem;
    font-weight: 950;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.admin-side-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 2.55rem;
    padding: .55rem .7rem;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #dce3ec;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    transition: background .14s ease, color .14s ease, transform .14s ease;
}

.admin-side-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    transform: translateX(2px);
}

.admin-side-link.is-active {
    border-color: var(--lime);
    color: var(--ink);
    background: var(--lime);
    box-shadow: 3px 3px 0 rgba(200, 255, 69, .18);
}

.admin-side-icon {
    display: grid;
    flex: 0 0 1.45rem;
    place-items: center;
    color: #b8c2cf;
    font-size: 1rem;
    line-height: 1;
}

.admin-side-link.is-active .admin-side-icon { color: var(--ink); }
.admin-side-form { margin: 0; }
.admin-side-button { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.admin-sidebar-foot { display: grid; gap: .45rem; margin-top: auto; padding-top: 1.15rem; border-top: 1px solid rgba(255, 255, 255, .14); }
.admin-side-link-muted { color: #aeb6c2; }
.admin-logout-button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .65rem .7rem; border: 1px solid rgba(255, 255, 255, .16); border-radius: 11px; color: #fff; background: rgba(255, 255, 255, .06); font-size: .76rem; font-weight: 850; cursor: pointer; }
.admin-logout-button:hover { border-color: #ff8d8d; color: #fff; background: rgba(220, 53, 69, .22); }

.admin-main-area {
    min-width: 0;
    flex: 1 1 auto;
    background: #edf1f5;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.65rem;
    padding: .75rem 2.25rem;
    border-bottom: 1px solid #d9e0e8;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
}

.admin-topbar-kicker { display: block; margin-bottom: .2rem; color: #64748b; font-size: .6rem; font-weight: 950; letter-spacing: .12em; }
.admin-topbar strong { font-size: 1.05rem; font-weight: 950; }
.admin-topbar-meta { display: inline-flex; align-items: center; gap: .45rem; color: #64748b; font-size: .72rem; font-weight: 800; }
.admin-mobile-menu-button, .admin-sidebar-backdrop { display: none; }

.student-revoke-work { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .75rem; border: 1px dashed #d97706; border-radius: 14px; background: #fffbeb; }
.student-revoke-work small { color: #7c5b16; }
.submission-correction-note { display: grid; gap: .2rem; padding: .9rem 1rem; border: 2px solid #f59e0b; border-radius: 14px; background: #fffbeb; color: #713f12; }
.submission-correction-note strong { font-weight: 950; }

.submission-log-page { width: min(1500px, 100%); }
.submission-log-hero { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-bottom: 1rem; padding: 1.4rem 1.5rem; border: 2px solid var(--ink); border-radius: 22px; background: linear-gradient(135deg, #fff 0%, #f4f7ff 100%); box-shadow: 7px 7px 0 var(--ink); }
.submission-log-hero h1 { margin: .2rem 0 .35rem; font-size: clamp(1.65rem, 2.4vw, 2.4rem); font-weight: 950; }
.submission-log-hero p { max-width: 780px; margin: 0; color: #64748b; }
.submission-log-total { min-width: 120px; padding: .85rem 1rem; border-radius: 16px; background: var(--ink); color: #fff; text-align: center; }
.submission-log-total strong { display: block; font-size: 1.8rem; line-height: 1; }
.submission-log-total span { display: block; margin-top: .25rem; color: #cbd5e1; font-size: .78rem; }
.submission-log-filters { margin-bottom: 1rem; }
.submission-log-reset { display: inline-block; margin-top: .7rem; color: #dc2626; font-weight: 800; text-decoration: none; }
.submission-log-list { display: grid; gap: .65rem; }
.submission-log-item { display: grid; grid-template-columns: 76px 44px minmax(0, 1fr) minmax(150px, 220px); align-items: center; gap: .85rem; padding: 1rem; border: 1px solid #cbd5e1; border-radius: 16px; background: #fff; box-shadow: 0 3px 10px rgba(15, 23, 42, .05); }
.submission-log-time { display: grid; text-align: center; }
.submission-log-time strong { font-size: 1.1rem; }
.submission-log-time span { color: #64748b; font-size: .72rem; }
.submission-log-action-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 1.15rem; font-weight: 950; }
.submission-log-action-success { background: #dcfce7; color: #047857; }
.submission-log-action-primary { background: #dbeafe; color: #1d4ed8; }
.submission-log-action-warning { background: #fef3c7; color: #92400e; }
.submission-log-action-danger { background: #fee2e2; color: #b91c1c; }
.submission-log-action-secondary { background: #e2e8f0; color: #334155; }
.submission-log-main { min-width: 0; }
.submission-log-title { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.submission-log-title > strong { font-size: 1rem; }
.submission-log-action-label { color: #475569; font-size: .8rem; font-weight: 800; }
.submission-log-lesson a { color: #1e3a8a; font-size: .86rem; font-weight: 800; text-decoration: none; }
.submission-log-files { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.submission-log-files span { max-width: 100%; padding: .25rem .5rem; border-radius: 8px; background: #f1f5f9; color: #334155; font-size: .76rem; overflow-wrap: anywhere; }
.submission-log-comment { margin-top: .4rem; color: #64748b; font-size: .8rem; }
.submission-log-actor { display: grid; padding-left: .85rem; border-left: 1px solid #e2e8f0; }
.submission-log-actor span, .submission-log-actor small { color: #64748b; font-size: .7rem; }
.submission-log-actor strong { font-size: .83rem; }

@media (max-width: 900px) {
    .submission-log-item { grid-template-columns: 62px 40px minmax(0, 1fr); }
    .submission-log-actor { grid-column: 3; padding: .55rem 0 0; border: 0; border-top: 1px solid #e2e8f0; }
}
@media (max-width: 560px) {
    .submission-log-hero { align-items: flex-start; padding: 1rem; box-shadow: 4px 4px 0 var(--ink); }
    .submission-log-total { min-width: 78px; }
    .submission-log-item { grid-template-columns: 52px minmax(0, 1fr); gap: .6rem; }
    .submission-log-action-icon { grid-column: 1; grid-row: 2; }
    .submission-log-main { grid-column: 2; grid-row: 1 / span 2; }
    .submission-log-actor { grid-column: 2; }
}
.admin-online-dot { display: inline-block; width: .48rem; height: .48rem; border-radius: 50%; background: #198754; box-shadow: 0 0 0 3px #d1e7dd; }
.admin-dashboard-kicker { display: inline-flex; align-items: center; gap: .45rem; color: #64748b; font-size: .72rem; font-weight: 800; }
.admin-shell-content { min-height: calc(100vh - 4.65rem); overflow: hidden; }
.admin-shell-content > .container { width: 100%; max-width: none; margin: 0; padding-right: 2.25rem !important; padding-left: 2.25rem !important; }
.admin-shell-content .auth-card.admin-card { max-width: 1440px; }
.admin-shell-footer { padding: .9rem 2.25rem 1.25rem; color: #94a3b8; font-size: .68rem; }

.auth-card {
    max-width: 560px;
    background: rgba(255, 253, 245, .96);
    border: 3px solid var(--ink);
    border-radius: 28px;
    box-shadow: 12px 12px 0 var(--ink);
}

.auth-card.wide {
    max-width: 960px;
}

.auth-card.captcha-card {
    max-width: 680px;
}

.auth-card.admin-card {
    max-width: 1120px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.auth-card.profile-card {
    max-width: 1180px;
}

.auth-card.test-library,
.auth-card.test-run {
    max-width: 1120px;
}

.test-card,
.subject-card,
.question-card,
.score-result {
    border: 3px solid var(--ink);
    border-radius: 20px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 6px 6px 0 rgba(23, 23, 23, .12);
}

.test-card,
.subject-card { transition: transform .16s ease, box-shadow .16s ease; }
.test-card:hover,
.subject-card:hover { transform: translateY(-3px); box-shadow: 8px 10px 0 rgba(23, 23, 23, .16); }

.subject-card { background: linear-gradient(135deg, #fff 0%, #efffc9 100%); }
.subject-icon { font-size: 3rem; line-height: 1; }

.form-select {
    border: 2px solid var(--ink);
    border-radius: 14px;
}

.question-number {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    margin-right: .35rem;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--lime);
}

.test-option {
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .12s, transform .12s;
}

.test-option:hover { border-color: var(--ink); transform: translateX(2px); }
.test-option:has(input:checked) { border-color: var(--ink); background: #efffc9; }
.answer-correct { border-color: #198754; box-shadow: 6px 6px 0 rgba(25, 135, 84, .22); }
.answer-wrong { border-color: #dc3545; box-shadow: 6px 6px 0 rgba(220, 53, 69, .2); }
.answer-ungraded { border-color: #6c757d; }
.result-note { padding: .85rem 1rem; border-radius: 12px; background: #f1f5f9; font-weight: 700; }
.score-result { background: var(--lime); }

.sticky-submit {
    position: sticky;
    bottom: 1rem;
    z-index: 20;
    border: 3px solid var(--ink);
    border-radius: 18px;
    background: rgba(255, 253, 245, .96);
    box-shadow: 7px 7px 0 var(--ink);
    backdrop-filter: blur(10px);
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: #fff;
}

.stat-card small { color: #64748b; font-weight: 700; }
.stat-card strong { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1; }
.student-dashboard-overview { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr); gap: 1rem; margin-bottom: 1rem; padding: 1.1rem; border: 3px solid var(--ink); border-radius: 20px; background: linear-gradient(135deg, #efffc9 0%, #fff 58%, #eadcff 100%); box-shadow: 7px 7px 0 rgba(23, 23, 23, .16); }
.student-dashboard-overview-copy { min-width: 0; }
.student-dashboard-kicker { display: inline-block; padding: .25rem .5rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--lime); font-size: .64rem; font-weight: 950; letter-spacing: .04em; }
.student-dashboard-overview h2 { max-width: 32rem; margin: .65rem 0 .35rem; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 950; line-height: 1.05; }
.student-dashboard-overview p { max-width: 38rem; margin: 0; color: #64748b; font-size: .88rem; }
.student-dashboard-quick-links { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.student-dashboard-quick-link { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .7rem; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); font-size: .76rem; font-weight: 900; text-decoration: none; }
.student-dashboard-quick-link:hover { color: var(--ink); background: var(--lime); }
.student-dashboard-quick-link span { font-size: 1rem; line-height: 1; }
.student-dashboard-next { display: flex; align-items: flex-start; flex-direction: column; justify-content: center; min-width: 0; padding: 1rem; border: 2px solid var(--ink); border-radius: 16px; background: rgba(255, 255, 255, .86); }
.student-dashboard-next-label { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: .65rem; color: #64748b; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.student-dashboard-next > strong { margin-top: .45rem; font-size: 1.05rem; line-height: 1.15; }
.student-dashboard-next > span:not(.student-dashboard-next-label):not(.student-dashboard-next-status) { margin-top: .3rem; color: #475569; font-size: .78rem; }
.student-dashboard-next > small { margin-top: .2rem; color: #64748b; font-size: .7rem; }
.student-dashboard-next-status { width: max-content; padding: .25rem .5rem; border: 1px solid currentColor; border-radius: 999px; font-size: .64rem; font-weight: 900; }
.student-dashboard-next-link { display: inline-flex; align-items: center; width: max-content; padding: .42rem .62rem; margin-top: .7rem; border: 1px solid var(--ink); border-radius: 9px; background: var(--lime); color: var(--ink); font-size: .7rem; font-weight: 900; text-decoration: none; }
.student-dashboard-next-link:hover { color: var(--ink); background: #fff; }
.student-dashboard-facts { display: flex; grid-column: 1 / -1; gap: 1rem; padding-top: .9rem; border-top: 2px dashed rgba(23, 23, 23, .28); }
.student-dashboard-facts div { display: flex; align-items: baseline; gap: .4rem; }
.student-dashboard-facts strong { font-size: 1.2rem; font-weight: 950; }
.student-dashboard-facts span { color: #64748b; font-size: .72rem; font-weight: 700; }
.profile-table { border: 2px solid var(--ink); border-radius: 16px; background: #fff; }
.empty-stats { border: 2px dashed var(--ink); border-radius: 16px; background: #fff; }
.student-admin-card { border: 2px solid var(--ink); border-radius: 18px; background: rgba(255,255,255,.8); }

.group-directory { display: grid; gap: .85rem; }
.group-directory-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border: 2px solid var(--ink); border-radius: 18px; background: rgba(255,255,255,.86); box-shadow: 4px 4px 0 rgba(23, 23, 23, .1); }
.group-directory-main { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.group-directory-icon { display: grid; flex: 0 0 2.8rem; place-items: center; width: 2.8rem; height: 2.8rem; border: 2px solid var(--ink); border-radius: 14px; background: var(--lime); font-size: 1.25rem; }
.group-directory-main h3 { overflow-wrap: anywhere; }
.group-directory-meta { display: flex; flex-wrap: wrap; gap: .35rem .7rem; color: #64748b; font-size: .73rem; font-weight: 700; }
.group-directory-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; flex-shrink: 0; }
.group-directory-actions form { margin: 0; }
.group-bulk-panel { padding: .9rem 1rem; border: 2px solid #8b5cf6; border-radius: 16px; background: #f5f0ff; }
.group-bulk-row { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; }
.group-bulk-select { max-width: 280px; }
.group-bulk-count { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding-inline: .2rem; margin-left: .2rem; border-radius: 999px; background: #eadcff; color: #6d28d9; font-size: .68rem; font-weight: 950; }
.group-bulk-row .btn:disabled { opacity: .55; cursor: not-allowed; }
.student-directory { display: grid; gap: .6rem; }
.student-directory-card { border: 2px solid var(--ink); border-radius: 15px; background: rgba(255,255,255,.88); }
.student-directory-summary { display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; }
.student-directory-person { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.student-directory-person strong { overflow-wrap: anywhere; }
.student-directory-person small { color: #64748b; font-size: .72rem; }
.student-directory-metrics { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .32rem; margin-left: auto; }
.student-metric { padding: .27rem .45rem; border: 1px solid #dbe2ea; border-radius: 999px; background: #f8fafc; color: #64748b; font-size: .62rem; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.student-metric b { color: var(--ink); font-weight: 950; }
.student-metric-debt { border-color: #fecaca; background: #fff7f7; }
.student-metric-debt b { color: #b4232d; }
.student-edit-details { margin: 0 .85rem .85rem; }
.student-edit-details > summary { width: max-content; max-width: 100%; padding: .38rem .62rem; border: 1px solid var(--ink); border-radius: 9px; cursor: pointer; color: var(--ink); font-size: .75rem; font-weight: 800; list-style: none; }
.student-edit-details > summary::-webkit-details-marker { display: none; }
.student-edit-details > summary::after { content: '+'; margin-left: .4rem; color: #6d28d9; }
.student-edit-details[open] > summary::after { content: '−'; }
.student-edit-details[open] { padding-top: .7rem; border-top: 1px solid #cbd5e1; }
.student-edit-form { width: 100%; min-width: 0; padding: 0; margin-top: .7rem; }
.login-block-list { display: grid; gap: .75rem; }
.login-block-card { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; border: 2px solid #cbd5e1; border-radius: 16px; background: #fff; }
.login-block-card-identity { border-color: #f0b6c1; background: #fff8fa; }
.login-block-icon { display: grid; flex: 0 0 2.6rem; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: #f1e8ff; font-size: 1.25rem; }
.login-block-main { min-width: 0; flex: 1; }
.login-block-main strong { overflow-wrap: anywhere; }
.login-block-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; color: #64748b; font-size: .72rem; }
.login-block-action { flex-shrink: 0; margin: 0; }
.lesson-calendar-shell, .lesson-calendar-selected, .lesson-calendar-list { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.lesson-calendar-shell { padding: 1rem; border: 2px solid var(--ink); border-radius: 18px; background: #fff; }
.lesson-calendar-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .1rem .1rem .9rem; text-align: center; }
.calendar-nav-button { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 2px solid var(--ink); border-radius: 10px; color: var(--ink); font-size: 1.15rem; font-weight: 900; text-decoration: none; }
.calendar-nav-button:hover { color: var(--ink); background: var(--lime); }
.calendar-today-link { color: #6d28d9; font-size: .72rem; font-weight: 900; text-decoration: none; }
.calendar-today-link:hover { color: var(--ink); text-decoration: underline; }
.lesson-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; }
.lesson-calendar-weekdays { padding: .45rem 0; color: #64748b; font-size: .68rem; font-weight: 900; text-align: center; text-transform: uppercase; }
.lesson-calendar-day, .lesson-calendar-empty { min-height: 4.3rem; border-radius: 12px; }
.lesson-calendar-day { display: flex; align-items: center; flex-direction: column; justify-content: flex-start; gap: .2rem; padding: .55rem .25rem; border: 1px solid #dbe3ee; background: #f8fafc; color: var(--ink); font-size: .9rem; font-weight: 900; text-decoration: none; transition: transform .12s ease, background .12s ease, border-color .12s ease; }
.lesson-calendar-day:hover { border-color: var(--ink); background: #f1f5f9; color: var(--ink); transform: translateY(-2px); }
.lesson-calendar-day small { padding: .16rem .35rem; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: .58rem; font-weight: 900; white-space: nowrap; }
.student-calendar-day-markers { display: flex; gap: .18rem; min-height: .32rem; }
.student-calendar-day-marker { display: block; width: .42rem; height: .42rem; border-radius: 50%; }
.student-calendar-day-marker-danger { background: #dc3545; }
.student-calendar-day-marker-warning { background: #d39e00; }
.student-calendar-day-marker-success { background: #198754; }
.lesson-calendar-day.has-lessons { border: 2px solid #8b5cf6; background: #faf7ff; }
.lesson-calendar-day.has-lessons.is-selected { border-color: var(--ink); background: var(--lime); }
.lesson-calendar-day.is-selected { border: 2px solid var(--ink); background: #fff7d6; }
.lesson-calendar-day.is-selected small { background: var(--ink); color: #fff; }
.lesson-calendar-selected { padding: 1rem 0 0; margin-top: 1rem; border-top: 2px dashed #cbd5e1; }
.calendar-no-lessons { padding: 1rem; border: 2px dashed #cbd5e1; border-radius: 14px; color: #64748b; font-size: .84rem; font-weight: 700; text-align: center; }
.lesson-calendar-list { display: grid; gap: .7rem; }
.lesson-calendar-card { display: flex; align-items: flex-start; gap: .8rem; width: 100%; min-width: 0; box-sizing: border-box; overflow: hidden; padding: .85rem; border: 2px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 3px 3px 0 rgba(23, 23, 23, .1); }
.lesson-calendar-time { display: flex; align-items: center; flex: 0 0 4.2rem; flex-direction: column; padding: .35rem .4rem; border-radius: 12px; background: var(--lime); color: var(--ink); text-align: center; }
.lesson-calendar-time strong { font-size: 1.35rem; line-height: 1; }
.lesson-calendar-time span { font-size: .62rem; font-weight: 900; }
.lesson-calendar-time small { margin-top: .25rem; color: #475569; font-size: .58rem; line-height: 1.2; }
.lesson-calendar-card-main { min-width: 0; flex: 1 1 0; overflow: hidden; }
.lesson-calendar-card-main h4 { overflow-wrap: anywhere; }
.lesson-calendar-card-main p { font-size: .78rem; }
.calendar-submission-line, .calendar-files-line { display: block; max-width: 100%; overflow: hidden; color: #475569; font-size: .72rem; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.calendar-files-line { display: -webkit-box; max-height: 3.1em; color: #64748b; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.lesson-calendar-open { flex: 0 0 auto; align-self: center; }
.student-schedule-section { padding: 1.05rem; border: 2px solid var(--ink); border-radius: 20px; background: rgba(255,255,255,.72); box-shadow: 5px 5px 0 rgba(23, 23, 23, .1); }
.student-mini-calendar { max-width: 500px; padding: .65rem; margin: 0 auto 1rem; border: 1px solid #cbd5e1; border-radius: 14px; background: #fff; }
.student-mini-calendar-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .05rem .05rem .55rem; text-align: center; }
.student-mini-calendar-header > div { display: flex; align-items: center; flex-direction: column; gap: .1rem; min-width: 0; }
.student-mini-calendar-header strong { font-size: .88rem; }
.student-mini-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .22rem; }
.student-mini-calendar-weekdays { padding: .28rem 0; color: #64748b; font-size: .58rem; font-weight: 900; text-align: center; text-transform: uppercase; }
.student-mini-calendar-day, .student-mini-calendar-empty { min-height: 2.6rem; border-radius: 9px; }
.student-mini-calendar-day { display: flex; align-items: center; flex-direction: column; justify-content: flex-start; gap: .1rem; padding: .32rem .1rem; border: 1px solid #e2e8f0; background: #f8fafc; color: var(--ink); font-size: .72rem; font-weight: 900; text-decoration: none; }
.student-mini-calendar-day:hover { border-color: var(--ink); background: #f1f5f9; color: var(--ink); }
.student-mini-calendar-day small { min-width: 1.1rem; padding: .08rem .2rem; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: .5rem; line-height: 1.1; text-align: center; }
.student-mini-calendar-day.has-lessons { border: 2px solid #8b5cf6; background: #faf7ff; }
.student-mini-calendar-day.is-selected { border: 2px solid var(--ink); background: var(--lime); }
.student-mini-calendar-day.is-selected small { background: var(--ink); color: #fff; }
.student-mini-calendar-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem .8rem; padding-top: .55rem; color: #64748b; font-size: .6rem; font-weight: 800; }
.student-mini-calendar-legend span { display: inline-flex; align-items: center; gap: .25rem; }
.student-mini-calendar-legend .student-calendar-day-marker { width: .38rem; height: .38rem; }
.student-selected-day-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; padding: .85rem 0; margin-top: .35rem; border-top: 2px dashed #cbd5e1; }
.student-selected-day-lessons { margin-top: .1rem; }

.group-manage-card {
    border: 3px solid var(--ink);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.9) 0%, rgba(239,255,201,.78) 100%);
    box-shadow: 7px 7px 0 rgba(23, 23, 23, .14);
}

.student-manage-card {
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: rgba(255,255,255,.88);
}

.student-work-row td {
    padding-top: 0;
    border-top: 0;
    background: #f8fafc;
}

.student-work-box {
    margin: 0 .35rem .9rem;
    padding: .8rem 1rem;
    border: 2px dashed #94a3b8;
    border-radius: 14px;
    background: #fff;
}

.student-work-title {
    margin-bottom: .45rem;
    color: #475569;
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.student-work-empty { color: #64748b; font-size: .9rem; }
.material-link { color: var(--ink); text-decoration: none; }
.material-link:hover { color: var(--ink); }

.individual-access-box {
    padding: .8rem;
    border: 2px solid #8b5cf6;
    border-radius: 14px;
    background: #f5f0ff;
}

.individual-access-box .form-check-input { border: 2px solid var(--ink); }
.student-file-action { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; }

.profile-hero {
    border: 3px solid var(--ink);
    border-radius: 22px;
    background: linear-gradient(135deg, #efffc9 0%, #fff 52%, #eadcff 100%);
}

.profile-avatar {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 5rem;
    height: 5rem;
    border: 3px solid var(--ink);
    border-radius: 18px;
    background: var(--lime);
    box-shadow: 5px 5px 0 var(--ink);
    font-size: 1.55rem;
    font-weight: 900;
}

.profile-details {
    border: 2px solid var(--ink);
    border-radius: 18px;
    background: #fff;
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid rgba(23, 23, 23, .14);
}

.profile-detail-row:first-child { padding-top: 0; }
.profile-detail-row:last-child { padding-bottom: 0; border-bottom: 0; }
.profile-detail-row span { color: #64748b; }
.profile-detail-row strong { text-align: right; }
.profile-pin-form { padding-top: 1rem; border-top: 2px dashed #cbd5e1; }
.profile-pin-form h3 { color: #6d28d9; }

.profile-stat {
    height: 100%;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: #fff;
}

.profile-stat strong { display: block; margin-top: .2rem; font-size: clamp(1.55rem, 4vw, 2.1rem); line-height: 1; }
.profile-stat small { color: #64748b; font-weight: 700; }

.attendance-chip {
    display: inline-flex;
    align-items: center;
    padding: .35rem .6rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.attendance-present { background: #d1e7dd; color: #146c43; }
.attendance-late { background: #fff3cd; color: #997404; }
.attendance-absent { background: #f8d7da; color: #b02a37; }
.attendance-excused { background: #e2e3e5; color: #41464b; }
.attendance-unmarked { background: #f1f5f9; color: #64748b; }

.profile-work-card {
    border: 2px solid var(--ink);
    border-radius: 18px;
    background: #fff;
}

.profile-work-file {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    max-width: 100%;
    padding: .5rem .7rem;
    border: 2px solid var(--ink);
    border-radius: 12px;
    color: var(--ink);
    background: #f8fafc;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 700;
}

.profile-work-file:hover { color: var(--ink); background: var(--lime); }

.mega-mix-card {
    color: #fff;
    border: 3px solid var(--ink);
    border-radius: 22px;
    background: linear-gradient(135deg, #171717 0%, #502085 58%, #8b1e3f 100%);
    box-shadow: 8px 8px 0 var(--ink);
}

.mega-mix-card .form-select { background-color: #fff; }
.origin-label { color: #6d28d9; font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.answer-legend { border: 2px dashed #198754; border-radius: 16px; background: #d1e7dd; font-weight: 700; }
.view-option { cursor: default; }
.view-option:hover { transform: none; border-color: #cbd5e1; }
.view-option.view-correct { border-color: #198754; background: #d1e7dd; font-weight: 800; }
.view-option.view-correct:hover { border-color: #198754; }
.answer-marker { width: 1.4rem; color: #198754; font-size: 1.2rem; font-weight: 900; line-height: 1; }

.admin-section {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 2px solid var(--ink);
    border-radius: 20px;
    background: rgba(255, 255, 255, .72);
}

.admin-dashboard-sections {
    display: flex;
    flex-direction: column;
}

.admin-collapsible {
    overflow: hidden;
    padding: 0;
}

.admin-collapsible > summary.admin-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1.15rem 1.5rem;
    cursor: pointer;
    list-style: none;
    font-size: 1.12rem;
    font-weight: 900;
}

.admin-collapsible > summary.admin-section-summary::-webkit-details-marker {
    display: none;
}

.admin-collapsible > summary.admin-section-summary::after {
    content: '+';
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--lime);
    font-size: 1.1rem;
    line-height: 1;
}

.admin-collapsible[open] > summary.admin-section-summary::after {
    content: '−';
    background: #eadcff;
}

.admin-collapsible > .admin-section-body {
    padding: 0 1.5rem 1.5rem;
}

.admin-collapsible > .admin-section-body > :first-child {
    margin-top: 0 !important;
}

.lesson-activity-log-list {
    display: grid;
    gap: .55rem;
}

.lesson-activity-log-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem .85rem;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #fff;
}

.lesson-activity-log-marker {
    flex: 0 0 .7rem;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 0 4px #e2e8f0;
}

.lesson-activity-log-created { background: #198754; box-shadow: 0 0 0 4px #d1e7dd; }
.lesson-activity-log-updated { background: #0d6efd; box-shadow: 0 0 0 4px #cfe2ff; }
.lesson-activity-log-archived { background: #856404; box-shadow: 0 0 0 4px #fff3cd; }
.lesson-activity-log-restored { background: #6f42c1; box-shadow: 0 0 0 4px #eadcff; }
.lesson-activity-log-deleted { background: #b02a37; box-shadow: 0 0 0 4px #f8d7da; }

.lesson-activity-log-main {
    flex: 1;
    min-width: 0;
}

.lesson-activity-log-caption {
    margin-top: .2rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.lesson-activity-log-details {
    display: block;
    margin-top: .18rem;
    color: #64748b;
}

.admin-dashboard-sections .admin-block-create-lesson { order: 10; }
.admin-dashboard-sections .admin-block-lessons { order: 20; }
.admin-dashboard-sections .admin-block-created { order: 30; }
.admin-dashboard-sections .admin-block-bulk { order: 40; }
.admin-dashboard-sections .admin-block-applications { order: 50; }
.admin-dashboard-sections .admin-block-structure { order: 60; }
.admin-dashboard-sections .admin-block-archive { order: 70; }
.admin-dashboard-sections .admin-block-rejected { order: 80; }
.admin-dashboard-sections .admin-block-stats { order: 999; }

.admin-section h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 900;
}

.lesson-material-create-box {
    padding: 1rem;
    border: 2px dashed rgba(23, 23, 23, .42);
    border-radius: 16px;
    background: rgba(234, 220, 255, .34);
}
.admin-material-dropzone { position: relative; display: grid; place-items: center; min-height: 116px; padding: .8rem; border: 2px dashed #8fa6c2; border-radius: 14px; background: linear-gradient(135deg, #f7fcff, #effcf6); color: #30445f; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.admin-material-dropzone:hover, .admin-material-dropzone:focus-visible, .admin-material-dropzone.is-dragging { border-color: #168b58; background: #e9fff1; box-shadow: 0 0 0 4px rgba(22, 139, 88, .12); outline: none; }
.admin-material-dropzone.is-dragging { transform: scale(1.012); }
.admin-material-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-material-dropzone-empty { display: grid; justify-items: center; gap: .16rem; text-align: center; }
.admin-material-dropzone-empty > span { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 2px solid var(--ink); border-radius: 11px; background: var(--lime); color: var(--ink); font-size: 1.5rem; font-weight: 950; line-height: 1; box-shadow: 2px 2px 0 var(--ink); }
.admin-material-dropzone-empty strong { color: var(--ink); font-size: .88rem; font-weight: 950; }
.admin-material-dropzone-empty small { color: #58708f; font-size: .69rem; font-weight: 700; }
.admin-material-file-list { display: grid; width: 100%; gap: .38rem; }
.admin-material-file-chip { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; align-items: center; gap: .45rem; padding: .38rem .45rem; border: 1px solid #b7dbc7; border-radius: 9px; background: rgba(255,255,255,.92); text-align: left; }
.admin-material-file-chip-icon { display: grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: 7px; background: #e5f7ed; font-size: .9rem; }
.admin-material-file-chip b, .admin-material-file-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-material-file-chip b { color: var(--ink); font-size: .69rem; font-weight: 900; }
.admin-material-file-chip small { color: #64748b; font-size: .61rem; }
.admin-material-file-chip button { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; padding: 0; border: 1px solid #f4a8a8; border-radius: 50%; background: #fff7f7; color: #c12431; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.admin-material-file-chip button:hover { background: #ffe4e6; }

.sticky-save {
    position: sticky;
    bottom: 1rem;
    z-index: 10;
    padding: .75rem;
    border: 2px solid var(--ink);
    border-radius: 18px;
    background: rgba(255, 253, 245, .94);
    backdrop-filter: blur(8px);
}

.fw-black {
    font-weight: 900;
    letter-spacing: -.04em;
}

.meme-icon,
.victory-icon {
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .14));
}

.victory-icon {
    font-size: 5rem;
    animation: victory 1.6s ease-in-out infinite alternate;
}

.form-control {
    border: 2px solid var(--ink);
    border-radius: 14px;
}

.form-control:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 .25rem rgba(139, 92, 246, .2);
}

.btn {
    border-width: 2px;
    border-radius: 14px;
    font-weight: 800;
}

.meme-panel {
    background: var(--lime);
    border: 2px dashed var(--ink);
    border-radius: 20px;
    transform: rotate(-1deg);
}

.progress {
    height: 12px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: #fff;
}

.answer-option {
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

.answer-option:has(input:checked) {
    background: var(--lime);
}

.answer-option label,
.answer-option input {
    cursor: pointer;
}

.equation-box {
    padding: 1rem;
    border: 3px dashed var(--ink);
    border-radius: 16px;
    background: var(--lime);
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 5vw, 1.8rem);
    font-weight: 700;
}

.image-captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.image-choice {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 1;
    padding: 0;
    border: 3px solid var(--ink);
    border-radius: 18px;
    background: #fff;
    font-size: clamp(3rem, 10vw, 5rem);
    transition: transform .15s, background-color .15s;
}

.image-choice img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-fallback {
    line-height: 1;
}

.image-choice:hover,
.image-choice:focus-visible {
    transform: rotate(-3deg) scale(1.04);
    box-shadow: 0 0 0 5px var(--lime);
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px;
    border: 3px solid var(--ink);
    border-radius: 18px;
    background: #8d7c6f;
    touch-action: none;
}

.game-tile {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 10px;
    background: #cfc4b8;
    color: var(--ink);
    font-size: clamp(1.1rem, 5vw, 2rem);
    font-weight: 900;
}

.tile-2 { background: #eee4da; }
.tile-4 { background: #ede0c8; }
.tile-8 { background: #f2b179; color: #fff; }
.tile-16 { background: #f59563; color: #fff; }
.tile-32 { background: #f67c5f; color: #fff; }
.tile-64 { background: #f65e3b; color: #fff; }
.tile-128 { background: #edcf72; }
.tile-256 { background: #edcc61; }
.tile-512 { background: #edc850; }
.tile-1024 { background: #edc53f; font-size: clamp(.9rem, 4vw, 1.6rem); }
.tile-2048 { background: var(--lime); font-size: clamp(.9rem, 4vw, 1.6rem); }

.score-box {
    padding: .65rem 1rem;
    border: 2px solid var(--ink);
    border-radius: 12px;
    background: var(--lime);
}

.game-controls {
    display: grid;
    grid-template-columns: repeat(3, 58px);
    justify-content: center;
    gap: 8px;
}

.game-controls button {
    width: 58px;
    height: 48px;
    border: 2px solid var(--ink);
    border-radius: 10px;
    background: #fff;
    font-size: 1.4rem;
    font-weight: 900;
}

.game-controls button:first-child { grid-column: 2; }
.game-controls button:nth-child(2) { grid-column: 1; }

.replacement-captcha {
    text-align: center;
    border: 3px dashed var(--ink);
    border-radius: 20px;
    background: var(--lime);
}

.denied-result {
    border: 3px solid var(--ink);
    border-radius: 20px;
    background: repeating-linear-gradient(
        -45deg,
        #fff 0,
        #fff 14px,
        #ffe3e3 14px,
        #ffe3e3 28px
    );
    box-shadow: 7px 7px 0 #dc3545;
}

.interview-input {
    min-height: 130px;
    resize: vertical;
}

.suspicious-verdict {
    border: 3px solid var(--ink);
    border-radius: 20px;
    background: #fff3cd;
    transform: rotate(-1deg);
}

.document-check {
    border: 3px solid var(--ink);
    border-radius: 20px;
    background: #f1f5f9;
}

.document-stamp {
    width: max-content;
    margin-inline: auto;
    padding: .5rem 1.25rem;
    border: 4px double #dc3545;
    color: #dc3545;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    transform: rotate(-5deg);
    opacity: .82;
}

.verification-progress {
    height: 30px;
}

.matching-row,
.matching-answer {
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: #fff;
}

.matching-row.match-correct {
    border-color: #198754;
    background: #d1e7dd;
}

.matching-row.match-wrong {
    border-color: #dc3545;
    background: #f8d7da;
}

.matching-answer {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
}

.matching-arrow {
    font-size: 1.4rem;
    font-weight: 900;
}

@keyframes victory {
    to { transform: rotate(8deg) scale(1.08); }
}

@media (max-width: 576px) {
    .auth-card { box-shadow: 7px 7px 0 var(--ink); }
    .matching-answer { grid-template-columns: 1fr; }
    .matching-arrow { transform: rotate(90deg); }
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem .7rem .65rem 1rem;
    border: 2px solid var(--ink);
    border-radius: 22px;
    background: rgba(255, 253, 245, .9);
    box-shadow: 6px 6px 0 rgba(23, 23, 23, .15);
    backdrop-filter: blur(8px);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    flex: 0 0 auto;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.55rem;
    height: 2.55rem;
    border: 2px solid var(--ink);
    border-radius: 13px;
    background: linear-gradient(135deg, var(--lime) 0%, #e8ff9e 100%);
    box-shadow: 3px 3px 0 var(--ink);
    color: #6d28d9;
    font-size: 1.35rem;
    font-weight: 950;
    transform: rotate(-5deg);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-copy strong {
    font-size: 1.02rem;
    font-weight: 950;
    letter-spacing: -.035em;
}

.brand-copy small {
    margin-top: .23rem;
    color: #64748b;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    min-width: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .1rem;
    padding: .18rem;
    border: 1px solid rgba(23, 23, 23, .14);
    border-radius: 14px;
    background: rgba(248, 250, 252, .72);
}

.nav-item-link,
.nav-register,
.nav-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    min-height: 2.35rem;
    padding: .42rem .72rem;
    border: 0;
    border-radius: 10px;
    color: var(--ink);
    font-size: .8rem;
    font-weight: 850;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.nav-item-link:hover { color: var(--ink); background: #fff; transform: translateY(-1px); }
.nav-icon { color: #6d28d9; font-size: 1rem; font-weight: 950; line-height: 1; }
.nav-help-button { display: inline-flex; align-items: center; gap: .42rem; min-height: 2.35rem; padding: .42rem .68rem; border: 1.5px solid #7c3aed; border-radius: 10px; background: #f5f0ff; color: #5422a5; font-size: .7rem; font-weight: 900; line-height: 1; white-space: nowrap; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.nav-help-button:hover { background: #eadcff; color: #3b1681; box-shadow: 2px 2px 0 #7c3aed; transform: translateY(-1px); }
.nav-help-icon { display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #7c3aed; color: #fff; font-size: .72rem; font-weight: 950; }

.nav-register {
    padding-inline: .95rem;
    border: 2px solid var(--ink);
    background: var(--lime);
    box-shadow: 3px 3px 0 var(--ink);
}

.nav-register:hover,
.nav-logout:hover { color: var(--ink); transform: translateY(-1px); }
.nav-register span,
.nav-logout span { transition: transform .15s ease; }
.nav-register:hover span,
.nav-logout:hover span { transform: translate(2px, -2px); }

.site-footer { margin-top: 2.5rem; padding: 2rem 0 1rem; border-top: 2px solid var(--ink); background: #1d2530; color: #eef2f7; }
.site-footer-grid { display: grid; grid-template-columns: minmax(260px, 1.35fr) minmax(170px, .75fr) minmax(180px, .8fr); gap: 1.5rem; padding-bottom: 1.5rem; }
.site-footer-brand { display: flex; align-items: flex-start; gap: .75rem; }
.site-footer-brand .brand-mark { flex: 0 0 auto; background: var(--lime); color: var(--ink); box-shadow: 3px 3px 0 rgba(255,255,255,.2); }
.site-footer-brand strong { display: block; color: #fff; font-size: .95rem; }
.site-footer-brand p { max-width: 410px; margin: .3rem 0 0; color: #b7c1ce; font-size: .73rem; line-height: 1.45; }
.site-footer-contact { display: grid; align-content: start; gap: .22rem; }
.site-footer-contact > span { color: #aab7c5; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.site-footer-contact strong { color: #fff; font-size: .82rem; }
.site-footer-contact button { width: max-content; padding: 0; border: 0; background: transparent; color: var(--lime); font-size: .74rem; font-weight: 900; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.site-footer-contact button span { display: inline-block; transition: transform .15s ease; }
.site-footer-contact button:hover span { transform: translate(2px, -2px); }
.site-footer-links { display: grid; align-content: start; gap: .43rem; }
.site-footer-links a { color: #d9e2eb; font-size: .7rem; font-weight: 750; text-decoration: none; }
.site-footer-links a:hover { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.site-footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding-top: .85rem; border-top: 1px solid #475569; color: #94a3b8; font-size: .65rem; }

.contact-dialog { width: min(500px, calc(100vw - 2rem)); padding: 0; overflow: hidden; border: 2px solid var(--ink); border-radius: 22px; background: #fffefa; box-shadow: 10px 11px 0 var(--ink); }
.contact-dialog::backdrop { background: rgba(15, 23, 42, .62); backdrop-filter: blur(5px); }
.contact-dialog-bar { display: flex; align-items: center; justify-content: space-between; padding: .7rem .85rem; border-bottom: 1px solid #dbe2ea; background: #f5f0ff; color: #6432ba; font-size: .65rem; font-weight: 950; letter-spacing: .08em; }
.contact-dialog-bar button { display: grid; place-items: center; width: 1.85rem; height: 1.85rem; padding: 0; border: 1px solid #a78bfa; border-radius: 50%; background: #fff; color: #5422a5; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.contact-dialog-bar button:hover { background: #eadcff; }
.contact-dialog-content { padding: 1.25rem 1.4rem 1.45rem; text-align: center; }
.contact-avatar { display: block; width: 92px; height: 92px; margin: 0 auto .7rem; border: 3px solid var(--ink); border-radius: 50%; object-fit: cover; object-position: 52% 25%; box-shadow: 4px 4px 0 var(--lime); }
.contact-dialog-content h2 { margin: 0; color: var(--ink); font-size: 1.16rem; font-weight: 950; }
.contact-dialog-content > p { margin: .4rem auto 1rem; color: #64748b; font-size: .74rem; line-height: 1.4; }
.contact-list { display: grid; gap: .55rem; text-align: left; }
.contact-item { display: grid; grid-template-columns: 2.35rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .6rem .65rem; border: 1px solid #dbe2ea; border-radius: 13px; background: #fff; }
.contact-social-icon { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; padding: .32rem; border: 1px solid #dbe2ea; border-radius: 10px; background: #fff; }
.contact-social-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.contact-social-max { padding: .22rem; }
.contact-item div { min-width: 0; }
.contact-item small, .contact-item a { display: block; }
.contact-item small { margin-bottom: .08rem; color: #8693a5; font-size: .56rem; font-weight: 950; letter-spacing: .07em; }
.contact-item a { overflow: hidden; color: #243247; font-size: .78rem; font-weight: 900; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.contact-item a:hover { color: #5b21b6; text-decoration: underline; }
.contact-item button { padding: .36rem .48rem; border: 1px solid #c7b5f2; border-radius: 8px; background: #faf7ff; color: #5b21b6; font-size: .62rem; font-weight: 900; white-space: nowrap; cursor: pointer; }
.contact-item button:hover { background: #eadcff; }
@media (max-width: 767px) {
    .site-footer { margin-top: 1.75rem; padding-top: 1.45rem; }
    .site-footer-grid { grid-template-columns: 1fr; gap: 1.15rem; }
    .site-footer-bottom { align-items: flex-start; flex-direction: column; gap: .35rem; }
    .contact-dialog-content { padding: 1.05rem .9rem 1.1rem; }
}
@media (max-width: 520px) {
    .site-nav.nav-open .nav-help-button { justify-content: center; width: 100%; min-height: 2.4rem; }
    .contact-item { grid-template-columns: 2.2rem minmax(0, 1fr); }
    .contact-item button { grid-column: 2; justify-self: start; }
}

.nav-context,
.nav-note {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #64748b;
    font-size: .7rem;
    font-weight: 850;
    white-space: nowrap;
}

.nav-context {
    padding: .43rem .62rem;
    border: 1px solid rgba(23, 23, 23, .15);
    border-radius: 999px;
    background: #fff;
}

.nav-context-dot { width: .42rem; height: .42rem; border-radius: 50%; background: #6d28d9; box-shadow: 0 0 0 3px #eadcff; }
.nav-context-student .nav-context-dot { background: #198754; box-shadow: 0 0 0 3px #d1e7dd; }
.nav-logout-form { margin: 0; }
.nav-logout { padding-inline: .62rem; background: transparent; }
.nav-logout:hover { background: #f1f5f9; }

.subgroup-editor {
    border: 1px solid rgba(23, 23, 23, .16);
    border-radius: 14px;
    background: rgba(248, 250, 252, .64);
}

.nav-menu-toggle {
    display: none;
    place-items: center;
    gap: .22rem;
    width: 2.2rem;
    height: 2.2rem;
    margin-left: auto;
    padding: .45rem;
    border: 2px solid var(--ink);
    border-radius: 11px;
    background: var(--lime);
    box-shadow: 3px 3px 0 var(--ink);
}

.nav-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
}

@media (max-width: 930px) {
    .nav-note { display: none; }
    .nav-context { display: none; }
}

.hero-card {
    box-shadow: 12px 12px 0 var(--ink);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: .35rem .7rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.status-approved { background: #d1e7dd; color: #146c43; }
.status-rejected { background: #f8d7da; color: #b02a37; }

.lesson-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease;
}

.lesson-row:hover { color: var(--ink); transform: translateX(3px); box-shadow: 4px 4px 0 var(--lime); }
.lesson-row-archived { border-color: #94a3b8; background: #f8fafc; }
.lesson-row > .flex-grow-1 { min-width: 0; }
.lesson-row > .fw-black { flex: 0 0 auto; white-space: nowrap; }
.lesson-date { min-width: 3.2rem; font-size: 1.1rem; font-weight: 900; }
.material-icon { font-size: 1.8rem; line-height: 1; }
.student-debt-stat-card { display: block; color: var(--ink); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.pin-registration-note { display: grid; gap: .18rem; margin-bottom: .7rem; padding: .75rem .85rem; border: 2px solid #198754; border-radius: 14px; background: #f0fdf4; color: #146c43; }
.pin-registration-note strong { font-size: .86rem; letter-spacing: .02em; }
.pin-registration-note span { color: #475569; font-size: .76rem; line-height: 1.35; }
.student-development-badge { display: inline-flex; align-items: center; min-height: 1.7rem; padding: .22rem .55rem; border: 1px solid #856404; border-radius: 999px; background: #fff3cd; color: #856404; font-size: .68rem; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.student-nav-development { display: inline-flex; align-items: center; margin-left: .15rem; padding: .12rem .3rem; border-radius: 999px; background: #fff3cd; color: #856404; font-size: .56rem; font-weight: 900; line-height: 1.1; }
.student-debt-stat-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 4px 4px 0 var(--ink); }
.student-debt-stat-card.has-debts { border-color: #dc3545; background: #fff7f7; }
.student-debt-stat-card.has-debts strong { color: #b42318; }
.student-debt-stat-card.no-debts { border-color: #198754; background: #f0fdf4; }
.student-debt-stat-card span { color: #146c43; }
.student-stat-link { position: relative; display: flex; color: var(--ink); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease; }
.student-stat-link::after { position: absolute; top: .62rem; right: .72rem; display: grid; place-items: center; width: 1.55rem; height: 1.55rem; border: 1px solid #94a3b8; border-radius: 50%; content: '↘'; background: #fff; color: #475569; font-size: .78rem; font-weight: 950; }
.student-stat-link:hover { color: var(--ink); border-color: var(--ink); background: #fff; box-shadow: 4px 4px 0 var(--ink); transform: translateY(-2px); }
.student-stat-link:hover::after { border-color: var(--ink); background: var(--lime); color: var(--ink); }
.student-stat-link-grades { background: #f0fdf4; }
.student-stat-link-grades strong { color: #198754; }
.student-stat-link-materials { background: #eff6ff; }
.student-stat-link-materials strong { color: #2563eb; }
.student-debts-shell { max-width: 980px; }
.student-debt-empty { padding: 3rem 1.5rem; border: 2px solid #198754; border-radius: 22px; background: #f0fdf4; text-align: center; }
.student-debt-empty-icon { margin-bottom: .6rem; font-size: 3rem; }
.student-debt-empty h2 { margin: .55rem 0 .35rem; font-size: 1.65rem; font-weight: 950; }
.student-debt-empty p { max-width: 560px; margin: 0 auto 1.25rem; color: #475569; }
.student-debt-warning { display: flex; align-items: flex-start; gap: .9rem; padding: 1rem 1.1rem; border: 2px solid #dc3545; border-radius: 16px; background: #fff7f7; color: #7f1d1d; }
.student-debt-warning-icon { display: grid; flex: 0 0 2rem; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #dc3545; color: #fff; font-weight: 950; }
.student-debt-warning strong { display: block; margin-bottom: .18rem; font-size: 1.05rem; }
.student-debt-warning p { color: #7f1d1d; font-size: .82rem; line-height: 1.45; }
.student-debt-list { display: grid; gap: 1rem; }
.student-debt-card { overflow: hidden; padding: 1.1rem; border: 2px solid var(--ink); border-left: 6px solid #dc3545; border-radius: 18px; background: #fff; box-shadow: 4px 4px 0 rgba(220, 53, 69, .12); }
.student-debt-card-top { display: flex; align-items: flex-start; gap: .85rem; }
.student-debt-pair { display: flex; flex: 0 0 4rem; align-items: center; flex-direction: column; justify-content: center; min-height: 4rem; border: 2px solid var(--ink); border-radius: 13px; background: #ffd9de; color: var(--ink); text-align: center; }
.student-debt-pair strong { font-size: 1.7rem; line-height: 1; }
.student-debt-pair small { margin-top: .25rem; font-size: .56rem; font-weight: 950; }
.student-debt-card-title { min-width: 0; flex: 1; }
.student-debt-card-title h2 { margin: .2rem 0 .15rem; font-size: 1.12rem; font-weight: 950; overflow-wrap: anywhere; }
.student-debt-card-title p { margin: 0 0 .4rem; color: #64748b; font-size: .8rem; }
.student-debt-card-title .student-lesson-scope { display: inline-block; margin-top: 0; }
.student-debt-assignment { display: grid; gap: .25rem; margin-top: 1rem; padding: .8rem .9rem; border-radius: 12px; background: #fff7ed; color: #7c2d12; font-size: .8rem; line-height: 1.45; }
.student-debt-request-status { margin-top: 1rem; padding: .75rem .85rem; border-radius: 12px; font-size: .78rem; font-weight: 800; }
.student-debt-request-pending { background: #fff7d6; color: #856404; }
.student-debt-request-rejected { background: #fff1f2; color: #9f1239; }
.student-debt-form { display: grid; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed #cbd5e1; }
.student-debt-form label { font-size: .78rem; font-weight: 900; }
.student-debt-form textarea { width: 100%; min-height: 4rem; padding: .7rem .8rem; border: 1px solid #94a3b8; border-radius: 11px; resize: vertical; font-size: .82rem; }
.student-debt-form textarea:focus { border-color: var(--ink); outline: 2px solid var(--lime); }
.student-debt-open-lesson { display: inline-flex; margin-top: 1rem; color: var(--ink); font-size: .78rem; font-weight: 950; text-decoration: underline; text-underline-offset: 3px; }
.student-debt-open-lesson:hover { color: #146c43; }
.debt-admin-section { padding: 1.25rem; }
.debt-admin-list { display: grid; gap: .75rem; }
.debt-admin-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem; border: 1px solid #cbd5e1; border-left: 4px solid #f59e0b; border-radius: 14px; background: #fff; }
.debt-admin-card-active { border-left-color: #dc3545; }
.debt-admin-card-main { min-width: 0; flex: 1; }
.debt-admin-card-main h3 { margin: .2rem 0 .1rem; font-size: .94rem; font-weight: 950; }
.debt-admin-card-main small { font-size: .72rem; }
.debt-admin-card-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.debt-admin-card-actions form { display: inline-flex; }
.debt-request-comment { margin-top: .65rem; padding: .65rem .75rem; border-radius: 10px; background: #fff7d6; color: #59480a; font-size: .8rem; line-height: 1.4; }
.debt-filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem; margin-bottom: 1rem; padding: .85rem; border: 1px solid #cbd5e1; border-radius: 14px; background: #f8fafc; }
.debt-filter-bar label { display: grid; gap: .3rem; min-width: 220px; font-size: .72rem; font-weight: 900; }
.debt-filter-bar .form-select { min-width: 220px; }
.debt-grade-form { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.debt-grade-form .form-select { width: auto; min-width: 92px; }
.debt-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; }
.debt-page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; min-height: 2.25rem; padding: .25rem .55rem; border: 1px solid #94a3b8; border-radius: 9px; background: #fff; color: var(--ink); font-size: .78rem; font-weight: 900; text-decoration: none; }
.debt-page-link:hover, .debt-page-link.active { border-color: var(--ink); background: var(--lime); color: var(--ink); }
.debt-student-list { display: grid; gap: .7rem; }
.debt-student-card { display: flex; align-items: center; gap: .85rem; padding: .85rem; border: 1px solid #cbd5e1; border-left: 4px solid #dc3545; border-radius: 14px; background: #fff; }
.debt-student-avatar { display: grid; flex: 0 0 2.7rem; place-items: center; width: 2.7rem; height: 2.7rem; border: 2px solid var(--ink); border-radius: 50%; background: #fff0f1; font-size: 1.2rem; }
.debt-student-main { min-width: 0; flex: 1; }
.debt-student-name { font-size: 1rem; font-weight: 950; overflow-wrap: anywhere; }
.debt-student-meta { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
.debt-student-open { flex: 0 0 auto; white-space: nowrap; }
.student-admin-profile { max-width: 1180px; }
.student-profile-info, .student-profile-debts { padding: 1.25rem; }
.profile-stat-danger { border-color: #dc3545; background: #fff7f7; }
.profile-stat-danger strong { color: #b42318; }
.student-profile-debts .debt-admin-list { margin-top: .25rem; }
.student-profile-debts .debt-admin-card { border-left-color: #dc3545; }
.student-lesson-card[open] { border-color: var(--ink); border-left-color: var(--lime); box-shadow: 0 6px 16px rgba(23, 23, 23, .12); }
.student-lesson-summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 1rem 1.1rem; cursor: pointer; list-style: none; }
.student-lesson-summary::-webkit-details-marker { display: none; }
.student-lesson-summary::after { display: grid; flex: 0 0 auto; place-items: center; width: auto; min-width: 5.8rem; height: 2rem; padding: .25rem .55rem; border: 2px solid var(--ink); border-radius: 9px; content: 'Открыть →'; background: var(--lime); font-size: .68rem; font-weight: 950; line-height: 1; text-align: center; }
.student-lesson-card[open] .student-lesson-summary::after { content: 'Свернуть ↑'; background: #eadcff; }
.student-lesson-pair-number { display: flex; align-items: center; flex: 0 0 3.7rem; flex-direction: column; justify-content: center; min-height: 3.65rem; border: 2px solid var(--ink); border-radius: 13px; background: var(--lime); color: var(--ink); text-align: center; }
.student-lesson-pair-number strong { font-size: 1.75rem; font-weight: 950; line-height: .95; }
.student-lesson-pair-number small { margin-top: .22rem; font-size: .56rem; font-weight: 950; letter-spacing: .04em; line-height: 1; }
.student-lesson-summary-main { min-width: 0; flex: 1; }.student-lesson-summary-main > span, .student-lesson-summary-main > strong { display: block; }.student-lesson-summary-main > strong { margin-top: .22rem; font-size: 1.04rem; }.student-lesson-summary-main > .student-lesson-topic { overflow: hidden; margin-top: .16rem; color: #64748b; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }.student-lesson-meta { color: #64748b; font-size: .68rem; font-weight: 800; }.student-lesson-summary-side { display: flex; flex: 0 0 auto; align-items: flex-end; flex-direction: column; gap: .28rem; min-width: 6.3rem; text-align: right; }.student-lesson-summary-side small { color: #64748b; font-size: .68rem; }.student-lesson-chevron { display: none; }.student-lesson-details { padding: 0 1.1rem 1.1rem; border-top: 1px dashed #cbd5e1; }.student-lesson-details > :first-child { margin-top: 1rem !important; }
.student-grade-comment-preview { width: fit-content; max-width: 100%; margin-top: .48rem; padding: .42rem .58rem; border-left: 3px solid #f59e0b; border-radius: 0 8px 8px 0; background: #fffbeb; color: #6b4f12; font-size: .7rem; line-height: 1.35; white-space: normal; }
.student-grade-comment-preview b, .student-grade-comment-preview > span { display: block; }
.student-grade-comment-preview b { margin-bottom: .12rem; color: #92400e; font-size: .6rem; letter-spacing: .04em; text-transform: uppercase; }
.student-visible-grade { display: grid; grid-template-columns: auto auto; align-items: center; gap: .3rem; min-width: 3.8rem; padding: .3rem .52rem; border: 1px solid currentColor; border-radius: 10px; line-height: 1; }
.student-visible-grade small { color: inherit; font-size: .52rem; font-weight: 950; letter-spacing: .04em; }
.student-visible-grade strong { color: inherit; font-size: 1.42rem; font-weight: 950; line-height: .9; }
.student-visible-grade-5 { background: #d1fae5; color: #047857; }
.student-visible-grade-4 { background: #e8f3ec; color: #4f735d; }
.student-visible-grade-3 { background: #fff3cd; color: #9a6700; }
.student-visible-grade-2 { background: #ffe4e6; color: #be123c; }
.student-grade-empty { padding: .3rem .5rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; color: #64748b; font-size: .65rem; font-weight: 850; }
.student-profile-grade { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid currentColor; border-radius: 8px; font-size: 1.05rem; font-weight: 950; }
.student-lesson-scope { width: max-content; margin-top: .32rem; padding: .2rem .45rem; border: 1px solid #198754; border-radius: 999px; background: #f0fdf4; color: #146c43 !important; font-size: .64rem !important; font-weight: 900 !important; line-height: 1.1; }
.student-lesson-badges { display: flex !important; align-items: center; flex-wrap: wrap; gap: .35rem; margin-top: .32rem; }
.student-lesson-badges .student-lesson-scope, .student-lesson-badges .student-lesson-status { margin-top: 0; }
.student-lesson-status { width: max-content; margin-top: .36rem; padding: .25rem .5rem; border: 1px solid currentColor; border-radius: 999px; font-size: .64rem !important; font-weight: 900; line-height: 1.1; }
.student-work-status { display: inline-flex; align-items: center; width: max-content; padding: .25rem .5rem; border: 1px solid currentColor; border-radius: 999px; font-size: .62rem; font-weight: 900; line-height: 1.1; }
.student-work-status-success { background: #d1e7dd; color: #146c43; }
.student-work-status-warning { background: #fff3cd; color: #856404; }
.student-work-status-danger { background: #f8d7da; color: #b02a37; }
.student-live-status { display: inline-flex; align-items: center; width: max-content; padding: .25rem .5rem; border: 1px solid #8b5cf6; border-radius: 999px; background: #eadcff; color: #6d28d9; font-size: .62rem; font-weight: 900; line-height: 1.1; }
.student-lesson-materials { padding-top: .15rem; }
.student-lesson-materials-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; font-size: .82rem; font-weight: 900; }
.student-lesson-helper { color: #64748b; font-size: .7rem; line-height: 1.45; }
.student-lesson-material-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border: 1px solid #94a3b8; border-radius: 12px; background: #f8fafc; color: var(--ink); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.student-lesson-material-row > .flex-grow-1 { min-width: 0; }
.student-lesson-material-row:hover { color: var(--ink); background: #fff; transform: translateX(2px); box-shadow: 3px 3px 0 var(--lime); }
.student-lesson-material-row .material-icon { flex: 0 0 auto; font-size: 1.35rem; }
.student-lesson-material-row strong, .student-lesson-material-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-lesson-material-row strong { font-size: .82rem; }
.student-lesson-material-row small { margin-top: .12rem; color: #64748b; font-size: .7rem; }
.student-lesson-material-open { flex: 0 0 auto; font-size: .72rem; font-weight: 900; white-space: nowrap; }
.student-lesson-material-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.student-lesson-material-actions .btn { font-size: .68rem; font-weight: 900; white-space: nowrap; }
.student-lesson-test-row { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border: 1px solid #198754; border-radius: 12px; background: #f0fdf4; }
.student-lesson-test-row .material-icon { flex: 0 0 auto; font-size: 1.35rem; }
.student-lesson-test-row strong, .student-lesson-test-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-lesson-test-row strong { font-size: .82rem; }
.student-lesson-test-row small { margin-top: .12rem; color: #64748b; font-size: .7rem; }
.student-lesson-test-row .status-pill { padding: .25rem .45rem; border-width: 1px; font-size: .62rem; }
.lesson-status-upcoming { color: #6d28d9 !important; background: #f5f0ff; }
.lesson-status-ongoing { color: #146c43 !important; background: #d1fae5; }
.lesson-status-finished { color: #64748b !important; background: #f1f5f9; }
.lesson-status-neutral { color: #856404 !important; background: #fff3cd; }
.assignment-callout { padding: .9rem 1rem; border: 2px dashed var(--ink); border-radius: 14px; background: var(--lime); font-weight: 700; }
.submission-form { display: grid; gap: .9rem; padding: 1rem; border: 1px solid #d9e3ea; border-top: 0; border-radius: 0 0 16px 16px; background: #fff; }
.submission-meta-grid { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); gap: .85rem; align-items: end; }
.submission-meta-field { min-width: 0; }
.submission-meta-field .form-label { margin: 0 0 .3rem; color: #26354a; font-size: .76rem; font-weight: 900; }
.submission-meta-field .form-label span { color: #8a96a6; font-weight: 600; }
.submission-collaboration-field { padding: .65rem .7rem; border: 1px solid #dce5ed; border-radius: 12px; background: #f8fafc; }
.submission-collaboration-field .form-label { display: block; margin-bottom: .3rem; }
.submission-collaboration-field .form-select { min-height: 38px; border-radius: 9px; background-color: #fff; font-size: .82rem; }
.submission-collaboration-field small { display: block; margin-top: .34rem; color: #77859a; font-size: .67rem; line-height: 1.3; }
.submission-comment-field { align-self: center; }
.submission-comment-field .form-control { min-height: 43px; border-color: #cbd7e3; border-radius: 10px; background: #fff; }
.submission-file-input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.submission-dropzone {
    position: relative;
    min-height: 150px;
    padding: 1rem;
    border: 2px dashed #8fb2d3;
    border-radius: 15px;
    background: linear-gradient(135deg, #f7fbff 0%, #eefbf3 100%);
    cursor: pointer;
    outline: none;
    transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.submission-dropzone:hover,
.submission-dropzone:focus-visible { border-color: #1677e8; box-shadow: 0 0 0 4px rgba(22, 119, 232, .12); }
.submission-dropzone.is-dragging {
    border-color: #168a50;
    border-style: solid;
    background: #e7fff0;
    box-shadow: 0 10px 24px rgba(22, 138, 80, .15);
    transform: scale(1.008);
}
.submission-dropzone.is-dragging .submission-dropzone-icon { animation: submission-drop-bounce .55s ease-in-out infinite alternate; }
.submission-dropzone-empty { display: grid; justify-items: center; gap: .28rem; padding: .55rem 1rem; text-align: center; color: #52637a; }
.submission-dropzone-empty strong { color: #172033; font-size: 1rem; }
.submission-dropzone-empty b { color: #087a45; text-decoration: underline; text-underline-offset: 3px; }
.submission-dropzone-empty small { max-width: 590px; color: #718096; font-size: .73rem; }
.submission-dropzone-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: .15rem;
    border-radius: 13px;
    background: #baff3e;
    box-shadow: 0 3px 0 #1d2530;
    color: #1d2530;
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
}
.submission-file-preview { display: grid; gap: .55rem; }
.submission-file-preview-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: .7rem;
    padding: .52rem .6rem;
    border: 1px solid #b7d8c2;
    border-radius: 12px;
    background: rgba(255, 255, 255, .86);
    animation: submission-file-arrive .22s ease-out both;
}
.submission-file-thumb, .submission-file-type { width: 46px; height: 42px; border-radius: 9px; }
.submission-file-thumb { display: block; border: 1px solid #d1d5db; object-fit: cover; }
.submission-file-type { display: grid; place-items: center; padding: .25rem; background: #eaf2ff; color: #1769aa; font-size: .62rem; font-weight: 900; text-align: center; }
.submission-file-info { min-width: 0; }
.submission-file-info strong, .submission-file-info small { display: block; }
.submission-file-info strong { overflow: hidden; color: #182334; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.submission-file-info small { margin-top: .12rem; color: #17824b; font-size: .68rem; }
.submission-file-open { color: #245a94; font-size: .7rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.submission-file-open:hover { color: #12385f; text-decoration: underline; }
.submission-file-remove { width: 29px; height: 29px; padding: 0; border: 1px solid #f09a9a; border-radius: 50%; background: #fff7f7; color: #dc3545; cursor: pointer; font-size: 1.28rem; line-height: 1; }
.submission-file-remove:hover { background: #ffe4e6; }
.submission-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .15rem 0 0; }
.submission-action-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.submission-action-buttons .btn { min-height: 42px; padding-inline: 1rem; border-radius: 10px; font-size: .76rem; }
.submission-upload-hint { max-width: 470px; color: #69788b; font-size: .7rem; line-height: 1.35; }
.submission-confirm-open { overflow: hidden; }
.submission-confirm-modal { display: grid; position: fixed; z-index: 2200; inset: 0; place-items: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .16s ease; }
.submission-confirm-modal[hidden] { display: none; }
.submission-confirm-modal.is-open { opacity: 1; pointer-events: auto; }
.submission-confirm-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .72); backdrop-filter: blur(5px); }
.submission-confirm-dialog { display: flex; position: relative; z-index: 1; width: min(820px, 100%); max-height: min(92vh, 880px); overflow: hidden; flex-direction: column; border: 3px solid var(--ink); border-radius: 24px; outline: 0; background: #fff; box-shadow: 12px 14px 0 rgba(0, 0, 0, .28); transform: translateY(14px) scale(.985); transition: transform .18s ease; }
.submission-confirm-modal.is-open .submission-confirm-dialog { transform: translateY(0) scale(1); }
.submission-confirm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.3rem .9rem; border-bottom: 1px solid #dbe3ec; background: linear-gradient(135deg, #efffc9, #fff 62%); }
.submission-confirm-kicker { display: block; margin-bottom: .25rem; color: #198754; font-size: .62rem; font-weight: 950; letter-spacing: .1em; }
.submission-confirm-head h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 1.9rem); font-weight: 950; letter-spacing: -.035em; }
.submission-confirm-close { display: grid; flex: 0 0 auto; width: 2.2rem; height: 2.2rem; padding: 0; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; font-size: 1.5rem; line-height: 1; }
.submission-confirm-close:hover { background: #ffe4e6; color: #be123c; }
.submission-confirm-progress { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: .55rem; padding: .75rem 1.3rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.submission-confirm-progress > i { height: 2px; background: #cbd5e1; }
.submission-confirm-progress > span { display: flex; align-items: center; gap: .4rem; color: #94a3b8; }
.submission-confirm-progress b { display: grid; width: 1.65rem; height: 1.65rem; place-items: center; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff; font-size: .7rem; }
.submission-confirm-progress small { font-size: .68rem; font-weight: 850; }
.submission-confirm-progress > span.is-active { color: var(--ink); }
.submission-confirm-progress > span.is-active b { border-color: var(--ink); background: var(--lime); color: var(--ink); }
.submission-confirm-progress > span.is-done { color: #198754; }
.submission-confirm-progress > span.is-done b { border-color: #198754; background: #198754; color: #fff; }
.submission-confirm-body { min-height: 330px; overflow-y: auto; padding: 1.1rem 1.3rem 1.25rem; }
.submission-confirm-step { display: grid; gap: 1rem; }
.submission-confirm-intro { display: flex; align-items: flex-start; gap: .8rem; padding: .8rem .9rem; border: 1px solid #dbe3ec; border-radius: 14px; background: #f8fafc; }
.submission-confirm-intro > span { display: grid; flex: 0 0 2.5rem; width: 2.5rem; height: 2.5rem; place-items: center; border-radius: 12px; background: #fff; font-size: 1.25rem; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.submission-confirm-intro strong { display: block; color: #172033; font-size: .9rem; }
.submission-confirm-intro p { margin: .25rem 0 0; color: #64748b; font-size: .75rem; line-height: 1.45; }
.submission-confirm-files { display: grid; gap: .55rem; }
.submission-confirm-file { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto auto; align-items: center; gap: .65rem; padding: .68rem .75rem; border: 1px solid #b7d8c2; border-radius: 13px; background: #f7fff9; }
.submission-confirm-file-type { display: grid; width: 46px; height: 42px; place-items: center; padding: .2rem; border-radius: 9px; background: #eaf2ff; color: #1769aa; font-size: .62rem; font-weight: 950; }
.submission-confirm-file-info { min-width: 0; }
.submission-confirm-file-info strong, .submission-confirm-file-info small { display: block; }
.submission-confirm-file-info strong { overflow: hidden; color: #172033; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.submission-confirm-file-info small { margin-top: .12rem; color: #17824b; font-size: .66rem; }
.submission-confirm-file .btn { white-space: nowrap; }
.submission-confirm-file-delete { padding: .35rem .55rem; border: 1px solid #f09a9a; border-radius: 8px; background: #fff7f7; color: #b42318; cursor: pointer; font-size: .68rem; font-weight: 850; }
.submission-confirm-file-delete:hover { background: #ffe4e6; }
.submission-confirm-file-delete:disabled { cursor: wait; opacity: .65; }
.submission-confirm-files-empty { display: grid; justify-items: center; gap: .2rem; padding: 1.25rem; border: 2px dashed #cbd5e1; border-radius: 14px; color: #64748b; text-align: center; }
.submission-confirm-files-empty > span { font-size: 1.8rem; }
.submission-confirm-files-empty strong { color: #334155; font-size: .85rem; }
.submission-confirm-files-empty small { font-size: .7rem; }
.submission-confirm-file-warning { padding: .65rem .75rem; border: 1px solid #f0ad4e; border-radius: 10px; background: #fff8e1; color: #856404; font-size: .72rem; font-weight: 750; }
.submission-confirm-file-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.submission-confirm-field { display: grid; gap: .35rem; }
.submission-confirm-field > span { color: #334155; font-size: .76rem; font-weight: 900; }
.submission-confirm-field > small { color: #64748b; font-size: .68rem; }
.submission-confirm-field .form-select, .submission-confirm-field .form-control { border: 2px solid #94a3b8; border-radius: 12px; }
.submission-confirm-field .form-select:focus, .submission-confirm-field .form-control:focus { border-color: #198754; box-shadow: 0 0 0 4px rgba(25, 135, 84, .12); }
.submission-confirm-summary { display: grid; grid-template-columns: .55fr 1.45fr; gap: .65rem; }
.submission-confirm-summary > div { padding: .7rem .8rem; border: 1px solid #cbd5e1; border-radius: 12px; background: #f8fafc; }
.submission-confirm-summary span, .submission-confirm-summary strong { display: block; }
.submission-confirm-summary span { color: #64748b; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.submission-confirm-summary strong { overflow: hidden; margin-top: .15rem; color: #172033; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.submission-confirm-error { padding: .7rem .8rem; border: 1px solid #dc3545; border-radius: 10px; background: #fff1f2; color: #b42318; font-size: .72rem; font-weight: 800; }
.submission-confirm-footer { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.3rem 1rem; border-top: 1px solid #dbe3ec; background: #fff; }
.submission-confirm-footer-note { min-width: 0; flex: 1; color: #64748b; font-size: .66rem; line-height: 1.35; }
.submission-confirm-footer .btn { flex: 0 0 auto; min-height: 42px; font-size: .76rem; font-weight: 900; }
.teacher-admin-card.is-disabled { opacity: .72; background: #f3f4f6; }
.teacher-admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding-top: .8rem; border-top: 1px dashed #cbd5e1; }
.teacher-transfer-form { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.teacher-transfer-form .form-select { min-width: 220px; }
.teacher-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.teacher-group-choice { display: flex; position: relative; align-items: center; gap: .75rem; min-height: 78px; padding: .9rem 1rem; border: 2px solid #cbd5e1; border-radius: 16px; background: #fff; cursor: pointer; transition: .15s ease; }
.teacher-group-choice:hover { border-color: #78a50b; transform: translateY(-1px); }
.teacher-group-choice input { position: absolute; opacity: 0; pointer-events: none; }
.teacher-group-choice span { min-width: 0; flex: 1; }
.teacher-group-choice strong, .teacher-group-choice small { display: block; }
.teacher-group-choice strong { color: #172033; font-size: .9rem; }
.teacher-group-choice small { margin-top: .15rem; color: #64748b; font-size: .7rem; }
.teacher-group-choice b { display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border: 2px solid #cbd5e1; border-radius: 50%; color: transparent; }
.teacher-group-choice:has(input:checked) { border-color: #198754; background: #f0fff5; box-shadow: 0 4px 0 rgba(25,135,84,.12); }
.teacher-group-choice:has(input:checked) b { border-color: #198754; background: #198754; color: #fff; }
@keyframes submission-drop-bounce { to { transform: translateY(-5px); } }
@keyframes submission-file-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
    .submission-meta-grid { grid-template-columns: 1fr; gap: .6rem; }
    .submission-actions { align-items: stretch; flex-direction: column; gap: .65rem; }
    .submission-action-buttons { justify-content: stretch; }
    .submission-action-buttons .btn { flex: 1 1 180px; }
    .submission-dropzone { min-height: 145px; padding: .75rem; }
    .submission-file-preview-item { grid-template-columns: 40px minmax(0, 1fr) auto; gap: .5rem; }
    .submission-file-thumb, .submission-file-type { width: 40px; height: 38px; }
    .submission-file-open { grid-column: 2; }
    .submission-file-remove { grid-column: 3; grid-row: 1 / span 2; }
    .submission-confirm-modal { padding: .45rem; }
    .submission-confirm-dialog { max-height: 96vh; border-radius: 18px; box-shadow: 5px 6px 0 rgba(0, 0, 0, .24); }
    .submission-confirm-head { padding: .9rem .9rem .7rem; }
    .submission-confirm-progress { gap: .3rem; padding: .65rem .9rem; }
    .submission-confirm-progress small { display: none; }
    .submission-confirm-body { min-height: 310px; padding: .85rem .9rem 1rem; }
    .submission-confirm-file { grid-template-columns: 40px minmax(0, 1fr) auto; gap: .5rem; }
    .submission-confirm-file-type { width: 40px; height: 38px; }
    .submission-confirm-file .btn { grid-column: 2; justify-self: start; }
    .submission-confirm-file-delete { grid-column: 3; grid-row: 1 / span 2; }
    .submission-confirm-footer { flex-wrap: wrap; padding: .75rem .9rem .85rem; }
    .submission-confirm-footer-note { width: 100%; order: -1; flex-basis: 100%; }
    .submission-confirm-footer .btn { flex: 1 1 130px; }
}
.lesson-submission-requirement {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 2px solid rgba(34, 197, 94, .38);
    border-radius: 14px;
    background: rgba(240, 253, 244, .78);
}
.lesson-submission-requirement .form-check-input { flex: 0 0 auto; margin-top: .24rem; }
.lesson-submission-requirement strong,
.lesson-submission-requirement small { display: block; }
.lesson-submission-requirement small { margin-top: .15rem; color: #64748b; }
.student-submission-complete { padding: .8rem .95rem; border: 1px solid #198754; border-radius: 12px; background: #f0fdf4; color: #146c43; font-size: .78rem; font-weight: 800; }
.student-submission-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .85rem; border: 1px solid #198754; border-bottom: 0; border-radius: 14px 14px 0 0; background: #f0fdf4; }
.student-submission-heading strong, .student-submission-heading small { display: block; }
.student-submission-heading strong { font-size: .84rem; }
.student-submission-heading small { margin-top: .12rem; color: #64748b; font-size: .7rem; }
.student-submission-heading > span { font-size: 1.2rem; }
.student-submission-heading + .submission-form { border-top-left-radius: 0; border-top-right-radius: 0; }
.submission-status { padding: .65rem .85rem; border: 2px solid #198754; border-radius: 12px; background: #d1e7dd; color: #146c43; font-weight: 800; }
.submission-status-draft { border-color: #856404; background: #fff3cd; color: #856404; }
.submission-card { border: 2px solid var(--ink); border-radius: 16px; background: #fff; }
.journal-table-wrap { border: 2px solid var(--ink); border-radius: 16px; background: #fff; }
.journal-table { min-width: 760px; }
.journal-table th { white-space: nowrap; background: var(--lime); }
.journal-table td, .journal-table th { border-color: rgba(23, 23, 23, .16); }
.journal-student-sort-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; margin-bottom: .8rem; border: 1px solid #cbd5e1; border-radius: 14px; background: #f8fafc; }
.journal-student-sort-bar strong, .journal-student-sort-bar small { display: block; }
.journal-student-sort-bar strong { font-size: .82rem; }
.journal-student-sort-bar small { max-width: 44rem; margin-top: .18rem; color: #64748b; font-size: .7rem; line-height: 1.35; }
.journal-student-sort-bar label { display: flex; flex: 0 0 auto; align-items: center; gap: .45rem; color: #64748b; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.journal-student-sort-bar .form-select { width: auto; min-width: 10.5rem; border-color: #94a3b8; font-size: .75rem; }
.journal-student-block[data-sort-group="1"] > tr:first-child td:first-child { border-left: 3px solid #198754; }
.journal-student-block[data-sort-group="2"] > tr:first-child td:first-child { border-left: 3px solid #8b5cf6; }
.journal-student-block[data-sort-group="3"] > tr:first-child td:first-child { border-left: 3px solid #f0ad4e; }
.journal-student-block[data-sort-group="4"] > tr:first-child td:first-child { border-left: 3px solid #dc3545; }
.grade-select { min-width: 5rem; }
.journal-live-check { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.journal-live-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.journal-live-check-mark { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 2px solid #94a3b8; border-radius: 50%; background: #fff; color: #64748b; font-size: 1.15rem; font-weight: 950; line-height: 1; transition: transform .12s ease, border-color .12s ease, background .12s ease, color .12s ease; }
.journal-live-check:hover .journal-live-check-mark { border-color: #198754; transform: translateY(-1px); }
.journal-live-check input:checked + .journal-live-check-mark { border-color: #198754; background: #198754; color: #fff; box-shadow: 2px 2px 0 rgba(25, 135, 84, .22); }
.journal-live-check input:focus-visible + .journal-live-check-mark { outline: 3px solid rgba(139, 92, 246, .35); outline-offset: 2px; }
.journal-live-check-copy { max-width: 5rem; color: #64748b; font-size: .62rem; font-weight: 800; line-height: 1.15; }
.journal-student-block.journal-partner-block > tr > td:first-child { border-left: 4px solid #7c3aed; }
.journal-partner-block > tr > td:last-child { border-right: 4px solid #7c3aed; }
.journal-partner-block > tr:last-child > td { border-bottom: 4px solid #7c3aed; }
.journal-partner-head-row td { padding: .75rem 1rem; border-top: 4px solid #7c3aed; background: #ede9fe; }
.journal-partner-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.journal-partner-head > div:first-child { min-width: 0; }
.journal-partner-kicker { display: block; margin-bottom: .22rem; color: #6d28d9; font-size: .62rem; font-weight: 950; letter-spacing: .08em; }
.journal-partner-head strong { display: block; color: #24123d; font-size: .88rem; }
.journal-partner-head strong i { margin: 0 .28rem; color: #7c3aed; font-style: normal; }
.journal-partner-head small { display: block; margin-top: .18rem; color: #6b5b7d; font-size: .68rem; }
.journal-partner-tools { display: flex; flex: 0 0 auto; align-items: center; gap: .45rem; }
.journal-partner-tools .form-select { width: 7.8rem; border-color: #7c3aed; background-color: #fff; font-weight: 800; }
.journal-partner-student-row td { background: #faf8ff; }
.journal-partner-student-row + .journal-partner-student-row td { border-top-style: dashed; }
.journal-pair-member-label { display: block; margin-top: .12rem; color: #7c3aed; font-size: .58rem; font-weight: 850; text-transform: uppercase; }
.journal-partner-work-row td { background: #f5f3ff; }
.journal-shared-work-box { border-color: #a78bfa; background: #fff; }
.journal-submission-entry + .journal-submission-entry { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed #c4b5fd; }
.journal-submission-owner { display: block; margin-bottom: .4rem; color: #6d28d9; font-size: .72rem; }
.journal-partner-block.is-pair-applied > tr > td { animation: journal-pair-applied .9s ease; }
@keyframes journal-pair-applied { 0%, 100% { box-shadow: none; } 35% { box-shadow: inset 0 0 0 999px rgba(214, 255, 69, .24); } }

.auth-card.journal-grid-card { max-width: 1400px; }
.journal-grid-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; margin-bottom: 1rem; border: 2px solid #cbd5e1; border-radius: 16px; background: #f8fafc; }
.journal-grid-toolbar > div:first-child strong, .journal-grid-toolbar > div:first-child small { display: block; }
.journal-grid-toolbar > div:first-child strong { font-size: 1rem; }
.journal-grid-toolbar > div:first-child small { margin-top: .18rem; color: #64748b; font-size: .72rem; }
.journal-grid-toolbar-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.journal-grid-toolbar-stats span { padding: .42rem .62rem; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #64748b; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.journal-grid-toolbar-stats strong { color: var(--ink); font-size: .9rem; }
.journal-grid-edit-hint { display: flex; align-items: flex-start; gap: .65rem; padding: .7rem .85rem; margin-bottom: .8rem; border: 1px solid #c4b5fd; border-radius: 12px; background: #faf5ff; color: #5b21b6; }
.journal-grid-edit-hint > span:last-child { display: block; }
.journal-grid-edit-hint strong, .journal-grid-edit-hint small { display: block; }
.journal-grid-edit-hint strong { font-size: .76rem; }
.journal-grid-edit-hint small { margin-top: .12rem; color: #6d28d9; font-size: .67rem; line-height: 1.35; }
.journal-grid-edit-icon { display: grid; flex: 0 0 auto; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 8px; background: #8b5cf6; color: #fff; font-size: 1rem; }
.journal-grid-editable-table .journal-grid-cell { height: 5.8rem; min-height: 5.8rem; }
.journal-grid-editor { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: .35rem; min-height: 5.8rem; padding: .35rem; }
.journal-grid-editor-top, .journal-grid-editor-bottom { display: flex; align-items: center; justify-content: center; gap: .3rem; }
.journal-grid-editor-top { min-height: 1.55rem; }
.journal-grid-status, .journal-grid-grade { width: 100%; min-width: 0; padding: .24rem .25rem; border: 1px solid #94a3b8; border-radius: 6px; background: #fff; color: var(--ink); font-size: .66rem; font-weight: 850; line-height: 1.1; }
.journal-grid-status:focus, .journal-grid-grade:focus { border-color: #198754; box-shadow: 0 0 0 2px rgba(25, 135, 84, .15); outline: 0; }
.journal-grid-grade { width: 2.55rem; font-size: .9rem; font-weight: 950; text-align: center; }
.journal-grid-live-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; cursor: pointer; }
.journal-grid-live-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.journal-grid-live-toggle span { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 2px solid #c4b5fd; border-radius: 50%; background: #fff; color: #7c3aed; font-size: 1.1rem; font-weight: 950; line-height: 1; transition: transform .12s ease, border-color .12s ease, background .12s ease, color .12s ease; }
.journal-grid-live-toggle:hover span { transform: translateY(-1px); border-color: #8b5cf6; }
.journal-grid-live-toggle input:checked + span { border-color: #8b5cf6; background: #8b5cf6; color: #fff; box-shadow: 2px 2px 0 rgba(139, 92, 246, .2); }
.journal-grid-live-toggle input:focus-visible + span { outline: 3px solid rgba(139, 92, 246, .25); outline-offset: 2px; }
.journal-grid-submission-indicator { display: grid; flex: 0 0 auto; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #198754; color: #fff; font-size: .72rem; font-weight: 950; }
.journal-grid-savebar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; margin-top: 1rem; border: 2px solid var(--ink); border-radius: 14px; background: linear-gradient(135deg, #efffc9 0%, #fff 70%); }
.journal-grid-savebar strong, .journal-grid-savebar small { display: block; }
.journal-grid-savebar strong { font-size: .82rem; }
.journal-grid-savebar small { margin-top: .15rem; color: #64748b; font-size: .68rem; }
.journal-grid-autosave-status { display: inline-flex; align-items: center; width: max-content; padding: .25rem .48rem; margin-top: .45rem; border-radius: 999px; background: #d1e7dd; color: #146c43; font-size: .64rem; font-weight: 900; }
.journal-grid-autosave-status[data-state="saving"] { background: #fff3cd; color: #856404; }
.journal-grid-autosave-status[data-state="error"] { background: #f8d7da; color: #b02a37; }
.journal-grid-scroll { max-height: min(72vh, 780px); overflow: auto; max-width: 100%; overscroll-behavior: contain; border: 2px solid var(--ink); border-radius: 16px; background: #fff; }
.journal-grid-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
.journal-grid-table th, .journal-grid-table td { border-right: 1px solid #cbd5e1; border-bottom: 1px solid #cbd5e1; }
.journal-grid-table thead th { position: sticky; top: 0; z-index: 4; padding: 0; background: var(--lime); box-shadow: 0 2px 0 rgba(23, 23, 23, .18); }
.journal-grid-table thead .journal-grid-sticky { z-index: 7; }
.journal-grid-table tbody .journal-grid-sticky { z-index: 3; background: #fff; }
.journal-grid-table tbody tr:nth-child(even) > th,
.journal-grid-table tbody tr:nth-child(even) > td { background: #BFBFBF !important; background-image: none !important; }
.journal-grid-table tbody tr:nth-child(even):hover .journal-grid-sticky { background: #BFBFBF !important; }
.journal-grid-table tbody tr:hover .journal-grid-sticky { background: #f8fafc; }
.journal-grid-table tr > :last-child { border-right: 0; }
.journal-grid-table tbody tr:last-child > * { border-bottom: 0; }
.journal-grid-sticky { position: sticky; }
.journal-grid-number-col { left: 0; width: 3.25rem; min-width: 3.25rem; max-width: 3.25rem; text-align: center; }
.journal-grid-name-col { left: 3.25rem; width: 18rem; min-width: 18rem; max-width: 18rem; }
.journal-grid-table thead .journal-grid-number-col, .journal-grid-table thead .journal-grid-name-col { padding: .8rem .7rem; vertical-align: middle; }
.journal-grid-lesson-head { width: 10.5rem; min-width: 10.5rem; max-width: 10.5rem; vertical-align: top; }
.journal-grid-lesson-head.is-archived { background: #e2e8f0; }
.journal-grid-lesson-link { display: flex; flex-direction: column; min-height: 7rem; padding: .65rem .7rem .7rem; color: var(--ink); text-align: left; text-decoration: none; }
.journal-grid-lesson-link:hover { color: var(--ink); background: rgba(255, 255, 255, .55); }
.journal-grid-lesson-meta { display: flex; align-items: center; justify-content: space-between; gap: .35rem; color: #475569; font-size: .66rem; line-height: 1.2; }
.journal-grid-lesson-meta b { color: var(--ink); }
.journal-grid-lesson-link > strong { display: -webkit-box; overflow: hidden; margin-top: .55rem; font-size: .78rem; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.journal-grid-lesson-link > small { display: -webkit-box; overflow: hidden; margin-top: .25rem; color: #475569; font-size: .65rem; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.journal-grid-lesson-link > em { overflow: hidden; margin-top: auto; color: #146c43; font-size: .6rem; font-style: normal; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.journal-grid-archived-label { width: max-content; padding: .15rem .3rem; margin-top: .3rem; border-radius: 999px; background: #94a3b8; color: #fff; font-size: .56rem; font-weight: 900; text-transform: uppercase; }
.journal-grid-student-number { padding: .7rem .4rem; color: #64748b; font-size: .76rem; font-weight: 800; vertical-align: middle; }
.journal-grid-student-name { padding: .65rem .8rem; text-align: left; vertical-align: middle; }
.journal-grid-student-name strong, .journal-grid-student-name small { display: block; overflow-wrap: anywhere; }
.journal-grid-student-name strong { font-size: .78rem; line-height: 1.25; }
.journal-grid-student-name small { margin-top: .2rem; color: #64748b; font-size: .63rem; font-weight: 800; }
.journal-grid-cell { position: relative; width: 5rem; min-width: 5rem; height: 4.2rem; padding: 0; text-align: center; vertical-align: middle; background: #fff; }
.journal-grid-cell-link { display: grid; position: relative; place-items: center; width: 100%; height: 100%; min-height: 4.2rem; color: var(--ink); text-decoration: none; }
.journal-grid-cell-link:hover { color: var(--ink); background: #f8fafc; box-shadow: inset 0 0 0 2px var(--ink); }
.journal-grid-cell.has-grade.grade-5 { background: #efffc9; }
.journal-grid-cell.has-grade.grade-4 { background: #e0f2fe; }
.journal-grid-cell.has-grade.grade-3 { background: #fff7cc; }
.journal-grid-cell.has-grade.grade-2 { background: #ffe4e6; }
.journal-grade-number { font-size: 1.55rem; line-height: 1; }
.journal-submission-dot { position: absolute; top: .3rem; right: .35rem; display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #198754; color: #fff; font-size: .65rem; font-weight: 950; }
.journal-live-dot { position: absolute; top: .3rem; left: .35rem; display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: #8b5cf6; color: #fff; font-size: .75rem; font-weight: 950; }
.journal-grid-cell.has-live { background-image: linear-gradient(135deg, rgba(139, 92, 246, .08), transparent 42%); }
.journal-attendance-mark { color: #b02a37; font-size: .85rem; line-height: 1; }
.journal-grid-cell.is-late { background: #fff7ed; }
.journal-grid-cell.is-late .journal-attendance-mark { color: #c2410c; }
.journal-grid-cell.is-excused { background: #f5f3ff; }
.journal-grid-cell.is-excused .journal-attendance-mark { color: #6d28d9; }
.journal-grid-cell.has-submission { background: #f0fdf4; }
.journal-submission-mark { color: #198754; font-size: 1.35rem; }
.journal-cell-empty { color: #cbd5e1; font-size: 1.1rem; }
.journal-grid-cell.is-not-target { background: #f1f5f9; }
.journal-cell-not-target { color: #94a3b8; font-size: 1rem; }
.journal-grid-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; padding: .85rem .2rem 0; }
.journal-grid-legend { display: flex; flex-wrap: wrap; gap: .4rem .75rem; color: #64748b; font-size: .67rem; font-weight: 800; }
.journal-grid-legend span { display: inline-flex; align-items: center; gap: .28rem; }
.journal-grid-legend b { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding-inline: .15rem; border-radius: 5px; font-size: .7rem; }
.legend-grade { background: var(--lime); color: var(--ink); }
.legend-attendance { background: #f8d7da; color: #b02a37; }
.legend-submission { background: #d1e7dd; color: #146c43; }
.legend-live { background: #eadcff; color: #6d28d9; }
.legend-absence { background: #f8d7da; color: #b02a37; }
.legend-empty { background: #f1f5f9; color: #94a3b8; }
.legend-not-target { background: #e2e8f0; color: #64748b; }
.journal-group-switcher { padding: .9rem 1rem 1rem; margin-top: 1.25rem; border: 2px solid var(--ink); border-radius: 16px; background: linear-gradient(135deg, #efffc9 0%, #fff 68%); }
.journal-group-switcher-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .65rem; }
.journal-group-switcher-heading strong { font-size: .82rem; }
.journal-group-switcher-heading small { color: #64748b; font-size: .65rem; }
.journal-group-pills { display: flex; gap: .5rem; max-width: 100%; padding-bottom: .15rem; overflow-x: auto; }
.journal-group-pill { display: flex; flex: 0 0 auto; align-items: center; gap: .45rem; padding: .5rem .7rem; border: 2px solid #94a3b8; border-radius: 11px; background: #fff; color: var(--ink); text-decoration: none; transition: transform .12s ease, background .12s ease, border-color .12s ease; }
.journal-group-pill:hover { color: var(--ink); background: #fff; border-color: var(--ink); transform: translateY(-1px); }
.journal-group-pill.is-selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.journal-group-pill.is-selected:hover { color: #fff; background: #27272a; }
.journal-group-pill strong { font-size: .75rem; white-space: nowrap; }
.journal-group-pill small { color: #64748b; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.journal-group-pill.is-selected small { color: #d1d5db; }

.subject-manage-card {
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: #fff;
}

.subject-archived {
    border-color: #94a3b8;
    background: #f8fafc;
    opacity: .9;
}

.structure-list {
    display: grid;
    gap: .6rem;
}

.structure-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem .85rem;
    border: 2px solid rgba(23, 23, 23, .18);
    border-radius: 12px;
    background: #fff;
}

.structure-list-item strong,
.structure-list-item small {
    display: block;
}

.structure-list-item small {
    margin-top: .15rem;
    color: #64748b;
}

.structure-empty {
    padding: .75rem .85rem;
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    color: #64748b;
}

.status-archived { background: #e2e8f0; color: #475569; }

.quiz-admin-card,
.quiz-question-admin-card,
.quiz-answer-report,
.student-quiz-card {
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: #fff;
}

.quiz-question-editor,
.quiz-text-answer {
    border: 2px dashed #94a3b8;
    border-radius: 14px;
    background: #f8fafc;
}

.status-draft { background: #e2e8f0; color: #475569; }
.status-neutral { background: #f1f5f9; color: #475569; }
.status-warning { background: #fff3cd; color: #856404; }
.quiz-danger-zone { border-color: #f1aeb5; background: #fff8f8; }
.quiz-event-filters { padding: .9rem; border: 2px solid #cbd5e1; border-radius: 14px; background: #f8fafc; }
.quiz-event-filters .form-label { margin-bottom: .35rem; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }

.quiz-option {
    display: block;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .12s ease, background .12s ease, transform .12s ease;
}

.quiz-option:hover { border-color: var(--ink); background: #fffde8; transform: translateX(2px); }
.quiz-question-card:not(.is-active) { display: none; }
.quiz-timer-box { min-width: 7rem; padding: .6rem .9rem; border: 3px solid var(--ink); border-radius: 14px; background: var(--lime); text-align: center; }
.quiz-timer-box small, .quiz-timer-box strong { display: block; }
.quiz-timer-box strong { font-size: 1.55rem; line-height: 1.1; }
.result-score-card { border: 3px solid var(--ink); border-radius: 18px; background: var(--lime); }
.result-score-card small, .result-score-card strong { display: block; }
.result-score-card strong { font-size: clamp(2rem, 7vw, 3.6rem); line-height: 1.1; }
.quiz-results-table { min-width: 980px; }
.quiz-question-card h2 { white-space: pre-line; }

/* Конструктор тестов: рабочее место преподавателя */
.quiz-builder-page { max-width: 1700px; }
.quiz-builder-head { padding: 1.35rem 1.5rem; border: 2px solid var(--ink); border-radius: 22px; background: #fff; box-shadow: 7px 7px 0 var(--ink); }
.quiz-builder-breadcrumbs { display: flex; align-items: center; gap: .55rem; margin-bottom: .9rem; color: #64748b; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.quiz-builder-breadcrumbs a { color: var(--ink); text-decoration: none; }
.quiz-builder-breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.quiz-builder-title { max-width: 760px; font-size: clamp(1.6rem, 2.2vw, 2.35rem); font-weight: 950; letter-spacing: -.03em; overflow-wrap: anywhere; }
.quiz-builder-save-state { display: inline-flex; align-items: center; gap: .42rem; margin-top: .65rem; color: #64748b; font-size: .7rem; font-weight: 750; }
.quiz-builder-save-dot { width: .48rem; height: .48rem; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 3px #e2e8f0; }
.quiz-builder-save-state[data-state="local"] { color: #7c5b05; }
.quiz-builder-save-state[data-state="local"] .quiz-builder-save-dot { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.quiz-builder-save-state[data-state="dirty"] { color: #b02a37; }
.quiz-builder-save-state[data-state="dirty"] .quiz-builder-save-dot { background: #dc3545; box-shadow: 0 0 0 3px #f8d7da; }
.quiz-builder-save-state[data-state="server"] { color: #146c43; }
.quiz-builder-save-state[data-state="server"] .quiz-builder-save-dot { background: #198754; box-shadow: 0 0 0 3px #d1e7dd; }
.quiz-builder-layout { display: grid; grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); align-items: start; gap: 1.1rem; }
.quiz-builder-sidebar { position: sticky; top: 1rem; display: grid; gap: 1rem; min-width: 0; }
.quiz-builder-sidebar-card, .quiz-builder-panel, .quiz-builder-danger-row { border: 2px solid var(--ink); border-radius: 18px; background: #fff; }
.quiz-builder-sidebar-card { padding: 1rem; }
.quiz-builder-sidebar-title { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.quiz-builder-sidebar-title h2 { margin: .18rem 0 0; font-size: 1.18rem; font-weight: 950; }
.quiz-builder-eyebrow { display: block; color: #64748b; font-size: .63rem; font-weight: 950; letter-spacing: .09em; line-height: 1.25; }
.quiz-builder-count { display: grid; place-items: center; min-width: 2rem; height: 2rem; padding: .2rem .45rem; border: 2px solid var(--ink); border-radius: 9px; background: var(--lime); font-size: .9rem; font-weight: 950; }
.quiz-builder-sidebar-note { margin: .55rem 0 .8rem; color: #64748b; font-size: .75rem; line-height: 1.4; }
.quiz-builder-question-nav { display: grid; gap: .45rem; max-height: min(56vh, 570px); overflow: auto; padding-right: .15rem; }
.quiz-builder-question-link { display: flex; align-items: center; gap: .55rem; width: 100%; min-width: 0; padding: .56rem .55rem; border: 1px solid #cbd5e1; border-radius: 12px; background: #f8fafc; color: var(--ink); text-align: left; transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease; }
.quiz-builder-question-link:hover { border-color: var(--ink); background: #fff; transform: translateX(2px); }
.quiz-builder-question-link.is-active { border: 2px solid var(--ink); background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
.quiz-builder-question-number { display: grid; flex: 0 0 2.15rem; place-items: center; width: 2.15rem; height: 2.15rem; border: 2px solid var(--ink); border-radius: 9px; background: #fff; font-size: .86rem; font-weight: 950; line-height: 1; }
.quiz-builder-question-number-new { background: #eadcff; }
.quiz-builder-question-label { min-width: 0; flex: 1; }
.quiz-builder-question-label strong, .quiz-builder-question-label small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-builder-question-label strong { font-size: .76rem; font-weight: 900; }
.quiz-builder-question-label small { margin-top: .16rem; color: #64748b; font-size: .64rem; }
.quiz-builder-question-arrow { flex: 0 0 auto; color: #64748b; font-size: .9rem; font-weight: 950; }
.quiz-builder-question-link.is-active .quiz-builder-question-arrow { color: var(--ink); }
.quiz-builder-add-question { margin-top: .85rem; min-height: 2.8rem; font-weight: 900; }
.quiz-builder-empty-nav { padding: 1rem .6rem; border: 1px dashed #94a3b8; border-radius: 12px; color: #64748b; text-align: center; }
.quiz-builder-empty-nav span { display: block; margin-bottom: .35rem; font-size: 1.5rem; }
.quiz-builder-empty-nav p { margin: 0; color: var(--ink); font-size: .78rem; font-weight: 900; }
.quiz-builder-empty-nav small { font-size: .68rem; }
.quiz-builder-summary-card { display: grid; gap: .6rem; }
.quiz-builder-summary-row { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding-bottom: .5rem; border-bottom: 1px solid #e2e8f0; color: #64748b; font-size: .76rem; }
.quiz-builder-summary-row strong { color: var(--ink); font-size: .78rem; }
.quiz-builder-tip { margin-top: .2rem; padding: .7rem .75rem; border-radius: 11px; background: #fffde8; color: #59480a; font-size: .7rem; line-height: 1.4; }
.quiz-builder-workspace { display: grid; gap: 1rem; min-width: 0; }
.quiz-builder-panel { overflow: hidden; }
.quiz-builder-panel-summary { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.15rem; cursor: pointer; list-style: none; }
.quiz-builder-panel-summary::-webkit-details-marker { display: none; }
.quiz-builder-panel-summary > span:nth-child(2) { display: grid; gap: .15rem; min-width: 0; flex: 1; }
.quiz-builder-panel-summary strong { font-size: .96rem; font-weight: 950; }
.quiz-builder-panel-summary small { color: #64748b; font-size: .7rem; }
.quiz-builder-panel-icon { display: grid; flex: 0 0 2.1rem; place-items: center; width: 2.1rem; height: 2.1rem; border: 2px solid var(--ink); border-radius: 9px; background: #eadcff; font-size: 1rem; }
.quiz-builder-summary-chevron { color: #64748b; font-size: 1.2rem; font-weight: 950; transition: transform .15s ease; }
.quiz-builder-panel[open] .quiz-builder-summary-chevron { transform: rotate(180deg); }
.quiz-builder-panel-body { padding: 0 1.15rem 1.15rem; border-top: 1px solid #e2e8f0; }
.quiz-settings-subtitle { padding-top: .2rem; color: var(--ink); font-size: .78rem; font-weight: 950; text-transform: uppercase; letter-spacing: .04em; }
.quiz-builder-publish-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; border: 1px solid #cbd5e1; border-radius: 13px; background: #f8fafc; }
.quiz-builder-publish-row > div:first-child { display: grid; gap: .15rem; }
.quiz-builder-publish-row strong { font-size: .83rem; font-weight: 950; }
.quiz-builder-publish-row small { color: #64748b; font-size: .7rem; }
.quiz-builder-question-workspace { padding: 1.15rem; }
.quiz-builder-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.quiz-builder-panel-heading h2 { margin: .15rem 0 .25rem; font-size: 1.35rem; font-weight: 950; }
.quiz-builder-panel-heading p { margin: 0; color: #64748b; font-size: .76rem; }
.quiz-builder-question-total { flex: 0 0 auto; padding: .38rem .65rem; border: 1px solid #94a3b8; border-radius: 999px; color: #475569; font-size: .7rem; font-weight: 900; white-space: nowrap; }
.quiz-existing-question-list { display: grid; gap: 1rem; }
.quiz-editor-card { padding: 1rem; border: 1px solid #cbd5e1; border-radius: 16px; background: #f8fafc; }
.quiz-editor-card.is-active { border: 2px solid var(--ink); background: #fff; box-shadow: 4px 4px 0 rgba(23, 23, 23, .08); }
.quiz-editor-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.quiz-editor-card-head > div:first-child { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.quiz-editor-card-head h3 { margin: 0; font-size: .98rem; font-weight: 950; }
.quiz-editor-card-head p { margin: .16rem 0 0; color: #64748b; font-size: .7rem; }
.quiz-editor-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.quiz-editor-actions form { display: inline-flex; margin: 0; }
.quiz-editor-actions .status-pill { margin-right: .15rem; }
.quiz-question-editor { padding: .9rem; border: 1px solid #cbd5e1; border-radius: 13px; background: #fff; }
.quiz-question-text-input { min-height: 6rem; font-size: .95rem; }
.quiz-question-subheading { margin-bottom: .35rem; color: var(--ink); font-size: .76rem; font-weight: 950; }
.quiz-question-type-hint { margin-top: .35rem; color: #64748b; font-size: .7rem; line-height: 1.35; }
.quiz-quick-presets { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.quiz-quick-presets span { color: #64748b; font-size: .68rem; font-weight: 800; }
.quiz-editor-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .75rem; border-top: 1px dashed #cbd5e1; }
.quiz-editor-form-footer small { max-width: 620px; color: #64748b; font-size: .68rem; line-height: 1.4; }
.quiz-new-question-card { border: 2px solid var(--ink); background: #fffde8; }
.quiz-new-question-card[hidden] { display: none; }
.quiz-builder-empty-state { padding: 2.5rem 1rem; border: 2px dashed #94a3b8; border-radius: 16px; background: #f8fafc; text-align: center; }
.quiz-builder-empty-icon { margin-bottom: .5rem; font-size: 2.2rem; }
.quiz-builder-empty-state h3 { margin: 0 0 .35rem; font-size: 1.1rem; font-weight: 950; }
.quiz-builder-empty-state p { margin: 0 auto 1rem; color: #64748b; font-size: .78rem; }
.quiz-builder-danger-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border-color: #f1aeb5; background: #fff8f8; }
.quiz-builder-danger-row > div { display: grid; gap: .18rem; }
.quiz-builder-danger-row strong { color: #b02a37; font-size: .8rem; font-weight: 950; }
.quiz-builder-danger-row small, .quiz-builder-danger-row span { color: #64748b; font-size: .68rem; }
.quiz-preview-dialog { width: min(680px, calc(100vw - 2rem)); padding: 0; border: 2px solid var(--ink); border-radius: 20px; background: #fff; box-shadow: 10px 10px 0 var(--ink); }
.quiz-preview-dialog::backdrop { background: rgba(23, 23, 23, .45); }
.quiz-preview-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.15rem; border-bottom: 1px solid #e2e8f0; }
.quiz-preview-dialog-head h2 { margin: .16rem 0 0; font-size: 1.2rem; font-weight: 950; }
.quiz-preview-dialog-body { padding: 1.2rem; }
.quiz-preview-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; color: #64748b; font-size: .72rem; font-weight: 900; }
.quiz-preview-meta span { color: var(--ink); }
.quiz-preview-dialog-body h3 { margin-bottom: 1.2rem; font-size: 1.18rem; font-weight: 950; white-space: pre-line; }
.quiz-preview-dots { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.25rem 0 1.15rem; }
.quiz-preview-dot { display: grid; place-items: center; min-width: 1.8rem; height: 1.8rem; padding: .1rem .35rem; border: 1px solid #94a3b8; border-radius: 8px; background: #f8fafc; color: #475569; font-size: .7rem; font-weight: 900; cursor: pointer; }
.quiz-preview-dot:hover { border-color: var(--ink); background: #fff; color: var(--ink); }
.quiz-preview-dot.is-active { border: 2px solid var(--ink); background: var(--lime); color: var(--ink); }
.quiz-preview-options { display: grid; gap: .55rem; }
.quiz-preview-option { display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; border: 1px solid #94a3b8; border-radius: 12px; background: #f8fafc; font-size: .82rem; }
.quiz-preview-muted { padding: .8rem; border-radius: 12px; background: #f1f5f9; color: #64748b; font-size: .75rem; }
.quiz-preview-empty { padding: 2.2rem 1rem 1.5rem; text-align: center; }
.quiz-preview-empty h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.quiz-preview-empty p { margin: 0; color: #64748b; font-size: .78rem; }
.quiz-preview-actions { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.3rem; padding-top: 1rem; border-top: 1px dashed #cbd5e1; }

/* Библиотека тестов и шаг создания */
.quiz-library-page { max-width: 1700px; }
.quiz-library-head { padding: 1.35rem 1.5rem; border: 2px solid var(--ink); border-radius: 22px; background: #fff; box-shadow: 7px 7px 0 var(--ink); }
.quiz-library-title { font-size: clamp(1.8rem, 2.5vw, 2.65rem); font-weight: 950; letter-spacing: -.04em; }
.quiz-library-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: start; gap: 1rem; }
.quiz-create-card, .quiz-library-summary, .quiz-library-list { border: 2px solid var(--ink); border-radius: 18px; background: #fff; }
.quiz-create-card { overflow: hidden; }
.quiz-create-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.2rem; border-bottom: 1px solid #e2e8f0; background: #fffde8; }
.quiz-create-card-head h2 { margin: .16rem 0 .25rem; font-size: 1.3rem; font-weight: 950; }
.quiz-create-card-head p { max-width: 680px; margin: 0; color: #64748b; font-size: .76rem; }
.quiz-create-card-icon { display: grid; flex: 0 0 2.4rem; place-items: center; width: 2.4rem; height: 2.4rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--lime); font-size: 1.4rem; font-weight: 950; }
.quiz-create-form { padding: 1.1rem 1.2rem; }
.quiz-create-form-section { padding: .85rem 0 1.1rem; border-bottom: 1px dashed #cbd5e1; }
.quiz-create-form-section + .quiz-create-form-section { padding-top: 1.05rem; }
.quiz-form-section-title { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .8rem; }
.quiz-form-section-title span { display: grid; flex: 0 0 1.55rem; place-items: center; width: 1.55rem; height: 1.55rem; border: 2px solid var(--ink); border-radius: 50%; background: #eadcff; font-size: .7rem; font-weight: 950; }
.quiz-form-section-title strong { font-size: .84rem; font-weight: 950; }
.quiz-form-section-title small { color: #64748b; font-size: .68rem; }
.quiz-create-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; }
.quiz-create-form-footer small { color: #64748b; font-size: .7rem; }
.quiz-library-summary { display: grid; gap: .75rem; padding: 1rem; }
.quiz-library-stat { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding-bottom: .55rem; border-bottom: 1px solid #e2e8f0; }
.quiz-library-stat strong { font-size: 1.65rem; font-weight: 950; line-height: 1; }
.quiz-library-stat span { color: #64748b; font-size: .68rem; font-weight: 800; text-align: right; }
.quiz-library-empty-inline { margin: 1.1rem 1.2rem; padding: 1rem; border: 1px dashed #94a3b8; border-radius: 13px; background: #f8fafc; color: #64748b; font-size: .8rem; }
.quiz-library-list { padding: 1.1rem 1.2rem; }
.quiz-library-list-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.quiz-library-list-head h2 { margin: .18rem 0 0; font-size: 1.3rem; font-weight: 950; }
.quiz-library-list-head h2 span { display: inline-grid; place-items: center; min-width: 1.7rem; min-height: 1.7rem; margin-left: .2rem; padding: .15rem .4rem; border-radius: 8px; background: var(--lime); font-size: .78rem; vertical-align: middle; }
.quiz-library-filters { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.quiz-library-filters input { width: 210px; }
.quiz-library-filters select { width: auto; min-width: 150px; }
.quiz-library-cards { display: grid; gap: .75rem; }
.quiz-library-card { display: flex; align-items: flex-start; gap: .85rem; padding: .95rem; border: 1px solid #cbd5e1; border-radius: 15px; background: #f8fafc; transition: border-color .12s ease, background .12s ease, transform .12s ease, box-shadow .12s ease; }
.quiz-library-card:hover { border-color: var(--ink); background: #fff; transform: translateY(-1px); box-shadow: 3px 3px 0 rgba(23, 23, 23, .12); }
.quiz-library-card[hidden] { display: none; }
.quiz-library-card-mark { display: grid; flex: 0 0 2.35rem; place-items: center; width: 2.35rem; height: 2.35rem; border: 2px solid var(--ink); border-radius: 10px; background: #e2e8f0; color: #64748b; font-size: 1.2rem; font-weight: 950; }
.quiz-library-card-mark.is-published { background: var(--lime); color: #146c43; }
.quiz-library-card-main { min-width: 0; flex: 1; }
.quiz-library-card-date { color: #94a3b8; font-size: .64rem; }
.quiz-library-card-main h3 { margin: .45rem 0 .18rem; font-size: 1.02rem; font-weight: 950; overflow-wrap: anywhere; }
.quiz-library-card-context { display: flex; flex-wrap: wrap; gap: .35rem; color: #64748b; font-size: .76rem; }
.quiz-library-card-context strong { color: var(--ink); }
.quiz-library-card-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.quiz-library-card-actions form { display: inline-flex; margin: 0; }
.quiz-library-card-actions .btn { white-space: nowrap; }
.quiz-library-empty { padding: 2.8rem 1rem; border: 2px dashed #94a3b8; border-radius: 15px; background: #f8fafc; text-align: center; }
.quiz-library-empty h3 { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 950; }
.quiz-library-empty p { margin: 0; color: #64748b; font-size: .78rem; }
.quiz-library-no-results { padding: 1.5rem; border: 1px dashed #94a3b8; border-radius: 13px; color: #64748b; font-size: .8rem; text-align: center; }

@media (max-width: 1050px) {
    .quiz-library-layout { grid-template-columns: 1fr; }
    .quiz-library-summary { grid-template-columns: repeat(3, 1fr); align-items: center; }
    .quiz-library-summary .quiz-builder-eyebrow, .quiz-library-summary .quiz-builder-tip { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .quiz-library-head { padding: 1rem; box-shadow: 4px 4px 0 var(--ink); }
    .quiz-create-form, .quiz-library-list { padding: .85rem; }
    .quiz-create-card-head { padding: .9rem; }
    .quiz-library-summary { grid-template-columns: 1fr; }
    .quiz-library-list-head, .quiz-create-form-footer { align-items: stretch; flex-direction: column; }
    .quiz-library-filters { width: 100%; justify-content: stretch; }
    .quiz-library-filters input, .quiz-library-filters select { width: 100%; min-width: 0; }
    .quiz-library-card { flex-direction: column; }
    .quiz-library-card-actions { width: 100%; justify-content: flex-start; }
    .quiz-library-card-actions .btn, .quiz-library-card-actions form { flex: 1 1 auto; }
    .quiz-library-card-actions form .btn { width: 100%; }
}

@media (max-width: 1080px) {
    .quiz-builder-layout { grid-template-columns: 1fr; }
    .quiz-builder-sidebar { position: static; grid-template-columns: minmax(0, 1fr) minmax(220px, .45fr); align-items: start; }
    .quiz-builder-question-nav { max-height: 300px; }
}

@media (max-width: 720px) {
    .quiz-builder-head { padding: 1rem; box-shadow: 4px 4px 0 var(--ink); }
    .quiz-builder-sidebar { grid-template-columns: 1fr; }
    .quiz-builder-sidebar-card, .quiz-builder-question-workspace { padding: .85rem; }
    .quiz-builder-publish-row, .quiz-builder-danger-row, .quiz-editor-form-footer { align-items: stretch; flex-direction: column; }
    .quiz-builder-publish-row .d-flex { justify-content: space-between; }
    .quiz-builder-danger-row form, .quiz-builder-danger-row .btn { width: 100%; }
    .quiz-builder-panel-heading { flex-direction: column; }
}

details > summary { cursor: pointer; list-style-position: inside; }

@media (max-width: 767px) {
    .student-debt-warning { padding: .85rem; }
    .student-debt-card { padding: .85rem; }
    .student-debt-pair { flex-basis: 3.25rem; min-height: 3.25rem; border-radius: 10px; }
    .student-debt-pair strong { font-size: 1.4rem; }
    .debt-admin-card { align-items: stretch; flex-direction: column; }
    .debt-admin-card-actions { justify-content: flex-start; }
    .debt-filter-bar label, .debt-filter-bar .form-select { width: 100%; min-width: 0; }
    .debt-grade-form { width: 100%; }
    .debt-grade-form .form-select { flex: 1 1 7rem; }
    .debt-student-card { align-items: stretch; flex-wrap: wrap; }
    .debt-student-avatar { align-self: flex-start; }
    .debt-student-main { flex-basis: calc(100% - 3.55rem); }
    .debt-student-meta { flex-basis: 100%; justify-content: flex-start; }
    .debt-student-open { width: 100%; }

    .admin-collapsible > summary.admin-section-summary {
        padding: .9rem 1rem;
        font-size: 1rem;
    }

    .admin-collapsible > .admin-section-body {
        padding: 0 1rem 1rem;
    }

    .lesson-activity-log-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .lesson-activity-log-item .btn,
    .lesson-activity-log-item > .status-pill {
        margin-left: 1.45rem;
    }

    .hero-card { box-shadow: 7px 7px 0 var(--ink); }
    .site-nav { box-shadow: 3px 3px 0 rgba(23, 23, 23, .16); }
    .site-nav { align-items: center; flex-direction: row; gap: .4rem; padding: .45rem .5rem; }
    .brand-mark { width: 2rem; height: 2rem; font-size: 1rem; }
    .brand-copy strong { font-size: .74rem; }
    .brand-copy small { display: none; }
    .nav-actions { width: auto; min-width: 0; flex: 1 1 auto; justify-content: flex-end; flex-wrap: nowrap; gap: .12rem; overflow-x: auto; }
    .nav-context { display: inline-flex; padding: .25rem .4rem; font-size: .58rem; }
    .nav-links { flex: 0 0 auto; padding: 0; border: 0; background: transparent; }
    .nav-item-link, .nav-logout { min-height: 2rem; padding: .3rem .36rem; font-size: .62rem; }
    .nav-icon { display: none; }
    .profile-avatar { width: 4rem; height: 4rem; }
    .profile-detail-row { align-items: flex-start; flex-direction: column; gap: .15rem; }
    .profile-detail-row strong { text-align: left; }
    .student-lesson-summary { align-items: flex-start; padding: .85rem .9rem; }
    .student-lesson-summary { gap: .45rem; }
    .student-lesson-pair-number { flex-basis: 2.85rem; min-height: 3.1rem; border-radius: 10px; }
    .student-lesson-pair-number strong { font-size: 1.4rem; }
    .student-lesson-pair-number small { margin-top: .16rem; font-size: .5rem; }
    .student-lesson-summary::after { min-width: 4.5rem; height: 1.85rem; padding-inline: .35rem; font-size: .61rem; }
    .student-lesson-summary-side { min-width: auto; }
    .student-lesson-summary-side small { max-width: 6rem; }
    .student-lesson-details { padding-inline: .9rem; }
}

.student-dashboard-shell { transition: box-shadow .15s ease, border-radius .15s ease; }
.student-dashboard-shell > .admin-section { margin-bottom: 1rem; padding: 0; border: 0; border-radius: 0; background: transparent; }
.student-lessons-heading { padding-bottom: .85rem; border-bottom: 2px solid var(--ink); }
.student-lessons-subtitle { margin-top: .3rem; color: #64748b; font-size: .78rem; }
.student-workflow-note { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .8rem; margin: .85rem 0; border-left: 3px solid #198754; border-radius: 10px; background: #f0fdf4; color: #475569; font-size: .74rem; line-height: 1.45; }
.student-workflow-note strong { color: var(--ink); }
.student-workflow-note-icon { flex: 0 0 auto; font-size: 1rem; line-height: 1.1; }
.student-lesson-list-meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .1rem 0 .7rem; color: #64748b; font-size: .7rem; font-weight: 800; }
.student-lesson-controls { padding: .85rem 0 1rem; border-bottom: 1px solid #cbd5e1; }
.student-lesson-controls-title, .student-lesson-controls-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.student-lesson-controls-title { margin-bottom: .7rem; font-size: .8rem; }
.student-lesson-reset { padding: 0; border: 0; background: transparent; color: #64748b; font-size: .72rem; font-weight: 800; text-decoration: underline; }
.student-lesson-reset:hover { color: var(--ink); }
.student-lesson-controls-grid { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(140px, 1fr)); gap: .7rem; }
.student-lesson-controls .form-label { margin-bottom: .3rem; color: #64748b; font-size: .68rem; font-weight: 800; }
.student-lesson-controls .form-control, .student-lesson-controls .form-select { min-height: 2.5rem; border-width: 1px; border-radius: 10px; font-size: .8rem; }
.student-lesson-controls-footer { margin-top: .75rem; font-size: .72rem; }
.student-lesson-sort-label { display: inline-flex; align-items: center; gap: .45rem; color: #64748b; font-weight: 700; }
.student-lesson-sort-label .form-select { width: auto; min-width: 9.5rem; border-color: #cbd5e1; }
.student-lessons-no-results { padding: 1.2rem; margin-top: 1rem; border: 1px dashed #94a3b8; border-radius: 12px; color: #64748b; text-align: center; font-size: .82rem; }
.student-lesson-pagination { display: flex; justify-content: center; gap: .35rem; margin-top: 1rem; }
.student-lesson-page-button { display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: .2rem .45rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--ink); font-size: .74rem; font-weight: 900; }
.student-lesson-page-button:hover:not(:disabled), .student-lesson-page-button.is-active { border-color: var(--ink); background: var(--lime); }
.student-lesson-page-button:disabled { cursor: not-allowed; opacity: .45; }
.student-name-autocomplete { position: relative; }
.student-name-suggestions { position: absolute; z-index: 30; top: calc(100% + .3rem); right: 0; left: 0; padding: .35rem; border: 2px solid var(--ink); border-radius: 12px; background: #fff; box-shadow: 4px 4px 0 rgba(23, 23, 23, .14); }
.student-name-suggestion { display: block; width: 100%; padding: .55rem .7rem; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; font-size: .85rem; font-weight: 700; }
.student-name-suggestion:hover, .student-name-suggestion:focus { background: var(--lime); outline: none; }
.student-name-hint { margin-top: .3rem; color: #64748b; font-size: .7rem; }
.fast-page-card { max-width: 1080px; }
.fast-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; padding-bottom: 1.25rem; border-bottom: 2px solid var(--ink); }
.fast-page-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.fast-page-links .btn { white-space: nowrap; }
.fast-upload-form { padding: 1rem; border: 2px dashed #94a3b8; border-radius: 16px; background: rgba(248, 250, 252, .72); }
.fast-dropzone { padding: 1.25rem; border: 2px solid var(--ink); border-radius: 14px; background: #fff; text-align: center; }
.fast-dropzone-icon { font-size: 2rem; line-height: 1; }
.fast-dropzone-title { display: block; margin-top: .55rem; font-size: 1rem; font-weight: 900; cursor: pointer; }
.fast-dropzone .form-control { max-width: 680px; margin: .8rem auto 0; }
.fast-page-footnote { margin-top: 1rem; color: #64748b; font-size: .75rem; text-align: center; }
.fast-closed-card { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border: 2px solid #f59e0b; border-radius: 16px; background: #fffbeb; }
.fast-closed-icon { font-size: 1.7rem; }
.fast-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.fast-access-card { padding: 1.15rem; border: 2px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 4px 4px 0 rgba(23, 23, 23, .1); }
.fast-access-card-send { background: #f4ffd2; }
.fast-access-card-open { background: #f0eaff; }
.fast-access-card-top, .fast-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.fast-access-icon { font-size: 1.75rem; line-height: 1; }
.fast-access-card code { padding: .15rem .35rem; border-radius: 5px; background: rgba(255, 255, 255, .75); color: var(--ink); }
.fast-section-kicker { display: block; margin-bottom: .25rem; color: #64748b; font-size: .64rem; font-weight: 900; letter-spacing: .08em; }
.fast-file-list { display: grid; gap: .6rem; }
.fast-file-row { display: flex; align-items: center; gap: .75rem; min-width: 0; padding: .75rem; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
.fast-file-row:hover { border-color: var(--ink); box-shadow: 2px 2px 0 rgba(23, 23, 23, .1); }
.fast-file-row > span:nth-child(2) { min-width: 0; }
.fast-file-row strong, .fast-file-row small { display: block; overflow-wrap: anywhere; }
.fast-file-row small { margin-top: .2rem; color: #64748b; font-size: .7rem; }
.fast-file-icon { display: grid; flex: 0 0 2rem; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: #e2e8f0; }
.fast-file-action { flex: 0 0 auto; font-size: .75rem; font-weight: 900; }
.fast-admin-section { padding: 1.1rem; }
.landing-fast-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 650px; padding: .75rem .85rem; margin-top: 1rem; border: 1px solid rgba(23, 23, 23, .22); border-radius: 14px; background: rgba(255, 255, 255, .68); }
.landing-fast-tools-copy, .landing-fast-tools-links { display: flex; align-items: center; gap: .65rem; }
.landing-fast-tools-copy { min-width: 0; }
.landing-fast-tools-copy strong, .landing-fast-tools-copy small { display: block; }
.landing-fast-tools-copy strong { font-size: .75rem; }
.landing-fast-tools-copy small { margin-top: .12rem; color: #64748b; font-size: .65rem; line-height: 1.25; }
.landing-fast-tools-icon { display: grid; flex: 0 0 2rem; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--lime); font-size: 1rem; }
.landing-fast-tools-links { flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: .3rem .7rem; }
.landing-fast-tools-links a { color: var(--ink); font-size: .7rem; font-weight: 900; text-decoration: none; }
.landing-fast-tools-links a:hover { text-decoration: underline; }
.landing-fast-tools-links span { color: #64748b; }
@media (max-width: 767px) {
    .fast-page-header { flex-direction: column; gap: 1rem; }
    .fast-page-links { justify-content: flex-start; }
    .fast-access-grid { grid-template-columns: 1fr; }
    .fast-file-row { align-items: flex-start; flex-wrap: wrap; }
    .fast-file-action { margin-left: auto; align-self: center; }
    .fast-file-row > span:last-child { margin-left: auto; }
    .landing-fast-tools { align-items: flex-start; flex-direction: column; }
    .landing-fast-tools-links { justify-content: flex-start; padding-left: 2.65rem; }
}
.pdf-viewer-shell { max-width: 1050px; padding: clamp(1rem, 3vw, 1.75rem); border: 3px solid var(--ink); border-radius: 24px; background: rgba(255, 253, 245, .96); box-shadow: 10px 10px 0 var(--ink); }
.pdf-viewer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }.pdf-viewer-header h1 { overflow-wrap: anywhere; }.pdf-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 0; color: #64748b; font-size: .78rem; font-weight: 800; }.pdf-pages { display: grid; gap: 1rem; justify-items: center; padding: 1rem; border-radius: 16px; background: #e2e8f0; }.pdf-page-card { position: relative; max-width: 100%; padding: 1.25rem .6rem .6rem; border: 2px solid #cbd5e1; border-radius: 10px; background: #fff; box-shadow: 0 3px 10px rgba(15, 23, 42, .12); }.pdf-page-card canvas { display: block; max-width: 100%; height: auto !important; }.pdf-page-number { position: absolute; top: .35rem; left: .6rem; color: #64748b; font-size: .62rem; font-weight: 900; text-transform: uppercase; }
@media (max-width: 767px) {
    .student-dashboard-page { padding-inline: .5rem; }
    .student-dashboard-shell { padding: 1rem .7rem !important; border: 3px solid var(--ink); border-radius: 22px; background: rgba(255, 253, 245, .96); box-shadow: 7px 7px 0 var(--ink); }
    .student-dashboard-shell > .admin-section { margin-bottom: 1rem; padding: 0; border: 0; border-radius: 0; background: transparent; }
    .student-dashboard-shell > .row > .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
    .student-dashboard-shell .stat-card { padding: .7rem !important; border-radius: 13px; }
    .student-dashboard-shell .stat-card strong { font-size: 1.45rem; }
    .student-dashboard-shell .stat-card span { font-size: .65rem; }
    .student-dashboard-shell .student-stat-link::after { top: .45rem; right: .48rem; width: 1.35rem; height: 1.35rem; font-size: .68rem; }
    .student-dashboard-shell .admin-section h2 { font-size: 1.1rem; }
    .student-dashboard-overview { grid-template-columns: 1fr; gap: .8rem; padding: .85rem; box-shadow: 4px 4px 0 rgba(23, 23, 23, .14); }
    .student-dashboard-overview h2 { font-size: 1.35rem; }
    .student-dashboard-overview p { font-size: .8rem; }
    .student-dashboard-next { padding: .85rem; }
    .student-dashboard-facts { gap: .6rem; padding-top: .7rem; }
    .student-dashboard-facts div { align-items: flex-start; flex-direction: column; gap: .05rem; }
    .student-dashboard-facts strong { font-size: 1.05rem; }
    .student-dashboard-facts span { font-size: .62rem; line-height: 1.1; }
    .student-lesson-controls-grid { grid-template-columns: 1fr 1fr; }
    .student-lesson-controls-grid > :first-child { grid-column: 1 / -1; }
    .student-lesson-controls-footer { align-items: flex-start; flex-direction: column; }
    .student-lesson-sort-label { width: 100%; justify-content: space-between; }
    .student-lesson-sort-label .form-select { flex: 1; }
    .student-dashboard-shell .student-lesson-card { box-shadow: 0 2px 7px rgba(23, 23, 23, .08); }
    .student-dashboard-shell .lesson-row { align-items: flex-start; padding: .8rem .7rem; }
    .student-dashboard-shell .lesson-row > .fw-black { font-size: .78rem; }
    .student-dashboard-shell .student-lesson-material-row { align-items: flex-start; padding: .65rem .7rem; }
    .student-dashboard-shell .student-lesson-material-open { align-self: center; font-size: .68rem; }
    .student-dashboard-shell .student-lesson-test-row { align-items: flex-start; padding: .65rem .7rem; }
    .student-dashboard-shell .student-lesson-test-row form, .student-dashboard-shell .student-lesson-test-row > a { align-self: center; }
    .student-dashboard-shell .student-lesson-test-row .status-pill { align-self: center; }
    .pdf-viewer-page { padding-inline: .5rem; }
    .pdf-viewer-shell { padding: .85rem; border-width: 2px; border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); }
    .pdf-viewer-header { flex-direction: column; }
    .pdf-viewer-toolbar { align-items: flex-start; flex-direction: column; }
    .pdf-pages { padding: .5rem; }
    .pdf-page-card { padding-inline: .25rem; }
    .pdf-page-number { left: .3rem; }
}

@media (max-width: 520px) {
    .site-nav { flex-wrap: wrap; }
    .nav-menu-toggle { display: grid; }

    .site-nav .nav-actions {
        display: none;
        width: 100%;
        flex: 0 0 100%;
        align-items: stretch;
        justify-content: flex-start;
        flex-direction: column;
        gap: .5rem;
        padding-top: .55rem;
        overflow: visible;
    }

    .site-nav.nav-open .nav-actions { display: flex; }
    .site-nav.nav-open .nav-context { display: inline-flex; width: max-content; }
    .site-nav.nav-open .nav-note { display: inline-flex; }

    .site-nav.nav-open .nav-links {
        display: flex;
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        gap: .15rem;
        padding: .25rem;
        border: 1px solid rgba(23, 23, 23, .14);
        border-radius: 12px;
        background: rgba(248, 250, 252, .72);
    }

    .site-nav.nav-open .nav-item-link {
        justify-content: flex-start;
        width: 100%;
        padding: .55rem .65rem;
    }

    .site-nav.nav-open .nav-register,
    .site-nav.nav-open .nav-logout-form,
    .site-nav.nav-open .nav-logout { width: 100%; }

    .site-nav.nav-open .nav-logout {
        justify-content: space-between;
        padding: .55rem .65rem;
    }
}

/* Public landing page */
.landing-page {
    overflow: hidden;
}

.landing-hero-wrap {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

.landing-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4.75rem);
    border: 3px solid var(--ink);
    border-radius: 32px;
    background:
        radial-gradient(circle at 76% 6%, rgba(200, 255, 69, .8) 0 9%, transparent 24%),
        linear-gradient(130deg, rgba(255, 253, 245, .98) 0%, rgba(255, 248, 220, .96) 58%, rgba(240, 228, 255, .97) 100%);
    box-shadow: 13px 13px 0 var(--ink);
}

.landing-hero::before,
.landing-hero::after {
    position: absolute;
    z-index: 0;
    width: 10rem;
    height: 10rem;
    border: 2px solid rgba(23, 23, 23, .14);
    border-radius: 50%;
    content: "";
}

.landing-hero::before { top: -6rem; left: 46%; }
.landing-hero::after { right: -6rem; bottom: -7rem; }
.landing-hero > .row { position: relative; z-index: 1; }

.landing-kicker,
.landing-overline {
    color: #6d28d9;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.landing-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: 1.25rem;
    padding: .45rem .75rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    color: var(--ink);
    background: var(--lime);
    transform: rotate(-1deg);
}

.landing-kicker span { color: #6d28d9; font-size: 1rem; }

.landing-title {
    max-width: 730px;
    margin-bottom: 1.25rem;
    font-size: clamp(3.2rem, 7vw, 6.5rem);
    font-weight: 950;
    letter-spacing: -.075em;
    line-height: .92;
}

.landing-title span,
.landing-section-heading h2 span,
.landing-flow-section h2 span,
.landing-future-section h2 span { color: #6d28d9; }

.landing-lead {
    max-width: 620px;
    margin-bottom: 1.75rem;
    color: #475569;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.55;
}

.landing-primary-btn,
.landing-secondary-btn { padding: .8rem 1.1rem; }
.landing-primary-btn span,
.landing-cta .btn span { display: inline-block; margin-left: .35rem; transition: transform .15s ease; }
.landing-primary-btn:hover span,
.landing-cta .btn:hover span { transform: translateX(4px); }

.landing-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1rem;
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}

.landing-dashboard {
    position: relative;
    overflow: hidden;
    border: 3px solid var(--ink);
    border-radius: 22px;
    background: #fff;
    box-shadow: 9px 9px 0 rgba(23, 23, 23, .2);
    transform: rotate(2deg);
}

.landing-window-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.5rem;
    padding: .55rem .85rem;
    border-bottom: 2px solid var(--ink);
    background: #171717;
}

.window-dot { width: .62rem; height: .62rem; border-radius: 50%; }
.dot-pink { background: #ff7b9c; }
.dot-yellow { background: #ffd166; }
.dot-green { background: var(--lime); }
.landing-window-label { color: #cbd5e1; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

.landing-dashboard-body { padding: 1.3rem; }
.landing-mini-label,
.landing-next-label { color: #64748b; font-size: .65rem; font-weight: 900; letter-spacing: .08em; }
.landing-mini-label { margin-bottom: .35rem; }
.landing-next-label { margin-bottom: .45rem; }

.landing-avatar {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 2px solid var(--ink);
    border-radius: 12px;
    background: var(--lime);
    font-size: .75rem;
    font-weight: 900;
}

.landing-lesson-preview {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .8rem;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: #f5f0ff;
}

.landing-lesson-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    background: var(--lime);
    font-size: 1.25rem;
}

.landing-arrow { margin-left: auto; font-size: 1.25rem; font-weight: 900; }
.landing-mini-stat { padding: .7rem .8rem; border-radius: 12px; background: var(--lime); }
.landing-mini-stat.purple { background: #eadcff; }
.landing-mini-stat strong { display: block; font-size: 1.5rem; font-weight: 950; line-height: 1; }
.landing-mini-stat span { display: block; margin-top: .25rem; color: #475569; font-size: .68rem; font-weight: 800; }

.landing-progress-note {
    padding-top: .75rem;
    border-top: 1px dashed #cbd5e1;
    color: #475569;
    font-size: .76rem;
    font-weight: 800;
}

.landing-progress-note span { color: #198754; font-size: 1rem; }
.landing-scribble { margin: .9rem 0 0 1rem; color: #6d28d9; font-family: "Comic Sans MS", cursive; font-size: 1rem; font-weight: 700; transform: rotate(-5deg); }
.landing-scribble span { display: inline-block; margin-left: .3rem; font-size: 1.5rem; transform: rotate(-20deg); }

.landing-section { padding-top: 4.5rem; padding-bottom: 1rem; }
.landing-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.6rem; }
.landing-section-heading h2,
.landing-flow-section h2,
.landing-future-section h2,
.landing-cta h2 {
    margin: .45rem 0 0;
    font-size: clamp(2.1rem, 4vw, 3.5rem);
    font-weight: 950;
    letter-spacing: -.065em;
    line-height: .98;
}

.landing-section-heading > p { max-width: 380px; margin-bottom: .15rem; color: #64748b; line-height: 1.55; }

.landing-benefit-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 275px;
    padding: 1.4rem;
    border: 2px solid var(--ink);
    border-radius: 20px;
    box-shadow: 5px 5px 0 rgba(23, 23, 23, .15);
    transition: transform .16s ease, box-shadow .16s ease;
}

.landing-benefit-card:hover { box-shadow: 8px 8px 0 rgba(23, 23, 23, .18); transform: translateY(-4px); }
.benefit-lime { background: var(--lime); }
.benefit-purple { background: #eadcff; }
.benefit-peach { background: #ffd9c7; }
.benefit-blue { background: #d7ecff; }
.benefit-icon { margin-bottom: 1.2rem; font-size: 2.2rem; line-height: 1; }
.landing-benefit-card h3 { margin-bottom: .6rem; font-size: 1.25rem; font-weight: 950; letter-spacing: -.035em; }
.landing-benefit-card p { margin-bottom: 1.5rem; color: #475569; font-size: .92rem; line-height: 1.5; }
.benefit-number { margin-top: auto; color: rgba(23, 23, 23, .42); font-size: .76rem; font-weight: 950; letter-spacing: .1em; }

.landing-flow-section { margin-top: 4.5rem; padding-bottom: 4.5rem; background: rgba(255, 253, 245, .56); }
.landing-section-text { max-width: 440px; margin-top: 1.25rem; color: #64748b; line-height: 1.6; }
.landing-note { max-width: 410px; margin-top: 1.4rem; padding: .85rem 1rem; border: 2px dashed var(--ink); border-radius: 14px; background: var(--lime); font-size: .9rem; font-weight: 800; transform: rotate(-1deg); }
.landing-steps { display: grid; gap: .85rem; }
.landing-step { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem; border: 2px solid var(--ink); border-radius: 17px; background: #fff; box-shadow: 4px 4px 0 rgba(23, 23, 23, .11); }
.landing-step:nth-child(2) { margin-left: 2rem; background: #f5f0ff; }
.landing-step:nth-child(3) { margin-left: 4rem; background: #efffc9; }
.step-number { display: grid; flex: 0 0 auto; place-items: center; width: 2.55rem; height: 2.55rem; border: 2px solid var(--ink); border-radius: 50%; background: var(--lime); font-size: 1.1rem; font-weight: 950; }
.landing-step h3 { margin-bottom: .2rem; font-size: 1.05rem; font-weight: 950; }
.landing-step p { margin: 0; color: #64748b; font-size: .87rem; line-height: 1.45; }

.landing-future-card { padding: clamp(1.5rem, 4vw, 3rem); border: 3px solid var(--ink); border-radius: 24px; background: #171717; color: #fff; box-shadow: 9px 9px 0 #6d28d9; }
.landing-future-card .landing-overline { color: var(--lime); }
.landing-future-card h2 span { color: var(--lime); }
.landing-future-card .landing-section-text { color: #cbd5e1; }
.landing-future-item { display: flex; align-items: center; gap: .75rem; height: 100%; padding: .85rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; background: rgba(255, 255, 255, .08); }
.landing-future-item > span { font-size: 1.6rem; }
.landing-future-item strong,
.landing-future-item small { display: block; }
.landing-future-item strong { font-size: .92rem; }
.landing-future-item small { margin-top: .15rem; color: #cbd5e1; font-size: .72rem; line-height: 1.35; }

.landing-cta-section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.landing-cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(1.5rem, 4vw, 2.8rem); border: 3px solid var(--ink); border-radius: 24px; background: var(--lime); box-shadow: 8px 8px 0 var(--ink); }
.landing-cta .landing-overline { color: #6d28d9; }
.landing-cta h2 { font-size: clamp(2rem, 4vw, 3rem); }

@media (max-width: 767px) {
    .landing-hero-wrap { padding-top: 1rem; padding-bottom: 1rem; }
    .landing-hero { border-radius: 24px; box-shadow: 7px 7px 0 var(--ink); }
    .landing-title { font-size: clamp(3rem, 16vw, 4.7rem); }
    .landing-dashboard { margin: 1rem .45rem 0; transform: rotate(1deg); }
    .landing-scribble { margin-left: .5rem; }
    .landing-section { padding-top: 3.5rem; }
    .landing-section-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .landing-flow-section { margin-top: 3rem; padding-bottom: 3.5rem; }
    .landing-step:nth-child(2), .landing-step:nth-child(3) { margin-left: 0; }
    .landing-cta { align-items: flex-start; flex-direction: column; }
}

/* Fast pages: one strong composition instead of a stack of nested panels. */
.fast-service-shell { overflow: hidden; max-width: 1120px; border: 3px solid var(--ink); border-radius: 30px; background: rgba(255, 253, 245, .97); box-shadow: 10px 10px 0 var(--ink); }
.fast-service-shell-upload .fast-service-hero { background: linear-gradient(120deg, #efffc9 0%, #fffdf5 57%, #eadcff 100%); }
.fast-service-shell-open .fast-service-hero { background: linear-gradient(120deg, #eadcff 0%, #fffdf5 57%, #d7ecff 100%); }
.fast-service-hero { display: grid; grid-template-columns: minmax(0, 1fr) 245px; align-items: center; gap: 2rem; padding: clamp(1.5rem, 4vw, 3.2rem); border-bottom: 2px solid var(--ink); }
.fast-service-brandline { display: flex; align-items: center; gap: .55rem; margin-bottom: 1.7rem; color: #475569; font-size: .73rem; font-weight: 900; letter-spacing: .02em; }
.fast-service-brandline i { color: #94a3b8; font-style: normal; font-weight: 700; }
.fast-service-brandmark { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 2px solid var(--ink); border-radius: 8px; background: var(--lime); color: var(--ink); font-size: .9rem; }
.fast-service-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .55rem; border-radius: 6px; background: var(--ink); color: var(--lime); font-size: .63rem; font-weight: 900; letter-spacing: .06em; }
.fast-service-badge-open { color: #eadcff; }
.fast-service-hero h1 { max-width: 760px; margin: .85rem 0 1rem; font-size: clamp(2.65rem, 6vw, 5.2rem); font-weight: 950; letter-spacing: -.075em; line-height: .93; }
.fast-service-hero h1 span { color: #6d28d9; }
.fast-service-shell-upload .fast-service-hero h1 span { color: #198754; }
.fast-service-hero-copy > p { max-width: 650px; margin-bottom: 1.2rem; color: #475569; font-size: .98rem; line-height: 1.55; }
.fast-service-facts { display: flex; flex-wrap: wrap; gap: .35rem .8rem; color: #475569; font-size: .7rem; font-weight: 900; }
.fast-service-hero-side { display: flex; flex-direction: column; align-items: center; padding: 1.3rem; border: 2px solid var(--ink); border-radius: 22px; background: rgba(255, 255, 255, .72); text-align: center; transform: rotate(2deg); }
.fast-service-hero-side-open { transform: rotate(-2deg); }
.fast-service-hero-symbol { display: grid; place-items: center; width: 4.6rem; height: 4.6rem; margin-bottom: 1rem; border: 2px solid var(--ink); border-radius: 18px; background: var(--lime); font-size: 2.35rem; box-shadow: 4px 4px 0 var(--ink); }
.fast-service-hero-side strong { font-size: 1rem; font-weight: 950; }
.fast-service-hero-side small { max-width: 150px; margin-top: .3rem; color: #64748b; font-size: .7rem; line-height: 1.35; }
.fast-service-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, .75fr); gap: 1.1rem; padding: 0 1.5rem; }
.fast-service-form { padding: 1.2rem; border: 2px solid var(--ink); border-radius: 18px; background: #fff; }
.fast-service-form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.fast-service-eyebrow { display: block; margin-bottom: .35rem; color: #64748b; font-size: .64rem; font-weight: 900; letter-spacing: .1em; }
.fast-service-form-heading h2, .fast-service-aside h2, .fast-empty-state h2, .fast-public-heading h2 { margin: 0; font-size: 1.35rem; font-weight: 950; letter-spacing: -.04em; }
.fast-service-form-mark { color: #cbd5e1; font-size: 2rem; font-weight: 950; line-height: .8; }
.fast-dropzone { position: relative; display: flex; align-items: center; flex-direction: column; padding: 2rem 1rem; border: 2px dashed #94a3b8; border-radius: 14px; background: #f8fafc; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.fast-dropzone:hover, .fast-dropzone:focus-within { border-color: var(--ink); background: #f3ffcf; transform: translateY(-2px); }
.fast-dropzone-icon { margin-bottom: .7rem; font-size: 2.1rem; line-height: 1; }
.fast-dropzone-title { font-size: 1rem; font-weight: 950; }
.fast-dropzone-subtitle { margin-top: .25rem; color: #64748b; font-size: .75rem; }
.fast-file-input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.fast-selected-hint { margin-top: .55rem; color: #64748b; font-size: .68rem; text-align: center; }
.fast-selected-files { padding: .7rem; margin-top: .7rem; border: 1px solid #cbd5e1; border-radius: 11px; background: #f8fafc; }
.fast-selected-files-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; color: #198754; font-size: .72rem; }
.fast-selected-files-clear { padding: 0; border: 0; background: transparent; color: #64748b; font-size: .68rem; font-weight: 800; text-decoration: underline; }
.fast-selected-files-clear:hover { color: var(--ink); }
.fast-selected-files-list { display: grid; gap: .3rem; margin-top: .45rem; }
.fast-selected-file-row { display: flex; align-items: center; gap: .45rem; min-width: 0; padding: .35rem .45rem; border-radius: 7px; background: #fff; font-size: .72rem; }
.fast-selected-file-icon { display: grid; flex: 0 0 1.2rem; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #d1fae5; color: #198754; font-size: .68rem; font-weight: 900; }
.fast-selected-file-name { min-width: 0; overflow: hidden; flex: 1; color: var(--ink); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.fast-selected-file-size { flex: 0 0 auto; color: #64748b; font-size: .66rem; }
.fast-service-form .form-control { border-color: #cbd5e1; border-radius: 10px; }
.fast-service-form .form-label { margin-bottom: .3rem; font-size: .7rem; font-weight: 800; }
.fast-service-form .btn span { margin-left: .3rem; }
.fast-service-aside { align-self: stretch; padding: 1.25rem .5rem 1.25rem 1rem; border-left: 1px dashed #cbd5e1; }
.fast-service-aside-number { display: block; margin-bottom: 1.4rem; color: #cbd5e1; font-size: 2rem; font-weight: 950; line-height: .8; }
.fast-service-aside p { max-width: 260px; margin: .7rem 0 1rem; color: #64748b; font-size: .82rem; line-height: 1.5; }
.fast-aside-note { padding: .7rem; border-radius: 10px; background: #fff4e9; color: #475569; font-size: .7rem; line-height: 1.45; }
.fast-service-switch { display: block; margin-top: 1.4rem; color: var(--ink); font-size: .72rem; line-height: 1.45; text-decoration: none; }
.fast-service-switch strong { display: block; margin-top: .2rem; text-decoration: underline; }
.fast-service-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem 1.3rem; margin-top: 1.4rem; color: #94a3b8; font-size: .68rem; }
.fast-service-footer a { color: #475569; font-weight: 900; text-decoration: none; }
.fast-service-footer a:hover { text-decoration: underline; }
.fast-empty-state { display: flex; align-items: center; gap: 1rem; padding: 1.4rem; border-top: 1px solid #cbd5e1; border-bottom: 1px solid #cbd5e1; background: rgba(248, 250, 252, .64); }
.fast-empty-state-icon { display: grid; flex: 0 0 3.5rem; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 16px; background: #eadcff; font-size: 1.7rem; }
.fast-empty-state p { margin: .45rem 0 0; color: #64748b; font-size: .8rem; }
.fast-public-files { padding: 0 1.5rem; }
.fast-public-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: .9rem; border-bottom: 2px solid var(--ink); }
.fast-file-count { padding: .35rem .55rem; border-radius: 8px; background: var(--lime); color: var(--ink); font-size: .7rem; font-weight: 900; }
.fast-public-files .fast-file-list { gap: .45rem; }
.fast-public-files .fast-file-row { border: 0; border-bottom: 1px solid #e2e8f0; border-radius: 0; padding: .85rem .2rem; background: transparent; box-shadow: none; }
.fast-public-files .fast-file-row:hover { padding-inline: .55rem; border-color: var(--ink); background: #f3ffcf; box-shadow: none; }
.fast-file-index { flex: 0 0 1.65rem; color: #94a3b8; font-size: .7rem; font-weight: 900; }
.fast-public-files .fast-file-icon { background: #eadcff; }
.fast-public-files .fast-file-action { padding: .42rem .6rem; border: 1px solid var(--ink); border-radius: 8px; background: #fff; }
.fast-public-files .fast-file-row:hover .fast-file-action { background: var(--lime); }
.fast-file-action b { margin-left: .18rem; font-size: 1rem; }
.fast-open-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.5rem; margin-top: 1.1rem; border-top: 1px dashed #cbd5e1; color: #64748b; font-size: .72rem; }
.fast-open-bottom a { color: var(--ink); font-weight: 900; text-decoration: none; }
.fast-open-bottom a:hover { text-decoration: underline; }
.fast-file-main { display: flex; align-items: center; gap: .75rem; min-width: 0; flex: 1; color: var(--ink); text-decoration: none; }
.fast-file-main:hover { color: var(--ink); }
.fast-file-delete { display: grid; flex: 0 0 2rem; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 1px solid #fecaca; border-radius: 8px; background: #fff1f2; color: #be123c; font-size: 1.2rem; line-height: 1; }
.fast-file-delete:hover { border-color: #be123c; background: #ffe4e6; }
.landing-fast-tools { border-width: 2px; box-shadow: 3px 3px 0 rgba(23, 23, 23, .12); }
.landing-fast-tools-links a { padding: .35rem .55rem; border-radius: 7px; background: #fff; }
.landing-fast-tools-links a:hover { background: var(--lime); text-decoration: none; }

@media (max-width: 767px) {
    .fast-service-shell { border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
    .fast-service-hero { grid-template-columns: 1fr; gap: 1.3rem; padding: 1.25rem; }
    .fast-service-brandline { margin-bottom: 1.2rem; }
    .fast-service-hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); }
    .fast-service-hero-copy > p { font-size: .86rem; }
    .fast-service-hero-side { justify-self: start; width: min(100%, 230px); }
    .fast-service-workspace { grid-template-columns: 1fr; padding: 0 1rem; }
    .fast-service-aside { padding: .25rem 0 0; border-top: 1px dashed #cbd5e1; border-left: 0; }
    .fast-service-aside-number { margin-top: 1.1rem; margin-bottom: .8rem; }
    .fast-service-footer, .fast-open-bottom { align-items: flex-start; flex-direction: column; padding-inline: 1rem; }
    .fast-public-files { padding-inline: 1rem; }
    .fast-public-files .fast-file-row { align-items: flex-start; flex-wrap: wrap; }
    .fast-public-files .fast-file-action { margin-left: auto; }
    .fast-empty-state { margin-inline: 1rem; }
}

.individual-access-box { overflow: hidden; padding: 0; }
.individual-access-box > summary { padding: .65rem .8rem; margin: 0; cursor: pointer; list-style: none; }
.individual-access-box > summary::-webkit-details-marker { display: none; }
.individual-access-box > summary::after { float: right; content: '+'; color: #6d28d9; font-size: 1.1rem; line-height: 1; }
.individual-access-box[open] > summary::after { content: '−'; }
.individual-access-box .student-work-title { margin-bottom: 0; }
.individual-access-content { padding: .8rem; border-top: 1px solid rgba(139, 92, 246, .35); }
.document-viewer-shell { max-width: 980px; padding: clamp(1rem, 3vw, 1.75rem); border: 3px solid var(--ink); border-radius: 24px; background: rgba(255, 253, 245, .97); box-shadow: 10px 10px 0 var(--ink); }
.document-viewer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.document-viewer-header h1 { overflow-wrap: anywhere; }
.document-viewer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 0; color: #64748b; font-size: .75rem; font-weight: 800; }
.document-viewer-status { display: flex; align-items: center; min-height: 3rem; padding: .75rem .9rem; margin: .15rem 0 .75rem; border: 1px solid #cbd5e1; border-radius: 12px; background: #f8fafc; color: #475569; font-size: .78rem; font-weight: 800; }
.document-viewer-render-error { margin: .75rem 0; font-size: .82rem; }
.word-preview-styles { display: none; }
.word-preview-render { overflow: auto; max-width: 100%; padding: .75rem; border: 1px solid #cbd5e1; border-radius: 14px; background: #e2e8f0; }
.word-preview-render .docx-wrapper { padding: 1rem; background: #e2e8f0; }
.word-preview-render .docx-wrapper > section.docx { margin: 0 auto 1rem; box-shadow: 0 5px 18px rgba(15, 23, 42, .15); }
.word-preview-render .docx { color: #1e293b; }
.word-document-preview { max-width: 800px; min-height: 520px; padding: clamp(1.25rem, 4vw, 3rem); margin: 0 auto; border: 1px solid #cbd5e1; background: #fff; box-shadow: 0 5px 18px rgba(15, 23, 42, .12); }
.word-document-label { padding-bottom: .8rem; margin-bottom: 1.25rem; border-bottom: 1px solid #e2e8f0; color: #64748b; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.word-document-preview p { margin: 0 0 .85rem; color: #1e293b; font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.65; white-space: normal; }
.document-viewer-note { max-width: 800px; margin: .85rem auto 0; color: #64748b; font-size: .7rem; line-height: 1.45; }
.document-viewer-unavailable { display: flex; align-items: flex-start; gap: 1rem; max-width: 760px; padding: 1.25rem; margin: 1.1rem auto 0; border: 2px dashed #94a3b8; border-radius: 16px; background: #f8fafc; }
.document-viewer-unavailable-icon { display: grid; flex: 0 0 3rem; place-items: center; width: 3rem; height: 3rem; border-radius: 12px; background: #eadcff; font-size: 1.5rem; }
@media (max-width: 767px) {
    .student-schedule-section { padding: .75rem; border-width: 1px; border-radius: 16px; box-shadow: 3px 3px 0 rgba(23, 23, 23, .08); }
    .student-mini-calendar { padding: .45rem; margin-bottom: .8rem; }
    .student-mini-calendar-grid { gap: .16rem; }
    .student-mini-calendar-day, .student-mini-calendar-empty { min-height: 2.35rem; }
    .student-mini-calendar-day { padding: .25rem .08rem; font-size: .66rem; }
    .student-mini-calendar-day small { min-width: .9rem; padding: .06rem .14rem; font-size: .45rem; }
    .student-mini-calendar-weekdays { font-size: .5rem; }
    .student-mini-calendar-legend { gap: .25rem .55rem; padding-top: .4rem; font-size: .54rem; }
    .student-selected-day-heading { align-items: flex-start; padding: .7rem 0; }
    .lesson-calendar-shell { padding: .65rem; }
    .lesson-calendar-grid { gap: .2rem; }
    .lesson-calendar-day, .lesson-calendar-empty { min-height: 3.25rem; }
    .lesson-calendar-day { padding: .4rem .1rem; font-size: .78rem; }
    .lesson-calendar-day small { max-width: 100%; overflow: hidden; padding-inline: .2rem; font-size: .49rem; text-overflow: ellipsis; }
    .lesson-calendar-card { flex-wrap: wrap; }
    .lesson-calendar-card-main { min-width: calc(100% - 5.1rem); }
    .lesson-calendar-open { width: calc(100% - 5rem); max-width: calc(100% - 5rem); margin-left: 5rem; box-sizing: border-box; }
    .student-lesson-material-actions { width: 100%; margin-left: 2.1rem; justify-content: flex-start; }
    .student-submission-heading { align-items: flex-start; }
    .journal-student-sort-bar { align-items: stretch; flex-direction: column; gap: .65rem; padding: .75rem; }
    .journal-student-sort-bar small { max-width: none; }
    .journal-student-sort-bar label { justify-content: space-between; }
    .journal-student-sort-bar .form-select { flex: 1; min-width: 0; }
}

@media (max-width: 767px) {
    .group-directory-card { align-items: flex-start; flex-direction: column; }
    .group-directory-actions { width: 100%; justify-content: flex-start; }
    .group-directory-actions .btn-dark { flex: 1; }
    .group-bulk-row { align-items: stretch; flex-direction: column; }
    .group-bulk-select { max-width: none; }
    .student-directory-summary { align-items: flex-start; flex-wrap: wrap; }
    .student-directory-person { min-width: calc(100% - 3.5rem); }
    .student-directory-metrics { width: 100%; justify-content: flex-start; margin-left: 2.2rem; }
    .student-directory-summary > .status-pill { margin-left: 2.2rem; }
    .student-edit-details { width: 100%; margin-left: 2.2rem; }
    .student-edit-form { min-width: 0; }
    .login-block-card { align-items: flex-start; flex-wrap: wrap; }
    .login-block-action { width: 100%; margin-left: 3.45rem; }
}
@media (max-width: 767px) {
    .document-viewer-shell { padding: .85rem; border-width: 2px; border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); }
    .document-viewer-header { flex-direction: column; }
    .document-viewer-toolbar { align-items: flex-start; flex-direction: column; }
    .word-preview-render { padding: .35rem; }
    .word-preview-render .docx-wrapper { padding: .35rem; }
    .word-document-preview { min-height: 420px; padding: 1.1rem; }
    .word-document-preview p { font-size: .9rem; }
    .document-viewer-unavailable { flex-direction: column; }
}

@media (max-width: 767px) {
    .journal-grid-toolbar { align-items: stretch; flex-direction: column; gap: .7rem; padding: .75rem; }
    .journal-grid-toolbar-stats { justify-content: flex-start; }
    .journal-grid-edit-hint { padding: .65rem .7rem; }
    .journal-grid-edit-hint small { font-size: .64rem; }
    .journal-grid-scroll { border-radius: 12px; }
    .journal-grid-name-col { width: 13rem; min-width: 13rem; max-width: 13rem; }
    .journal-grid-lesson-head { width: 8.8rem; min-width: 8.8rem; max-width: 8.8rem; }
    .journal-grid-lesson-link { min-height: 6.7rem; padding: .55rem; }
    .journal-grid-lesson-link > strong { font-size: .7rem; }
    .journal-grid-cell { width: 4.35rem; min-width: 4.35rem; }
    .journal-grid-editable-table .journal-grid-cell { height: 5.65rem; min-height: 5.65rem; }
    .journal-grid-editor { min-height: 5.65rem; padding: .3rem; }
    .journal-grid-status { font-size: .61rem; }
    .journal-grid-grade { width: 2.35rem; }
    .journal-grid-savebar { align-items: stretch; flex-direction: column; padding: .8rem; }
    .journal-grid-savebar .btn { width: 100%; }
    .journal-grid-footer { align-items: flex-start; flex-direction: column; padding-top: .7rem; }
    .journal-grid-legend { gap: .35rem .55rem; }
    .journal-group-switcher { padding: .75rem; }
    .journal-group-switcher-heading { align-items: flex-start; flex-direction: column; gap: .15rem; }
}

body.admin-mode #lesson-create,
body.admin-mode #lesson-calendar {
    scroll-margin-top: 6rem;
}

.admin-overview-date {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: .35rem .7rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #64748b;
    background: #fff;
    font-size: .72rem;
    font-weight: 850;
}

.overview-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 2px solid var(--ink);
    border-radius: 18px;
    background: linear-gradient(135deg, #efffc9, #fff);
}

.overview-welcome-icon {
    display: grid;
    flex: 0 0 3.4rem;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: var(--lime);
    font-size: 1.8rem;
}

.admin-overview-actions {
    display: grid;
    gap: .65rem;
}

.admin-overview-action {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    color: var(--ink);
    background: #fff;
    text-decoration: none;
    transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.admin-overview-action:hover {
    color: var(--ink);
    border-color: var(--ink);
    box-shadow: 3px 3px 0 rgba(23, 23, 23, .08);
    transform: translateX(3px);
}

.admin-overview-action-icon {
    display: grid;
    flex: 0 0 2.3rem;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 10px;
    background: #eadcff;
    font-size: 1.15rem;
    font-weight: 950;
}

.admin-overview-action span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.admin-overview-action strong,
.admin-overview-action small {
    display: block;
}

.admin-overview-action small {
    margin-top: .15rem;
    color: #64748b;
    font-size: .72rem;
}

.admin-overview-action b {
    font-size: 1.15rem;
}

.admin-collapsible-body {
    padding: 1.25rem;
}

@media (max-width: 767px) {
    body.admin-mode .admin-topbar { min-width: 0; }
    body.admin-mode .admin-shell-content > .container { padding-right: .75rem !important; padding-left: .75rem !important; }
    body.admin-mode .debt-admin-card { align-items: center; flex-direction: row; }
    body.admin-mode .debt-admin-card-actions { justify-content: flex-end; }
    body.admin-mode .debt-student-card { align-items: center; flex-wrap: nowrap; }
    body.admin-mode .debt-student-main { flex-basis: auto; }
    body.admin-mode .debt-student-meta { flex-basis: auto; justify-content: flex-end; }
    body.admin-mode .debt-student-open { width: auto; }
}

@media (max-width: 900px) {
    body.admin-mode { min-width: 0; overflow-x: hidden; }
    .admin-shell { min-width: 0; }
    .admin-sidebar { position: fixed; left: 0; transform: translateX(-110%); width: min(82vw, 300px); transition: transform .2s ease; box-shadow: 10px 0 30px rgba(15, 23, 42, .35); }
    .admin-shell.admin-menu-open .admin-sidebar { transform: translateX(0); }
    .admin-main-area { width: 100%; }
    .admin-topbar { gap: .7rem; min-height: 4rem; padding: .65rem .85rem; }
    .admin-mobile-menu-button { display: grid; flex: 0 0 2.7rem; place-content: center; gap: 4px; width: 2.7rem; height: 2.7rem; padding: 0; border: 2px solid #171717; border-radius: 11px; background: var(--lime); }
    .admin-mobile-menu-button span { display: block; width: 1.15rem; height: 2px; border-radius: 2px; background: #171717; }
    .admin-topbar-title { min-width: 0; flex: 1; }
    .admin-topbar-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .admin-topbar-meta { max-width: 42%; justify-content: flex-end; text-align: right; }
    .admin-topbar-meta b { display: none; }
    .admin-sidebar-backdrop { position: fixed; inset: 0; z-index: 19; border: 0; background: rgba(15, 23, 42, .52); }
    .admin-shell.admin-menu-open .admin-sidebar-backdrop { display: block; }
    .admin-shell-content { min-height: calc(100vh - 4rem); overflow: visible; }
    .admin-shell-content > .container { padding: 1rem .85rem !important; }
    .admin-shell-content .auth-card.admin-card { padding: 1rem !important; border-width: 2px; border-radius: 18px; box-shadow: 5px 5px 0 #171717; }
    .admin-section { padding: 1rem; }
    .admin-section .row > [class*="col-"] { min-width: 0; }
    .table-responsive, .journal-grid-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .group-directory-card { width: 100%; }
    .group-directory-main, .group-directory-actions { width: 100%; }
    .group-directory-actions { display: flex; flex-wrap: wrap; }
    .group-directory-actions .btn { flex: 1 1 auto; }
    .admin-shell-footer { padding: .8rem 1rem 1.1rem; }
}

@media (max-width: 520px) {
    .admin-topbar-meta { max-width: 38%; font-size: .62rem; }
    .admin-topbar-meta .admin-online-dot { display: none; }
    .admin-topbar-kicker { font-size: .52rem; }
    .admin-topbar strong { font-size: .9rem; }
    .admin-shell-content h1 { font-size: 1.45rem; }
    .admin-section { padding: .8rem; border-radius: 15px; }
    .admin-shell-content .btn { white-space: normal; }
}
.teacher-mark-settings-page { max-width: 1120px; }
.teacher-mark-setting-status { display: inline-flex; align-items: center; padding: .55rem .85rem; border: 2px solid var(--ink); border-radius: 999px; font-size: .72rem; font-weight: 950; }
.teacher-mark-setting-status.is-on { background: #d1fae5; color: #047857; }
.teacher-mark-setting-status.is-off { background: #f1f5f9; color: #64748b; }
.teacher-mark-settings-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 1rem; }
.teacher-mark-settings-card { padding: 1.25rem; border: 2px solid var(--ink); border-radius: 18px; background: #fff; }
.teacher-mark-settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.teacher-mark-settings-card-head > div { display: flex; align-items: center; gap: .65rem; }
.teacher-mark-settings-icon { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 12px; background: #eadcff; font-size: 1.1rem; }
.teacher-mark-switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 3.2rem; height: 1.8rem; cursor: pointer; }
.teacher-mark-switch input { position: absolute; opacity: 0; pointer-events: none; }
.teacher-mark-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .15s ease; }
.teacher-mark-switch span::after { position: absolute; top: .2rem; left: .2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; content: ''; background: #fff; box-shadow: 0 2px 5px rgba(15, 23, 42, .25); transition: transform .15s ease; }
.teacher-mark-switch input:checked + span { background: #198754; }
.teacher-mark-switch input:checked + span::after { transform: translateX(1.4rem); }
.teacher-mark-how-card { background: #f8fafc; }
.teacher-mark-how-list { display: grid; gap: .7rem; padding-left: 1.35rem; margin: 0 0 1rem; color: #334155; font-size: .88rem; }
.teacher-mark-security-note { padding: .8rem .9rem; border-left: 4px solid #f59e0b; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: .75rem; line-height: 1.45; }
.teacher-mark-clear-code { display: inline-flex; align-items: center; gap: .5rem; color: #b42318; font-size: .75rem; font-weight: 800; }
.teacher-mark-clear-code input { accent-color: #dc3545; }
.teacher-mark-student-box { overflow: hidden; border: 1px solid #94a3b8; border-radius: 14px; background: #f8fafc; }
.teacher-mark-student-box > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; cursor: pointer; list-style: none; }
.teacher-mark-student-box > summary::-webkit-details-marker { display: none; }
.teacher-mark-student-box > summary > span { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.teacher-mark-student-box > summary strong, .teacher-mark-student-box > summary small { display: block; }
.teacher-mark-student-box > summary small { color: #64748b; font-size: .7rem; }
.teacher-mark-student-box > summary b { flex: 0 0 auto; color: #146c43; font-size: .72rem; white-space: nowrap; }
.teacher-mark-student-box[open] > summary { border-bottom: 1px dashed #cbd5e1; background: #f0fdf4; }
.teacher-mark-student-icon { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 9px; background: #d9f99d; }
.teacher-mark-student-content { padding: .85rem .9rem .95rem; }
.student-submission-files-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; color: #334155; }
.student-submission-files-heading strong { font-size: .78rem; }
.student-submission-files-heading small { color: #64748b; font-size: .68rem; }
.teacher-mark-student-form { display: grid; grid-template-columns: 1.15fr .7fr 1fr auto; align-items: end; gap: .65rem; }
.teacher-mark-student-form .form-label { margin-bottom: .3rem; font-size: .7rem; font-weight: 850; }
.teacher-mark-student-form .form-control, .teacher-mark-student-form .form-select { min-height: 2.45rem; font-size: .78rem; }
.teacher-mark-student-form .btn { min-height: 2.45rem; white-space: nowrap; }

@media (max-width: 900px) {
    .teacher-mark-settings-grid { grid-template-columns: 1fr; }
    .teacher-mark-student-form { grid-template-columns: 1fr 1fr; }
    .teacher-mark-student-form > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .teacher-mark-student-box > summary { align-items: flex-start; flex-direction: column; }
    .teacher-mark-student-form { grid-template-columns: 1fr; }
    .teacher-mark-student-form > :last-child { grid-column: auto; width: 100%; }
}

/* Live lesson presentations */
.live-admin-page, .live-run-page { max-width: 1480px; margin: 0 auto; padding: 1.5rem 1.75rem 3rem; }
.live-page-head, .live-run-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1.35rem; }
.live-page-head h1, .live-run-head h1 { margin: .45rem 0 .3rem; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 950; letter-spacing: -.045em; }
.live-page-head p, .live-run-head p { margin: 0; color: #64748b; font-size: .86rem; }
.live-back-link { display: inline-flex; color: #64748b; font-size: .76rem; font-weight: 850; text-decoration: none; }
.live-back-link:hover { color: #111827; }
.live-kicker, .live-panel-eyebrow { display: block; color: #198754; font-size: .66rem; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.live-run-button { min-height: 3rem; padding: .8rem 1.15rem; border-radius: 12px; font-weight: 900; }
.live-empty-card, .live-start-card { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(260px, 340px); align-items: center; gap: 1.5rem; padding: 2rem; border: 2px solid #171717; border-radius: 22px; background: linear-gradient(135deg, #fffef9, #f0ffd9); box-shadow: 6px 7px 0 rgba(23,23,23,.08); }
.live-empty-icon, .live-start-icon { display: grid; place-items: center; width: 4.2rem; height: 4.2rem; border-radius: 18px; background: #d6ff45; color: #171717; font-size: 2rem; font-weight: 950; }
.live-empty-card h2, .live-start-card h2 { margin: .4rem 0 .35rem; font-size: 1.35rem; font-weight: 950; }
.live-empty-card p, .live-start-card p { max-width: 660px; margin: 0; color: #64748b; line-height: 1.55; }
.live-create-form { display: grid; gap: .55rem; }
.live-create-form label, .live-title-form label, .live-form-label { font-size: .72rem; font-weight: 850; color: #334155; }
.live-create-form .btn { margin-top: .2rem; }
.live-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 1rem; align-items: start; }
.live-builder-column, .live-side-column { display: grid; gap: 1rem; min-width: 0; }
.live-panel { padding: 1.15rem; border: 1.5px solid #1f2937; border-radius: 18px; background: #fff; box-shadow: 3px 4px 0 rgba(23,23,23,.06); }
.live-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.live-panel-head h2 { margin: .22rem 0 0; font-size: 1.05rem; font-weight: 950; }
.live-count-badge { display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; padding: 0 .45rem; border-radius: 9px; background: #d6ff45; color: #171717; font-size: .78rem; font-weight: 950; }
.live-title-form > div { display: flex; gap: .55rem; }
.live-title-form .form-control { min-width: 0; }
.live-title-form .btn { flex: 0 0 auto; }
.live-how-note { display: grid; gap: .22rem; margin-top: 1rem; padding: .8rem .9rem; border-left: 4px solid #8b5cf6; border-radius: 10px; background: #f5f3ff; color: #5b21b6; font-size: .76rem; line-height: 1.45; }
.live-how-note strong { color: #4c1d95; }
.live-slides-empty { padding: 1.1rem; border: 1px dashed #94a3b8; border-radius: 12px; color: #64748b; text-align: center; }
.live-slide-list { display: grid; gap: .65rem; }
.live-slide-card { display: grid; grid-template-columns: 2.3rem 4.5rem minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .8rem; border: 1px solid #cbd5e1; border-radius: 13px; background: #fafafa; scroll-margin-top: 1rem; }
.live-slide-number { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 10px; background: #171717; color: #fff; font-weight: 950; }
.live-slide-preview, .live-slide-preview-placeholder { display: grid; place-items: center; width: 4.5rem; height: 3.15rem; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 8px; background: #eaf1f8; color: #64748b; font-size: 1.1rem; font-weight: 900; }
.live-slide-preview:hover { border-color: #198754; }
.live-slide-preview img { width: 100%; height: 100%; object-fit: cover; }
.live-slide-main { min-width: 0; }
.live-slide-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-bottom: .25rem; }
.live-slide-type, .live-slide-secondary { display: inline-flex; align-items: center; min-height: 1.35rem; padding: .15rem .45rem; border-radius: 999px; font-size: .62rem; font-weight: 900; }
.live-slide-type-image { background: #dbeafe; color: #1d4ed8; }
.live-slide-type-question { background: #fef3c7; color: #92400e; }
.live-slide-type-result { background: #dcfce7; color: #166534; }
.live-slide-secondary { background: #f1f5f9; color: #64748b; }
.live-slide-main > strong { display: block; overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.live-slide-main > small { display: block; margin-top: .2rem; color: #64748b; font-size: .68rem; }
.live-slide-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.live-slide-actions form { display: contents; }
.live-slide-actions .btn { font-size: .68rem; font-weight: 800; }
.live-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .85rem; }
.live-form-grid .form-label, .live-question-fields > .form-label, .live-result-fields .form-label { margin-bottom: .35rem; font-size: .72rem; font-weight: 850; }
.live-question-fields, .live-result-fields { margin-top: 1rem; }
.live-question-fields[hidden], .live-result-fields[hidden], .live-slide-image-field[hidden], .live-options-field[hidden], .live-text-correct-field[hidden] { display: none; }
.live-question-type-row { margin-top: .8rem; }
.live-options-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1rem 0 .45rem; }
.live-options-head small { color: #64748b; font-size: .68rem; }
.live-option-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .65rem; margin-bottom: .45rem; }
.live-option-row label { display: inline-flex; align-items: center; gap: .35rem; color: #475569; font-size: .7rem; white-space: nowrap; }
.live-option-row input[type="checkbox"] { accent-color: #198754; }
.live-current-file { margin-top: .35rem; color: #64748b; font-size: .68rem; line-height: 1.35; }
.live-editor-preview { display: grid; gap: .4rem; margin: .75rem 0 0; padding: .55rem; border: 1px solid #b7dbc7; border-radius: 10px; background: #f4fff8; }
.live-editor-preview img { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 7px; background: #eef2f7; }
.live-editor-preview figcaption { color: #3b6a50; font-size: .67rem; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-editor-actions { display: flex; align-items: center; gap: .85rem; margin-top: 1.15rem; }
.live-editor-actions .btn { font-weight: 900; }
.live-editor-actions .text-secondary { font-size: .7rem; }
.live-duplicate-panel p, .live-beta-note { color: #64748b; font-size: .76rem; line-height: 1.5; }
.live-session-list { display: grid; gap: .55rem; }
.live-session-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .55rem; padding: .65rem; border-radius: 10px; background: #f8fafc; }
.live-session-row > span:nth-child(2) { min-width: 0; }
.live-session-row strong, .live-session-row small { display: block; }
.live-session-row strong { font-size: .75rem; }
.live-session-row small { overflow: hidden; color: #64748b; font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.live-session-row > a { color: #198754; font-size: .68rem; font-weight: 900; text-decoration: none; }
.live-session-status { padding: .18rem .38rem; border-radius: 999px; font-size: .58rem; font-weight: 900; white-space: nowrap; }
.live-session-status.is-running { background: #dcfce7; color: #166534; }
.live-session-status.is-finished { background: #e2e8f0; color: #475569; }
.live-beta-note { background: #faf5ff; border-color: #c4b5fd; }
.live-beta-note strong { display: block; color: #5b21b6; font-size: .82rem; }
.live-beta-note ul { padding-left: 1rem; margin: .7rem 0; }
.live-beta-note span { display: block; font-size: .68rem; }
.live-run-head { align-items: center; }
.live-run-head-actions { display: flex; align-items: center; gap: .8rem; }
.live-run-connection, .student-live-connection { display: inline-flex; align-items: center; gap: .4rem; color: #198754; font-size: .7rem; font-weight: 850; }
.live-run-connection i, .student-live-connection i { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.live-stage-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1rem; align-items: start; }
.live-stage-column, .live-stats-column { display: grid; gap: .85rem; min-width: 0; }
.live-stage-card { min-height: 570px; padding: 1.1rem; border: 2px solid #171717; border-radius: 22px; background: #111827; color: #fff; box-shadow: 6px 7px 0 rgba(23,23,23,.15); }
.live-stage-topline { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #94a3b8; font-size: .72rem; }
.live-stage-status { display: inline-flex; align-items: center; padding: .35rem .6rem; border-radius: 999px; font-weight: 900; }
.live-stage-status.is-running { background: #14532d; color: #bbf7d0; }
.live-stage-status.is-finished { background: #334155; color: #cbd5e1; }
.live-stage-content { display: grid; place-items: center; min-height: 500px; padding: 1.5rem; }
.live-stage-image-wrap { display: grid; place-items: center; width: 100%; height: 100%; }
.live-stage-image-wrap img { display: block; max-width: 100%; max-height: 480px; border-radius: 12px; object-fit: contain; }
.live-stage-question, .live-stage-result { width: min(850px, 100%); text-align: center; }
.live-stage-label { display: inline-flex; padding: .35rem .55rem; border-radius: 999px; background: #d6ff45; color: #171717; font-size: .68rem; font-weight: 950; letter-spacing: .1em; }
.live-stage-question h2, .live-stage-result h2 { margin: 1.1rem 0 .65rem; font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1.03; font-weight: 950; letter-spacing: -.05em; }
.live-stage-question-type { color: #94a3b8; font-size: .9rem; }
.live-result-visual { display: inline-grid; grid-template-columns: auto auto; align-items: center; column-gap: .8rem; margin-top: 1rem; text-align: left; }
.live-result-visual span { grid-row: span 2; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 16px; background: #22c55e; color: #052e16; font-size: 2rem; font-weight: 950; }
.live-result-visual strong { font-size: 3rem; line-height: 1; }
.live-result-visual small { color: #94a3b8; }
.live-stage-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .55rem; }
.live-stage-controls form { display: contents; }
.live-stage-controls .btn { min-width: 8rem; font-weight: 900; }
.live-control-hint { margin: 0; color: #64748b; font-size: .72rem; text-align: center; }
.live-stats-card { padding: 1.2rem; border: 1.5px solid #1f2937; border-radius: 18px; background: #fff; }
.live-stats-card h2 { margin: .25rem 0 1rem; font-size: 1.1rem; font-weight: 950; }
.live-stat-big { display: flex; align-items: baseline; gap: .5rem; }
.live-stat-big strong { font-size: 2.8rem; line-height: 1; font-weight: 950; }
.live-stat-big span { color: #64748b; font-size: .75rem; }
.live-stat-progress, .student-live-progress { height: .45rem; overflow: hidden; margin: .8rem 0; border-radius: 999px; background: #e2e8f0; }
.live-stat-progress i, .student-live-progress i { display: block; height: 100%; border-radius: inherit; background: #22c55e; }
.live-stat-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.live-stat-pairs span { padding: .55rem; border-radius: 10px; font-size: .68rem; text-align: center; }
.live-stat-pairs .is-correct { background: #dcfce7; color: #166534; }
.live-stat-pairs .is-wrong { background: #fee2e2; color: #991b1b; }
.live-option-stats { display: grid; gap: .35rem; margin-top: 1rem; }
.live-option-stat { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .6rem; border-radius: 8px; background: #f8fafc; font-size: .7rem; }
.live-option-stat b { color: #198754; }
.live-first-answer, .live-correct-answer { margin-top: .8rem; padding: .65rem; border-radius: 9px; background: #f5f3ff; color: #5b21b6; font-size: .7rem; }
.live-first-answer strong, .live-correct-answer strong { display: block; margin-top: .18rem; color: #4c1d95; }
.live-correct-answer small { display: block; font-size: .6rem; }
.live-text-answers { display: grid; gap: .35rem; max-height: 230px; margin-top: .8rem; overflow: auto; }
.live-text-answers > div { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem; border-bottom: 1px solid #e2e8f0; font-size: .68rem; }
.live-text-answers .is-correct { color: #198754; }
.live-text-answers .is-wrong { color: #dc3545; }
.live-stats-muted { padding: 1rem; border-radius: 10px; background: #f8fafc; color: #64748b; font-size: .75rem; }
.live-projector-tip, .live-run-short-note { padding: .85rem 1rem; border-radius: 12px; background: #fefce8; color: #854d0e; font-size: .72rem; line-height: 1.45; }
.live-projector-tip strong { display: block; margin-bottom: .2rem; }
.live-run-short-note { margin-top: 1rem; text-align: center; }
.live-run-short-note a { color: inherit; font-weight: 900; }

/* Student live viewer */
.student-live-page { max-width: 1250px; margin: 0 auto; padding: 1.5rem 1.2rem 3rem; }
.student-live-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; margin-bottom: 1rem; }
.student-live-head h1 { margin: .35rem 0 .2rem; font-size: clamp(1.5rem, 4vw, 2.6rem); font-weight: 950; letter-spacing: -.045em; }
.student-live-head p { margin: 0; color: #64748b; font-size: .82rem; }
.student-live-user { padding: .45rem .7rem; border: 1px solid #cbd5e1; border-radius: 999px; color: #475569; font-size: .7rem; font-weight: 800; }
.student-live-stage { min-height: 620px; padding: 1rem; border: 2px solid #171717; border-radius: 22px; background: #111827; color: #fff; box-shadow: 6px 7px 0 rgba(23,23,23,.12); }
.student-live-stage-top { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .35rem .8rem; color: #94a3b8; font-size: .7rem; }
.student-live-content { display: grid; place-items: center; min-height: 540px; padding: 1rem; }
.student-live-image { display: grid; place-items: center; width: 100%; }
.student-live-image img { max-width: 100%; max-height: 520px; border-radius: 12px; object-fit: contain; }
.student-live-question, .student-live-result, .student-live-finished { width: min(760px, 100%); text-align: center; }
.student-live-chocolate { display: grid; justify-items: center; width: min(650px, 100%); padding: clamp(1.5rem, 5vw, 4rem) 1.25rem; border: 1px solid #a78bfa; border-radius: 24px; background: linear-gradient(145deg, #231942, #3b1d5a); text-align: center; }
.student-live-chocolate > span { display: grid; place-items: center; width: clamp(4.5rem, 9vw, 7rem); height: clamp(4.5rem, 9vw, 7rem); border-radius: 24px; background: #facc15; font-size: clamp(2.4rem, 5vw, 4.5rem); transform: rotate(-5deg); }
.student-live-chocolate h2 { margin: 1.2rem 0 .5rem; font-size: clamp(1.8rem, 4.5vw, 3.7rem); font-weight: 950; letter-spacing: -.045em; }
.student-live-chocolate p { max-width: 420px; margin: 0; color: #ddd6fe; font-size: clamp(.82rem, 1.4vw, 1.1rem); }
.student-live-question h2, .student-live-result h2, .student-live-finished h2 { margin: 1rem 0 1.4rem; font-size: clamp(1.8rem, 5vw, 3.6rem); line-height: 1.05; font-weight: 950; letter-spacing: -.045em; }
.student-live-answer-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; text-align: left; }
.student-live-answer-options label { display: flex; align-items: center; gap: .7rem; min-height: 3.5rem; padding: .85rem 1rem; border: 1px solid #475569; border-radius: 12px; background: #1e293b; cursor: pointer; font-size: .85rem; }
.student-live-answer-options label:has(input:checked) { border-color: #d6ff45; background: #365314; }
.student-live-answer-options input { accent-color: #d6ff45; }
.student-live-answer-form .form-control { border-color: #64748b; background: #1e293b; color: #fff; }
.student-live-answer-form .form-control::placeholder { color: #94a3b8; }
.student-live-answer-form button { margin-top: 1rem; min-width: 12rem; font-weight: 900; }
.student-live-answer-error { min-height: 1.2rem; margin-top: .65rem; color: #fca5a5; font-size: .75rem; }
.student-live-waiting { display: grid; justify-items: center; gap: .45rem; padding: 1.6rem; border: 1px solid #86efac; border-radius: 16px; background: #14532d; }
.student-live-waiting span, .student-live-finished span { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 50%; background: #d6ff45; color: #171717; font-size: 1.5rem; font-weight: 950; }
.student-live-waiting strong { font-size: 1rem; }
.student-live-waiting small { color: #bbf7d0; }
.student-live-result-score { display: flex; align-items: baseline; justify-content: center; gap: .5rem; }
.student-live-result-score strong { color: #d6ff45; font-size: 3.5rem; line-height: 1; }
.student-live-result-score span { color: #cbd5e1; }
.student-live-result-stats { margin-top: 1.5rem; }
.student-live-result-options { display: grid; gap: .35rem; margin-top: 1rem; text-align: left; }
.student-live-result-options > div { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem .7rem; border-radius: 9px; background: #1e293b; font-size: .75rem; }
.student-live-result-options > div.is-correct { background: #14532d; color: #dcfce7; }
.student-live-your-answer { display: grid; gap: .2rem; padding: .85rem; border-radius: 11px; background: #1e293b; text-align: left; }
.student-live-your-answer small, .student-live-correct small { color: #94a3b8; font-size: .64rem; }
.student-live-your-answer strong { font-size: .78rem; }
.student-live-your-answer em { font-size: .68rem; font-style: normal; font-weight: 900; }
.student-live-your-answer .is-correct { color: #86efac; }
.student-live-your-answer .is-wrong { color: #fca5a5; }
.student-live-correct { display: grid; gap: .2rem; margin-top: .8rem; padding: .7rem; border-radius: 10px; background: #365314; text-align: left; }
.student-live-hint { max-width: 760px; margin: 1rem auto 0; color: #64748b; font-size: .74rem; text-align: center; }
.student-live-return-modal[hidden] { display: none; }
.student-live-return-modal { position: fixed; z-index: 1100; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(15, 23, 42, .62); backdrop-filter: blur(5px); }
.student-live-return-modal-card { display: grid; justify-items: center; width: min(390px, 100%); padding: 2rem 1.5rem; border: 2px solid #171717; border-radius: 20px; background: #fffef9; box-shadow: 8px 9px 0 rgba(0,0,0,.28); text-align: center; }
.student-live-return-modal-dots { min-height: 2.7rem; color: #64748b; font-size: 2.6rem; font-weight: 950; letter-spacing: .28em; animation: live-return-pulse 1s ease-in-out infinite; }
.student-live-return-modal-card strong { margin-top: .25rem; color: #171717; font-size: 1.08rem; font-weight: 950; }
.student-live-return-modal-card span { margin-top: .4rem; color: #64748b; font-size: .78rem; }
.student-live-return-modal.is-revealed .student-live-return-modal-card { background: linear-gradient(135deg, #fffef9, #f0ffd9); }
.student-live-return-modal.is-approved .student-live-return-modal-dots { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; min-height: 0; border-radius: 50%; background: #d6ff45; color: #171717; font-size: 1.7rem; letter-spacing: 0; animation: none; }
@keyframes live-return-pulse { 50% { opacity: .3; transform: translateY(-3px); } }
.live-event-console { overflow: hidden; margin-top: 1rem; border: 2px solid #171717; border-radius: 16px; background: #080d13; box-shadow: 5px 6px 0 rgba(23,23,23,.13); color: #dbeafe; }
.live-event-console-head { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem .95rem; border-bottom: 1px solid #334155; background: #111827; color: #94a3b8; font: 800 .68rem/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.live-event-console-head span { color: #86efac; }
.live-event-console-head i { display: inline-block; width: .48rem; height: .48rem; margin-right: .3rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.live-event-console-body { display: grid; gap: .18rem; max-height: 230px; padding: .85rem .95rem; overflow: auto; font: .73rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.live-event-line { display: grid; grid-template-columns: 4.9rem minmax(160px, 260px) 1fr; gap: .55rem; }
.live-event-line time { color: #64748b; }
.live-event-line.is-join b { color: #86efac; }
.live-event-line.is-left b { color: #fbbf24; }
.live-event-line span { color: #cbd5e1; }
.live-event-console-muted { color: #64748b; }
.student-live-callout { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border: 1.5px solid #86efac; border-radius: 12px; background: #f0fdf4; }
.student-live-callout strong, .student-live-callout small { display: block; }
.student-live-callout strong { color: #166534; font-size: .82rem; }
.student-live-callout small { margin-top: .18rem; color: #64748b; font-size: .7rem; }
.student-live-callout .btn { flex: 0 0 auto; font-size: .72rem; font-weight: 900; }

@media (max-width: 1050px) {
    .live-admin-grid, .live-stage-layout { grid-template-columns: 1fr; }
    .live-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .live-beta-note { grid-column: 1 / -1; }
    .live-stats-column { grid-template-columns: minmax(0, 1fr) 260px; align-items: start; }
}
@media (max-width: 700px) {
    .live-admin-page, .live-run-page, .student-live-page { padding-right: .8rem; padding-left: .8rem; }
    .live-page-head, .live-run-head, .student-live-head { align-items: flex-start; flex-direction: column; }
    .live-empty-card, .live-start-card { grid-template-columns: 1fr; }
    .live-side-column, .live-stats-column { grid-template-columns: 1fr; }
    .live-form-grid { grid-template-columns: 1fr; }
    .live-slide-card { grid-template-columns: 2.3rem minmax(0, 1fr); }
    .live-slide-preview, .live-slide-preview-placeholder { grid-column: 2; grid-row: 1; }
    .live-slide-main { grid-column: 1 / -1; }
    .live-slide-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .live-option-row { grid-template-columns: 1fr; align-items: start; }
    .live-editor-actions { align-items: flex-start; flex-direction: column; }
    .student-live-answer-options { grid-template-columns: 1fr; }
    .student-live-stage { min-height: 560px; }
    .student-live-content { min-height: 480px; }
}

/* Гостевая, одноразовая версия живой презентации. */
.guest-pulse-empty { max-width: 920px; margin: 2rem auto; padding: 3rem; text-align: center; }
.guest-pulse-empty > span, .guest-pulse-orb { display: inline-grid; width: 2.7rem; height: 2.7rem; place-items: center; border: 2px solid #20242b; border-radius: 50%; background: #d6ff45; box-shadow: 3px 3px 0 #20242b; font-size: 1.45rem; }
.guest-slide-list { display: grid; gap: .75rem; margin-top: 1rem; }
.guest-slide-item { display: flex; gap: .8rem; align-items: center; padding: .8rem; border: 1.5px solid #20242b; border-radius: 12px; background: #fff; }
.guest-slide-item p { margin: .2rem 0 0; color: #657085; font-size: .86rem; }
.guest-slide-number { display: grid; flex: 0 0 2.1rem; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 9px; background: #d6ff45; color: #20242b; font-weight: 900; }
.guest-slide-actions { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.guest-admin-preview-image { display: block; width: 100%; max-height: 420px; object-fit: contain; border: 1.5px solid #20242b; border-radius: 12px; background: #171717; }
.guest-admin-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin: 1rem 0; }
.guest-admin-options span { padding: .6rem .75rem; border: 1.5px solid #20242b; border-radius: 8px; background: #f8fafc; font-size: .9rem; }
.guest-pulse-join { max-width: 560px; margin: 4rem auto; padding: 2.4rem; border: 2px solid #20242b; border-radius: 22px; background: #fffdf6; box-shadow: 9px 9px 0 #20242b; text-align: center; }
.guest-pulse-join .guest-pulse-orb { margin-bottom: 1rem; }
.guest-pulse-join h1 { margin: .65rem 0 .5rem; font-weight: 900; }
.guest-pulse-join > p { margin-bottom: 1.6rem; color: #657085; }
.guest-pulse-wait { display: grid; gap: .35rem; padding: 1rem; border: 1.5px solid #20242b; border-radius: 12px; background: #f8fafc; text-align: center; }
.guest-pulse-wait span { color: #657085; font-size: .88rem; }
.guest-pulse-live { min-height: 100vh; padding: 1.1rem clamp(1rem, 5vw, 4.5rem) 2rem; background: radial-gradient(circle at 10% 5%, #edffc0 0, transparent 28rem), #f6f4ee; }
.guest-pulse-live > header { display: flex; gap: .8rem; align-items: center; max-width: 1160px; margin: 0 auto 1.25rem; }
.guest-pulse-live > header .guest-pulse-orb { width: 2.2rem; height: 2.2rem; box-shadow: 2px 2px 0 #20242b; font-size: 1.1rem; }
.guest-pulse-live > header div { display: grid; line-height: 1.15; }
.guest-pulse-live > header div span { color: #168653; font-size: .65rem; font-weight: 900; letter-spacing: .08em; }
.guest-pulse-live > header div strong { font-size: .95rem; }
.guest-pulse-live > header em { margin-left: auto; color: #657085; font-size: .75rem; font-style: normal; }
.guest-pulse-stage { display: grid; min-height: min(72vh, 780px); max-width: 1160px; margin: auto; place-items: center; padding: clamp(1.2rem, 4vw, 3rem); border: 2px solid #20242b; border-radius: 22px; background: #fff; box-shadow: 8px 8px 0 #20242b; }
.guest-pulse-image { display: block; max-width: 100%; max-height: calc(72vh - 6rem); object-fit: contain; }
.guest-question, .guest-result { width: min(100%, 760px); }
.guest-question h2, .guest-result h2 { margin: .6rem 0 1.4rem; font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 900; }
.guest-answer-options { display: grid; gap: .7rem; margin-bottom: 1.2rem; }
.guest-answer-options label { display: flex; gap: .75rem; align-items: center; padding: .85rem 1rem; border: 1.5px solid #20242b; border-radius: 10px; cursor: pointer; font-weight: 700; }
.guest-answer-options label:has(input:checked) { border-color: #168653; background: #edffc0; box-shadow: 3px 3px 0 #168653; }
.guest-question textarea { margin-bottom: 1rem; }
.guest-question small[data-error] { display: block; margin-top: .6rem; color: #b42318; }
.guest-result > p { color: #657085; }
.guest-result > div { display: grid; gap: .6rem; margin-top: 1.25rem; }
.guest-result-row { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1.5px solid #20242b; border-radius: 10px; }
.guest-result-row.is-correct { border-color: #168653; background: #edffc0; }
.guest-pulse-finished { text-align: center; }
.guest-pulse-finished > span { display: grid; width: 4rem; height: 4rem; margin: 0 auto 1rem; place-items: center; border-radius: 50%; background: #d6ff45; font-size: 2rem; font-weight: 900; }
@media (max-width: 640px) { .guest-pulse-join { margin: 1.5rem auto; padding: 1.5rem; box-shadow: 5px 5px 0 #20242b; } .guest-pulse-stage { min-height: 70vh; padding: 1.1rem; box-shadow: 5px 5px 0 #20242b; } .guest-slide-item { align-items: flex-start; } .guest-slide-actions { margin-left: -2.9rem; padding-top: 2.7rem; } .guest-admin-options { grid-template-columns: 1fr; } }

/* РПД: компактная рабочая карта вместо тяжёлой таблицы из документа. */
.rpd-page { max-width: 1500px; }
.rpd-create-card { border-style: dashed; border-color: #5b42ff; background: linear-gradient(135deg, #f7f4ff, #fff); }
.rpd-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.rpd-plan-card { display: grid; gap: .48rem; padding: 1.15rem; border: 1.5px solid #20242b; border-radius: 14px; background: #fff; color: inherit; text-decoration: none; box-shadow: 4px 4px 0 #20242b; transition: transform .16s ease, box-shadow .16s ease; }
.rpd-plan-card:hover { color: inherit; transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #20242b; }
.rpd-plan-card-mark { width: max-content; padding: .16rem .42rem; border-radius: 5px; background: #d6ff45; color: #20242b; font-size: .63rem; font-weight: 900; letter-spacing: .06em; }
.rpd-plan-card > strong { font-size: 1.18rem; font-weight: 900; }
.rpd-plan-card > small { min-height: 2.2rem; color: #657085; }
.rpd-plan-card > div { display: flex; gap: .45rem; flex-wrap: wrap; }
.rpd-plan-card > div span { padding: .2rem .45rem; border: 1px solid #cbd5e1; border-radius: 99px; color: #475569; font-size: .71rem; }
.rpd-plan-card > b { margin-top: .3rem; font-size: .84rem; }
.rpd-summary { display: flex; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }
.rpd-summary span { display: grid; min-width: 75px; padding: .5rem .7rem; border: 1.5px solid #20242b; border-radius: 10px; background: #fff; text-align: center; color: #657085; font-size: .69rem; }
.rpd-summary b { display: block; color: #20242b; font-size: 1.05rem; }
.rpd-sections { display: grid; gap: 1rem; }
.rpd-section { overflow: hidden; border: 1.5px solid #20242b; border-radius: 15px; background: #fff; }
.rpd-section > summary { display: flex; gap: .8rem; align-items: center; padding: .85rem 1rem; cursor: pointer; list-style: none; font-size: 1.02rem; }
.rpd-section > summary::-webkit-details-marker, .rpd-add-item > summary::-webkit-details-marker, .rpd-item-menu > summary::-webkit-details-marker { display: none; }
.rpd-section-no { flex: 0 0 auto; padding: .25rem .45rem; border-radius: 5px; background: #20242b; color: #fff; font-size: .67rem; font-weight: 900; }
.rpd-section > summary strong { font-weight: 900; }
.rpd-summary-arrow { margin-left: auto; font-size: 1.2rem; transition: transform .15s ease; }
.rpd-section[open] .rpd-summary-arrow { transform: rotate(180deg); }
.rpd-section-body { padding: 0 1rem 1rem; border-top: 1px solid #dbe2ea; }
.rpd-inline-create { display: grid; grid-template-columns: 1fr auto; gap: .6rem; margin: 1rem 0; }
.rpd-topic { margin-top: .85rem; border: 1px solid #cbd5e1; border-radius: 12px; background: #fdfdfb; }
.rpd-topic > header { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem .95rem; }
.rpd-topic-no { display: grid; flex: 0 0 auto; width: 2.2rem; height: 2.2rem; place-items: center; border-radius: 8px; background: #ede9fe; color: #5b42ff; font-size: .77rem; font-weight: 900; }
.rpd-topic h3 { margin: 0; font-size: 1rem; font-weight: 900; }
.rpd-topic p { margin: .2rem 0 0; color: #718096; font-size: .77rem; }
.rpd-add-item { margin: 0 .95rem .95rem; border: 1.5px dashed #94a3b8; border-radius: 10px; background: #f8fafc; }
.rpd-add-item > summary { padding: .65rem .75rem; cursor: pointer; color: #334155; font-size: .83rem; font-weight: 800; list-style: none; }
.rpd-item-form { display: grid; grid-template-columns: minmax(150px, .8fr) 100px 2fr; gap: .7rem; padding: .1rem .75rem .85rem; }
.rpd-item-form .rpd-item-content-field { grid-column: 1 / -1; }
.rpd-item-form small { display: block; margin-top: .2rem; color: #64748b; font-size: .65rem; }
.rpd-subgroup-check { display: flex; grid-column: 1 / -1; gap: .45rem; align-items: center; margin: 0; color: #334155; font-size: .78rem; font-weight: 700; }
.rpd-item-form > .btn { justify-self: start; }
.rpd-items { display: grid; gap: .75rem; margin: 0 .95rem .95rem; }
.rpd-item { overflow: hidden; border: 1.5px solid #20242b; border-radius: 11px; background: #fff; }
.rpd-item-head { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; padding: .8rem .9rem .6rem; }
.rpd-item-kind { display: inline-block; margin-bottom: .35rem; padding: .17rem .4rem; border-radius: 5px; font-size: .6rem; font-weight: 900; letter-spacing: .06em; }
.rpd-item-kind-lecture { background: #dbeafe; color: #1d4ed8; }
.rpd-item-kind-practice { background: #dcfce7; color: #15803d; }
.rpd-item-kind-independent { background: #fef3c7; color: #a16207; }
.rpd-item h4 { margin: 0; font-size: .95rem; font-weight: 900; }
.rpd-item-head p { margin: .25rem 0 0; color: #64748b; font-size: .75rem; }
.rpd-item-menu { position: relative; flex: 0 0 auto; }
.rpd-item-menu > summary { width: 2rem; padding: .15rem; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; color: #475569; text-align: center; list-style: none; }
.rpd-item-menu[open] > div { position: absolute; z-index: 5; right: 0; width: min(470px, 78vw); margin-top: .35rem; padding: .75rem; border: 1.5px solid #20242b; border-radius: 10px; background: #fff; box-shadow: 4px 4px 0 #20242b; }
.rpd-edit-item-form { display: grid; grid-template-columns: 1fr 100px; gap: .55rem; }
.rpd-edit-item-form label { display: grid; gap: .2rem; color: #475569; font-size: .7rem; font-weight: 800; }
.rpd-edit-item-form .rpd-edit-content { grid-column: 1 / -1; }
.rpd-item-full-content { padding: 0 .9rem .75rem; color: #475569; font-size: .82rem; line-height: 1.5; }
.rpd-progress-list { display: grid; gap: .55rem; padding: .75rem .9rem; border-top: 1px solid #dbe2ea; background: #fafafa; }
.rpd-progress-card { display: grid; grid-template-columns: minmax(120px, .75fr) 1.25fr minmax(230px, 1.6fr); gap: .6rem; align-items: start; padding: .65rem; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; }
.rpd-progress-card.is-completed { border-color: #16a34a; background: #f0fdf4; }
.rpd-progress-title { display: grid; gap: .1rem; }
.rpd-progress-title strong { font-size: .78rem; }
.rpd-progress-title span { color: #64748b; font-size: .69rem; }
.rpd-progress-controls { display: flex; gap: .5rem; align-items: end; }
.rpd-progress-controls label:first-child { width: 75px; color: #475569; font-size: .65rem; font-weight: 800; }
.rpd-complete-toggle { display: flex; gap: .28rem; align-items: center; padding-bottom: .34rem; color: #334155; font-size: .71rem; font-weight: 800; white-space: nowrap; }
.rpd-progress-comment { display: grid; gap: .18rem; color: #475569; font-size: .65rem; font-weight: 800; }
@media (max-width: 900px) { .rpd-progress-card { grid-template-columns: 1fr 1fr; } .rpd-progress-comment { grid-column: 1 / -1; } }
@media (max-width: 650px) { .rpd-inline-create, .rpd-item-form { grid-template-columns: 1fr; } .rpd-summary { justify-content: flex-start; } .rpd-progress-card { grid-template-columns: 1fr; } .rpd-progress-comment { grid-column: auto; } .rpd-item-menu[open] > div { position: fixed; top: 14vh; right: 5vw; width: 90vw; max-height: 75vh; overflow: auto; } }
.student-lesson-teacher {
    display: inline-flex;
    width: fit-content;
    color: #4c5b6b;
    font-size: .82rem;
    font-weight: 750;
}

.lesson-calendar-card-busy {
    background: #f2f3f5;
    border-style: dashed;
}

.submission-pdf-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: #1e293b;
}
.submission-pdf-note-icon {
    flex: 0 0 auto;
    padding: 5px 7px;
    border-radius: 8px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
}
.submission-pdf-note strong,
.submission-pdf-note small { display: block; }
.submission-pdf-note small { margin-top: 3px; line-height: 1.5; color: #64748b; }
.submission-pdf-note a { color: #0f766e; font-weight: 800; }

.submission-word-request {
    margin-bottom: 18px;
    padding: 18px;
    border: 2px solid #f59e0b;
    border-radius: 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
    box-shadow: 0 10px 28px rgba(245, 158, 11, .12);
}
.submission-word-request-head { display: flex; align-items: flex-start; gap: 13px; }
.submission-word-request-head > span { font-size: 30px; line-height: 1; }
.submission-word-request-head strong { display: block; font-size: 19px; color: #78350f; }
.submission-word-request-head p { margin: 5px 0 0; color: #92400e; line-height: 1.5; }
.submission-word-request-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.submission-word-request-methods > div { display: flex; gap: 10px; padding: 11px; border: 1px solid #fde68a; border-radius: 14px; background: rgba(255,255,255,.8); }
.submission-word-request-methods b { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 50%; background: #f59e0b; color: #fff; }
.submission-word-request-methods span,
.submission-word-request-methods strong,
.submission-word-request-methods small { display: block; }
.submission-word-request-methods small { margin-top: 2px; color: #78716c; line-height: 1.35; }
.submission-word-request-methods a { color: #0f766e; font-weight: 800; }
.submission-word-request-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
@media (max-width: 700px) {
    .submission-word-request-methods { grid-template-columns: 1fr; }
    .submission-word-request-actions .btn { width: 100%; }
}

.profile-lesson-editor-row > td { padding: 0 !important; background: #f3f4f6 !important; }
.profile-lesson-editor-panel { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(460px, 1.3fr); gap: 18px; padding: 18px; border-top: 2px solid #18181b; border-bottom: 2px solid #18181b; }
.profile-lesson-files { display: grid; gap: 10px; align-content: start; }
.profile-lesson-files > div:first-child { display: flex; justify-content: space-between; gap: 12px; }
.profile-lesson-files small { color: #64748b; }
.profile-lesson-comment { padding: 9px 11px; border-radius: 10px; background: #fff; }
.profile-lesson-editor { display: grid; grid-template-columns: 1.25fr .7fr auto auto; gap: 10px; align-items: end; }
.profile-lesson-editor label > span { display: block; margin-bottom: 5px; font-size: .78rem; font-weight: 800; }
.profile-live-check { display: flex !important; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; white-space: nowrap; }
.profile-live-check > span { margin: 0 !important; }
.profile-editor-result { grid-column: 1 / -1; min-height: 18px; color: #047857; font-weight: 800; }
@media (max-width: 1050px) { .profile-lesson-editor-panel { grid-template-columns: 1fr; } .profile-lesson-editor { grid-template-columns: 1fr 1fr; } }

/* Student cabinet: compact phones (320–600px) */
@media (max-width: 600px) {
    html, body { max-width: 100%; overflow-x: hidden; }
    body:not(.admin-mode) { background-attachment: fixed; }
    body:not(.admin-mode) .container { --bs-gutter-x: .9rem; }

    .site-nav { width: calc(100% - .75rem); margin: .4rem auto 0; padding: .42rem .5rem; border-width: 2px; border-radius: 15px; box-shadow: 3px 3px 0 rgba(23,23,23,.16); }
    .site-nav .brand { min-width: 0; }
    .site-nav .brand-mark { flex-basis: 1.9rem; width: 1.9rem; height: 1.9rem; }
    .site-nav .brand-copy strong { max-width: 10.5rem; overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
    .nav-menu-toggle { margin-left: auto; }
    .site-nav.nav-open .nav-actions { max-height: calc(100dvh - 5rem); overflow-y: auto; padding-bottom: .25rem; }
    .site-nav.nav-open .nav-links { gap: .3rem; padding: .4rem; }
    .site-nav.nav-open .nav-item-link, .site-nav.nav-open .nav-logout, .site-nav.nav-open .nav-help-button { width: 100%; min-height: 2.65rem; justify-content: flex-start; padding: .65rem .75rem; font-size: .76rem; }

    .student-dashboard-page { width: 100%; padding: .75rem .42rem 1.5rem !important; }
    .student-dashboard-shell { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
    .student-dashboard-shell > .alert { margin-inline: .15rem; border-radius: 13px; font-size: .75rem; }

    .student-dashboard-overview { gap: .7rem; padding: .9rem; margin: 0 .05rem .8rem; border-width: 2px; border-radius: 18px; box-shadow: 4px 4px 0 rgba(23,23,23,.14); }
    .student-dashboard-kicker { font-size: .57rem; }
    .student-dashboard-overview h2 { margin-top: .45rem; font-size: clamp(1.22rem, 6.3vw, 1.55rem); line-height: 1.08; overflow-wrap: anywhere; }
    .student-dashboard-overview p { font-size: .74rem; line-height: 1.45; }
    .student-dashboard-quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: .42rem; margin-top: .75rem; }
    .student-dashboard-quick-link { min-width: 0; justify-content: space-between; padding: .52rem .58rem; border-width: 1.5px; font-size: .66rem; }
    .student-dashboard-next { padding: .72rem; border-radius: 13px; }
    .student-dashboard-next-label, .student-dashboard-next-link { font-size: .66rem; }
    .student-dashboard-next strong { font-size: .86rem; overflow-wrap: anywhere; }
    .student-dashboard-facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .45rem; padding-top: .65rem; }
    .student-dashboard-facts div { min-width: 0; }
    .student-dashboard-facts strong { font-size: .98rem; }
    .student-dashboard-facts span { font-size: .55rem; overflow-wrap: anywhere; }

    .student-dashboard-shell > .row { --bs-gutter-x: .45rem; --bs-gutter-y: .45rem; margin-right: -.22rem; margin-left: -.22rem; }
    .student-dashboard-shell > .row > [class*="col-"] { padding-right: .22rem; padding-left: .22rem; }
    .student-dashboard-shell .stat-card { min-height: 5.25rem; padding: .65rem !important; border-width: 1.5px; border-radius: 12px; box-shadow: 2px 2px 0 rgba(23,23,23,.1); }
    .student-dashboard-shell .stat-card small { font-size: .62rem; }
    .student-dashboard-shell .stat-card strong { margin-top: .2rem; font-size: 1.35rem; }
    .student-dashboard-shell .stat-card span { max-width: 85%; font-size: .56rem; line-height: 1.15; }

    .student-schedule-section { padding: .65rem !important; margin-top: .8rem !important; border-width: 1.5px; border-radius: 17px; box-shadow: 3px 3px 0 rgba(23,23,23,.08); }
    .student-mini-calendar { width: 100%; max-width: none; padding: .42rem; margin-bottom: .65rem; border-radius: 12px; }
    .student-mini-calendar-header { padding-bottom: .4rem; }
    .student-mini-calendar-header strong { font-size: .78rem; }
    .calendar-nav-button { width: 2rem; height: 2rem; }
    .calendar-today-link { font-size: .58rem; }
    .student-mini-calendar-grid { gap: .12rem; }
    .student-mini-calendar-day, .student-mini-calendar-empty { min-height: 2.18rem; border-radius: 7px; }
    .student-mini-calendar-day { gap: .02rem; padding: .2rem .03rem; font-size: .63rem; }
    .student-mini-calendar-day small { min-width: .8rem; padding: .03rem .12rem; font-size: .42rem; }
    .student-calendar-day-markers { gap: 2px; }
    .student-calendar-day-marker { width: .28rem; height: .28rem; }
    .student-mini-calendar-legend { justify-content: flex-start; gap: .28rem .55rem; font-size: .5rem; }
    .student-selected-day-heading { align-items: center; padding: .68rem 0 .55rem; }
    .student-selected-day-heading h3 { font-size: .95rem !important; line-height: 1.2; }

    .student-selected-day-lessons { gap: .58rem !important; }
    .student-lesson-card { overflow: hidden; border-width: 1.5px; border-radius: 14px; box-shadow: 0 2px 6px rgba(23,23,23,.06); }
    .student-lesson-card[open] { border-left-width: 4px; box-shadow: 0 4px 12px rgba(23,23,23,.1); }
    .student-lesson-summary { display: grid; grid-template-columns: 3rem minmax(0,1fr); align-items: start; gap: .42rem .6rem; padding: .68rem; }
    .student-lesson-pair-number { grid-row: 1 / span 2; width: 3rem; min-height: 3.1rem; flex-basis: auto; border-radius: 10px; }
    .student-lesson-pair-number strong { font-size: 1.45rem; }
    .student-lesson-summary-main { grid-column: 2; }
    .student-lesson-summary-main > strong { font-size: .84rem; line-height: 1.25; overflow-wrap: anywhere; }
    .student-lesson-summary-main > .student-lesson-topic { max-width: 100%; font-size: .68rem; white-space: normal; line-height: 1.3; }
    .student-lesson-meta { font-size: .59rem; line-height: 1.3; }
    .student-lesson-summary-side { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: .28rem; min-width: 0; text-align: left; }
    .student-lesson-summary-side small { max-width: none; font-size: .6rem; }
    .student-lesson-summary-side .status-pill { padding: .2rem .4rem; font-size: .56rem; }
    .student-lesson-summary::after { grid-column: 1 / -1; width: 100%; height: 2.15rem; min-width: 0; margin-top: .08rem; border-width: 1.5px; font-size: .66rem; }
    .student-lesson-details { padding: 0 .68rem .72rem; }
    .student-lesson-details > :first-child { margin-top: .72rem !important; }
    .student-lesson-helper, .student-workflow-note { font-size: .68rem; }

    .student-lesson-materials-heading { font-size: .74rem; }
    .student-lesson-material-row, .student-lesson-test-row { display: grid; grid-template-columns: 1.7rem minmax(0,1fr); gap: .35rem .55rem; padding: .62rem; border-radius: 10px; }
    .student-lesson-material-row strong, .student-lesson-material-row small, .student-lesson-test-row strong, .student-lesson-test-row small { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
    .student-lesson-material-row strong, .student-lesson-test-row strong { font-size: .74rem; }
    .student-lesson-material-row small, .student-lesson-test-row small { font-size: .63rem; }
    .student-lesson-material-actions, .student-lesson-test-row form, .student-lesson-test-row > a, .student-lesson-test-row > .status-pill { grid-column: 1 / -1; width: 100%; margin: .15rem 0 0 !important; justify-content: stretch; }
    .student-lesson-material-actions .btn, .student-lesson-test-row form .btn, .student-lesson-test-row > .btn { min-height: 2.25rem; flex: 1 1 0; white-space: normal; }

    .teacher-mark-student-box > summary { gap: .45rem; padding: .65rem; }
    .teacher-mark-student-box > summary > span { align-items: flex-start; }
    .teacher-mark-student-box > summary b { width: 100%; padding-left: 2.35rem; font-size: .64rem; }
    .teacher-mark-student-content { padding: .68rem; }

    .student-submission-heading { gap: .5rem; padding: .72rem; }
    .student-submission-heading strong { font-size: .82rem; }
    .student-submission-heading small { font-size: .64rem; }
    .submission-form { padding: .65rem; }
    .submission-meta-grid { grid-template-columns: 1fr; gap: .65rem; }
    .submission-meta-field .form-label { font-size: .68rem; }
    .submission-meta-field .form-control, .submission-meta-field .form-select { min-height: 2.65rem; font-size: .78rem; }
    .submission-dropzone { min-height: 9rem; padding: .7rem; border-radius: 14px; }
    .submission-dropzone-empty { padding: .45rem .3rem; }
    .submission-dropzone-empty strong { font-size: .86rem; }
    .submission-dropzone-empty small { font-size: .62rem; line-height: 1.35; }
    .submission-file-preview-item { grid-template-columns: 38px minmax(0,1fr) 2rem; gap: .45rem; padding: .55rem; }
    .submission-file-preview-item .submission-file-open { grid-column: 2; justify-self: start; }
    .submission-file-preview-item .submission-file-remove { grid-column: 3; grid-row: 1; }
    .submission-file-info strong { font-size: .72rem; white-space: normal; overflow-wrap: anywhere; }
    .submission-actions { align-items: stretch; flex-direction: column; gap: .6rem; }
    .submission-upload-hint { font-size: .62rem; }
    .submission-action-buttons { display: grid; grid-template-columns: 1fr; width: 100%; }
    .submission-action-buttons .btn { width: 100%; min-height: 2.75rem; white-space: normal; }
    .submission-pdf-note { gap: 8px; padding: 10px; border-radius: 12px; }
    .submission-pdf-note small { font-size: .62rem; }

    .submission-confirm-modal { align-items: end; padding: 0; }
    .submission-confirm-dialog { width: 100%; max-height: 96dvh; border-width: 2px 0 0; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 28px rgba(0,0,0,.22); }
    .submission-confirm-head { padding: .8rem .85rem .65rem; }
    .submission-confirm-head h2 { font-size: 1.2rem; }
    .submission-confirm-close { width: 2rem; height: 2rem; }
    .submission-confirm-progress { gap: .28rem; padding: .55rem .75rem; }
    .submission-confirm-progress b { width: 1.45rem; height: 1.45rem; }
    .submission-confirm-progress small { font-size: .56rem; }
    .submission-confirm-body { min-height: 0; padding: .75rem; }
    .submission-confirm-step { gap: .7rem; }
    .submission-confirm-intro { gap: .55rem; padding: .65rem; }
    .submission-confirm-intro > span { width: 2rem; height: 2rem; flex-basis: 2rem; }
    .submission-confirm-intro strong { font-size: .8rem; }
    .submission-confirm-intro p { font-size: .66rem; }
    .submission-confirm-file { grid-template-columns: 38px minmax(0,1fr) auto; gap: .45rem; padding: .55rem; }
    .submission-confirm-file-type { width: 38px; height: 36px; }
    .submission-confirm-file .btn { grid-column: 1 / -1; width: 100%; }
    .submission-confirm-file-delete { grid-column: 3; grid-row: 1; }
    .submission-confirm-file-info strong { white-space: normal; overflow-wrap: anywhere; }
    .submission-confirm-file-actions { display: grid; grid-template-columns: 1fr; }
    .submission-confirm-file-actions .btn { width: 100%; }
    .submission-confirm-summary { grid-template-columns: 1fr; }
    .submission-confirm-footer { position: sticky; bottom: 0; display: grid; grid-template-columns: auto 1fr; gap: .45rem; padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom)); }
    .submission-confirm-footer-note { grid-column: 1 / -1; grid-row: 1; font-size: .56rem; }
    .submission-confirm-footer [data-confirm-next], .submission-confirm-footer [data-confirm-submit] { width: 100%; }
    .submission-word-request { padding: 12px; border-radius: 15px; }
    .submission-word-request-head strong { font-size: .92rem; }
    .submission-word-request-head p, .submission-word-request-methods small { font-size: .64rem; }

    .contact-dialog { width: calc(100vw - 1rem); max-height: 92dvh; border-radius: 17px; box-shadow: 5px 6px 0 var(--ink); }
    .contact-dialog-content { padding: 1rem .8rem 1.1rem; }
    .contact-avatar { width: 5rem; height: 5rem; }
    .contact-item { gap: .55rem; padding: .65rem; }
    .contact-item > div { min-width: 0; }
    .contact-item strong { overflow-wrap: anywhere; }
    .site-footer { margin-top: 1.2rem; padding-top: 1.25rem; }
    .site-footer-grid { grid-template-columns: 1fr; gap: 1rem; padding-bottom: 1rem; }
    .site-footer-bottom { align-items: flex-start; flex-direction: column; gap: .25rem; }
}

@media (max-width: 380px) {
    .site-nav .brand-copy strong { max-width: 8.5rem; }
    .student-dashboard-page { padding-inline: .28rem !important; }
    .student-dashboard-overview { padding: .75rem; }
    .student-dashboard-quick-links { grid-template-columns: 1fr; }
    .student-dashboard-facts { gap: .3rem; }
    .student-dashboard-shell .stat-card { min-height: 4.8rem; padding: .55rem !important; }
    .student-mini-calendar { padding: .3rem; }
    .student-mini-calendar-grid { gap: .08rem; }
    .student-mini-calendar-day, .student-mini-calendar-empty { min-height: 2rem; }
    .student-mini-calendar-weekdays { font-size: .46rem; }
    .student-mini-calendar-legend { display: grid; grid-template-columns: 1fr 1fr; }
    .student-lesson-summary { grid-template-columns: 2.7rem minmax(0,1fr); padding: .58rem; }
    .student-lesson-pair-number { width: 2.7rem; min-height: 2.9rem; }
    .student-lesson-pair-number strong { font-size: 1.3rem; }
    .submission-confirm-progress small { display: none; }
    .submission-confirm-progress { grid-template-columns: auto 1fr auto 1fr auto; }
}

/* Spacious journal workspace, scoped so other administration screens keep their layout. */
body:has([data-journal-workspace]),body:has([data-journal-workspace]) .admin-shell { min-width: 0; }
body:has([data-journal-workspace]) .admin-main { min-width: 0; }
.journal-workspace { width:100%;max-width:none;padding:18px;min-width:0; }
.auth-card.journal-workspace-card { max-width:none;width:100%;padding:20px;border-radius:16px; }
.journal-workspace .journal-grid-toolbar { flex-wrap:wrap; }
.journal-workspace .journal-grid-toolbar-actions { display:flex;flex-wrap:wrap;gap:12px; }
.journal-workspace .journal-grid-toolbar-actions form { flex-wrap:wrap; }
.journal-sheet-tools { display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px;background:#f1f5f9;border:1px solid #cbd5e1;border-radius:10px 10px 0 0; }
.journal-sheet-tool-group { display:flex;align-items:center;flex-wrap:wrap;gap:8px; }
.journal-sheet-tool-group > button:not(.btn) { border:1px solid #cbd5e1;background:#fff;border-radius:6px;min-width:32px;height:32px;font-weight:700; }
.journal-sheet-tool-group label { font-size:13px; }
.journal-sheet-tool-group input[type=range] { width:100px;accent-color:#166534; }
.journal-sheet-tool-group input[type=search] { width:200px; }
.journal-sheet-help { flex-basis:100%;color:#64748b;font-size:12px; }
.journal-workspace .journal-grid-scroll { height:calc(100vh - 320px);min-height:320px;max-height:none;border:1px solid #94a3b8;border-radius:0 0 10px 10px;scrollbar-width:auto; }
.journal-workspace .journal-grid-table thead th { background:#e2e8f0; }
.journal-workspace .journal-grid-table thead th.journal-grid-lesson-head { background:#e8f5ec; }
.journal-workspace .journal-grid-table thead th.is-archived { background:#e2e8f0; }
.journal-workspace .journal-grid-table tbody tr:nth-child(even) > th,.journal-workspace .journal-grid-table tbody tr:nth-child(even) > td { background:#f8fafc !important; }
.journal-workspace .journal-grid-table tbody tr:hover > td { box-shadow:inset 0 0 0 1px #86b79a; }
.journal-workspace .journal-grid-name-col { width:240px;min-width:240px;max-width:240px; }
.journal-workspace .journal-grid-student-name strong { font-size:14px; }
.journal-workspace .journal-grid-status { font-size:13px;padding:5px; }
.journal-workspace .journal-grid-grade { font-size:17px;width:55px;padding:4px; }
.journal-workspace .journal-grid-editor { min-height:76px;padding:7px; }
.journal-workspace .journal-grid-editable-table .journal-grid-cell { height:76px;min-height:76px; }
.journal-workspace .journal-grid-lesson-link > strong { font-size:13px; }
.journal-workspace .journal-grid-lesson-link > small { font-size:12px; }
.journal-workspace .journal-grid-lesson-meta { font-size:12px; }
.journal-workspace .journal-grid-edit-hint { display:none; }
.journal-workspace .journal-grid-live-toggle input:focus-visible + span { outline:3px solid #166534; }
.journal-workspace .journal-grid-cell:focus-within { outline:2px solid #166534;outline-offset:-2px; }
.journal-column-resize { position:absolute;right:0;top:0;width:10px;height:100%;cursor:col-resize;touch-action:none;z-index:8; }
.journal-column-resize:hover,.journal-column-resize:focus-visible { background:#16653450; }
body.journal-is-expanded { overflow:hidden; }
.journal-workspace.is-expanded { position:fixed;inset:0;z-index:10000;background:#edf1f5;overflow:auto;padding:10px; }
.journal-workspace.is-expanded .journal-workspace-card { min-height:calc(100vh - 20px); }
.journal-workspace.is-expanded .journal-grid-scroll { height:calc(100vh - 285px); }
@media(max-width:900px){.journal-workspace{padding:8px}.auth-card.journal-workspace-card{padding:12px}.journal-sheet-help{display:none}.journal-workspace .journal-grid-scroll{height:65vh}.journal-workspace.is-expanded .journal-grid-scroll{height:calc(100vh - 310px)}}
.journal-workspace .journal-grid-toolbar-actions .form-select { width:auto;max-width:240px; }
body:has([data-journal-workspace]) .admin-shell-content { padding:0; }
.journal-workspace .auth-card.journal-workspace-card { width:100%;max-width:none; }

/* Classic two-page journal, following the supplied class-journal spread. */
.journal-view-switch { display:inline-flex;border:1px solid #94a3b8;border-radius:8px;overflow:hidden;background:#fff; }
.journal-view-switch button { border:0;background:transparent;padding:6px 10px;font-size:13px;font-weight:700; }
.journal-view-switch button[aria-pressed="true"] { background:#166534;color:#fff; }
.journal-workspace[data-journal-mode="book"] .journal-grid-scroll { display:none; }
.journal-workspace[data-journal-mode="book"] .journal-sheet-help { display:none; }
.journal-book-controls { display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px 4px; }
.journal-book-controls label { display:flex;align-items:center;gap:8px;font-size:13px; }
.journal-book-controls [data-book-subject] { max-width:430px; }
.journal-book-controls [data-book-students] { width:auto; }
.journal-book-controls > small { flex-basis:100%;color:#64748b; }
.journal-book-pager { display:flex;align-items:center;gap:10px;font-size:13px; }
.journal-book-pager button { border:1px solid #94a3b8;background:#fff;border-radius:6px;min-width:34px;height:32px; }
.journal-book-pager button:disabled { opacity:.4; }
.journal-book-viewport { height:calc(100vh - 350px);min-height:400px;overflow:auto;background:#d8d4cb;border:1px solid #b0aaa0;border-radius:8px;overscroll-behavior:contain; }
.journal-workspace.is-expanded .journal-book-viewport { height:calc(100vh - 295px); }
.journal-book-spread { display:grid;grid-template-columns:1fr 1fr;gap:24px;width:max(100%,1660px);padding:24px;align-items:stretch; }
.journal-book-paper { position:relative;min-width:0;padding:30px 24px 40px;background:#fff;color:#000;box-shadow:0 2px 12px #0002;font-family:"Times New Roman",Times,serif;font-size:14px; }
.journal-book-paper h2 { font-family:inherit;font-size:16px;font-weight:700;line-height:1.4;margin:0;min-height:48px; }
.journal-book-paper h2 span { border-bottom:1px solid #000;font-weight:400; }
.journal-book-group { height:22px;font-size:12px;text-align:right; }
.journal-book-paper table { width:100%;table-layout:fixed;border-collapse:collapse;border-top:3px solid #000; }
.journal-book-paper th,.journal-book-paper td { border:1px solid #000;padding:0;text-align:center;background:#fff;color:#000;font-weight:400; }
.journal-book-marks thead tr:first-child { height:24px; }
.journal-book-marks thead tr:last-child { height:48px; }
.journal-book-marks tbody tr { height:24px; }
.journal-book-marks tbody tr.book-heavy > * { border-bottom-width:3px; }
.journal-book-marks .book-vertical { writing-mode:vertical-rl;transform:rotate(180deg);font-size:12px; }
.journal-book-marks .book-month { font-size:12px;white-space:nowrap;overflow:hidden; }
.journal-book-marks .book-diagonal { position:relative;vertical-align:bottom;text-align:left;background:linear-gradient(to top right,transparent calc(50% - .5px),#000 50%,transparent calc(50% + .5px)); }
.journal-book-marks .book-diagonal span { position:absolute;top:3px;right:5px;font-size:12px; }
.journal-book-marks .book-diagonal b { display:block;padding:0 4px 3px;font-weight:400;font-size:13px; }
.journal-book-marks .book-day { font-size:14px; }
.journal-book-marks .book-day small { display:block;font-size:9px; }
.journal-book-marks .book-student { text-align:left;padding:0 4px; }
.journal-book-marks .book-student span { display:flex;align-items:center;height:23px;overflow:hidden;line-height:11.5px;font-size:12px; }
.journal-book-marks button { display:block;width:100%;height:23px;border:0;padding:0;background:transparent;color:#000;font:15px/23px "Times New Roman",serif;cursor:pointer; }
.journal-book-marks button:hover:not(:disabled),.journal-book-marks button:focus-visible { background:#eaf4eb;outline:2px solid #166534;outline-offset:-2px; }
.journal-book-marks button:disabled { cursor:default;opacity:1; }
.journal-book-marks button.has-live { text-decoration:underline;text-decoration-color:#777;text-underline-offset:3px; }
.journal-book-marks .book-not-target { color:#999; }
.journal-book-lessons thead { height:36px; }
.journal-book-lessons tbody tr { height:41.5px; }
.journal-book-lessons td { vertical-align:middle; }
.journal-book-lessons td:nth-child(2),.journal-book-lessons td:nth-child(3) { text-align:left;padding:2px 6px; }
.journal-book-lessons td:first-child small,.journal-book-lessons td:nth-child(2)>small { display:block;font-size:10px;line-height:11px; }
.journal-book-lessons .book-topic-text,.journal-book-lessons .book-homework-text { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px;line-height:14px;color:#000;text-decoration:none;white-space:pre-wrap;overflow-wrap:anywhere; }
.journal-book-lessons .book-topic-text:hover { text-decoration:underline; }
.journal-book-paper footer { position:absolute;bottom:12px;left:24px;font-size:15px;font-weight:700; }
.journal-book-dialog { width:min(480px,95vw);border:2px solid #171717;border-radius:16px;padding:24px;color:#171717;background:#fff; }
.journal-book-dialog::backdrop { background:#0006; }
.journal-book-dialog > label { display:block;margin-top:12px; }
.journal-book-dialog .journal-book-live { display:flex;gap:8px;align-items:center; }
@media print {
 body:has([data-journal-mode="book"]) { background:#fff!important; }
 body:has([data-journal-mode="book"]) .admin-sidebar,body:has([data-journal-mode="book"]) .admin-topbar,body:has([data-journal-mode="book"]) .admin-shell-footer { display:none!important; }
 body:has([data-journal-mode="book"]) .journal-workspace-card > :not(form),body:has([data-journal-mode="book"]) [data-journal-grid-form] > :not([data-journal-book]),.journal-book-controls,.journal-book-dialog { display:none!important; }
 body:has([data-journal-mode="book"]) .admin-shell,body:has([data-journal-mode="book"]) .admin-main-area,body:has([data-journal-mode="book"]) .admin-shell-content { display:block!important;min-width:0!important;width:100%!important;overflow:visible!important; }
 .journal-workspace[data-journal-mode="book"],.journal-workspace[data-journal-mode="book"] .journal-workspace-card { position:static!important;padding:0!important;border:0!important;box-shadow:none!important;width:100%!important; }
 .journal-book-viewport { height:auto!important;min-height:0!important;overflow:visible!important;background:#fff!important;border:0!important; }
 .journal-book-spread { display:block!important;width:100%!important;padding:0!important;zoom:1!important; }
 .journal-book-paper { break-after:page;page-break-after:always;box-shadow:none!important;padding:0 0 25px!important; }
 .journal-book-paper:last-child { break-after:auto;page-break-after:auto; }
 .journal-book-paper h2 { font-size:12pt; }
 .journal-book-paper table { width:100%!important; }
}
@media print {
 .journal-book-marks col { width:auto!important; }
 .journal-book-marks col:first-child { width:3%!important; }
 .journal-book-marks col:nth-child(2) { width:30%!important; }
 .journal-book-marks tbody tr { height:20px!important; }
 .journal-book-marks .book-student span,.journal-book-marks button { height:19px!important;line-height:10px!important;font-size:10px!important; }
 .journal-book-lessons tbody tr { height:32px!important; }
 .journal-book-lessons .book-topic-text,.journal-book-lessons .book-homework-text { font-size:10px!important;line-height:11px!important; }
}
@media print {
 @page classic-journal { size:A4 portrait;margin:10mm; }
 .journal-book-paper { page:classic-journal; }
}
@media print {
 .journal-book-marks th,.journal-book-marks td { font-size:10px!important;line-height:12px!important; }
 .journal-book-marks thead th { font-size:11px!important; }
 .journal-book-paper footer { position:static!important;margin-top:6px;line-height:16px;font-size:12px; }
}

.book-quick-add { position:absolute;right:24px;top:4px;border:1px solid #166534;border-radius:5px;background:#f0fdf4;color:#166534;padding:2px 8px;font:12px/18px system-ui,sans-serif; }
.journal-book-lessons .book-edit-text { width:100%;padding:0;border:0;background:transparent;text-align:left;font-family:inherit;cursor:pointer; }
.journal-book-lessons .book-edit-text:hover:not(:disabled),.journal-book-lessons .book-edit-text:focus-visible { background:#eaf4eb;outline:1px solid #166534; }
.journal-book-lessons .book-edit-text:disabled { cursor:default;opacity:1; }
.journal-book-lessons .book-edit-text.is-empty { color:#999;font-size:11px;font-style:italic; }
.book-empty-add { border:0;background:transparent;color:#166534;font:12px "Times New Roman",serif;cursor:pointer; }
.journal-lesson-dialog { width:min(580px,96vw);max-height:90vh;overflow:auto; }
.journal-lesson-dialog label { display:block;margin-top:10px; }
.journal-lesson-dialog label[hidden],.journal-lesson-dialog div[hidden],.journal-lesson-dialog button[hidden],.journal-lesson-dialog small[hidden] { display:none!important; }
.journal-lesson-dialog [data-quick-lesson-context] { color:#64748b;font-size:13px; }
@media print {
 .book-quick-add,.book-empty-add,.journal-lesson-dialog { display:none!important; }
 .journal-book-lessons .book-edit-text.is-empty { visibility:hidden; }
}

.journal-book-marks .book-marker-name { text-align:left; }
.journal-book-marks .book-marker-name:hover:not(:disabled) { background:transparent; }
.journal-book-marks .book-marker-date { height:46px;line-height:16px;font-size:14px; }
.journal-book-lessons .book-marker-date { display:block;width:100%;height:38px;padding:0;border:0;background:transparent;color:inherit;font-family:inherit;font-size:14px;line-height:15px;cursor:pointer; }
.journal-book-lessons .book-marker-date:hover,.journal-book-lessons .book-marker-date:focus-visible { outline:1px solid #777;outline-offset:-1px; }
.journal-book-marks tr.book-row-highlight > th,.journal-book-marks tr.book-row-highlight > td,
.journal-book-marks .book-column-highlight,
.journal-book-lessons tr.book-lesson-highlight > td { background:#dedede; }
.journal-book-marks tr.book-row-highlight > .book-column-highlight { background:#bcbcbc; }
@media print {
 .book-clear-markers { display:none!important; }
 .journal-book-marks tr.book-row-highlight > th,.journal-book-marks tr.book-row-highlight > td,
 .journal-book-marks .book-column-highlight,.journal-book-lessons tr.book-lesson-highlight > td { background:#fff!important; }
 .journal-book-lessons .book-marker-date { height:28px!important;font-size:10px!important;line-height:11px!important; }
}
.journal-book-marks button.book-keyboard-active { outline:2px solid #166534;outline-offset:-2px;background:rgba(22,101,52,.10); }
@media print { .journal-book-marks button.book-keyboard-active { outline:none!important;background:transparent!important; } }


/* Live presentation: presenter tools and one-time slide import. */
.live-run-connection.is-disconnected,.student-live-connection.is-disconnected{color:#b45309}
.live-audience-number{display:flex;align-items:baseline;gap:.7rem;margin:.6rem 0}
.live-audience-number strong{font-size:2.6rem;line-height:1;font-variant-numeric:tabular-nums}
.live-audience-number span,.live-audience-card small{color:#64748b}
.live-upcoming-card [data-live-upcoming]{display:grid;gap:1rem}
.live-upcoming-slide{overflow:hidden;border:1px solid #dbe2ea;border-radius:10px;background:#f8fafc}
.live-upcoming-slide img{display:block;width:100%;max-height:190px;object-fit:contain;background:#e2e8f0}
.live-upcoming-slide span{display:block;padding:.45rem .65rem;font-size:.78rem;color:#475569}
.live-upcoming-text{padding:1rem;font-weight:700;overflow-wrap:anywhere;max-height:140px;overflow:auto}
.is-controlling .live-stage-controls{opacity:.6;pointer-events:none}
.live-import-choose{display:flex;gap:.6rem;margin:1rem 0;align-items:center}
.live-import-choose input{min-width:0}
.live-import-choose button{flex-shrink:0}
.live-import-dialog{width:min(1100px,94vw);max-height:90vh;overflow:auto;border:1px solid #cbd5e1;border-radius:18px;padding:1.4rem;color:#0f172a;background:#fff}
.live-import-dialog::backdrop,.live-import-image-dialog::backdrop{background:rgba(15,23,42,.75)}
.live-import-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.live-import-dialog h2{font-size:1.35rem;margin:.35rem 0}
.live-import-dialog progress{display:block;width:100%;height:12px;accent-color:#16a34a;margin-bottom:1rem}
.live-import-previews{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem}
.live-import-preview{display:block;padding:0;overflow:hidden;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc;text-align:left;cursor:zoom-in}
.live-import-preview img{width:100%;height:140px;object-fit:contain;background:#e2e8f0}
.live-import-preview span{display:block;padding:.4rem .6rem}
.live-import-dialog-actions{position:sticky;bottom:-1.4rem;background:#fff;padding:1rem 0 0;margin-top:1rem;border-top:1px solid #e2e8f0;display:flex;justify-content:flex-end}
.live-import-error{color:#b91c1c;white-space:pre-wrap;margin-top:1rem}
.live-import-image-dialog{padding:.8rem;border:0;border-radius:12px;background:#0f172a;max-width:96vw;max-height:96vh}
.live-import-image-dialog img{display:block;max-width:90vw;max-height:82vh;object-fit:contain;margin-top:.6rem}
.live-import-render-host{position:fixed;left:-10000px;top:0;width:1920px;pointer-events:none;background:#fff;color:#000;z-index:-1}
@media(max-width:600px){.live-import-choose{flex-direction:column;align-items:stretch}.live-import-dialog{padding:1rem}.live-import-previews{grid-template-columns:repeat(2,minmax(0,1fr))}.live-import-preview img{height:100px}}


/* A book journal can contain any selection of subjects. */
.book-subject-picker{display:flex;align-items:center;gap:.65rem;max-width:520px;text-align:left;white-space:normal}
.book-subject-picker>span:first-child{font-size:11px;color:#64748b}
.book-subject-picker strong{max-width:330px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.book-subjects-dialog{width:min(620px,95vw);max-height:90vh;overflow:auto}
.book-subjects-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:1rem 0 .5rem}
.book-subjects-actions output{margin-left:auto;font-size:.85rem;color:#475569}
.book-subjects-list{max-height:45vh;min-height:100px;overflow:auto;border:1px solid #cbd5e1;border-radius:8px}
.book-subjects-list .book-subject-option{display:flex;align-items:flex-start;gap:.7rem;padding:.75rem;margin:0;border-bottom:1px solid #e2e8f0;cursor:pointer}
.book-subject-option:last-child{border-bottom:0}
.book-subject-option:has(input:checked){background:#f0fdf4}
.book-subject-option input{width:18px;height:18px;margin-top:2px;accent-color:#166534;flex-shrink:0}
.book-subject-option span{overflow-wrap:anywhere}
.book-subject-option small{display:block;color:#64748b;font-size:.75rem;margin-top:.15rem}
.journal-book-paper .book-subject-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:600px){.book-subject-picker{width:100%;max-width:100%}.book-subject-picker strong{min-width:0;max-width:65vw}}
