/* Teacher's Diary */
:root {
    --td-bg: #120f0c;
    --td-surface: #1b1712;
    --td-ink: #f6efe2;
    --td-muted: #b7a88c;
    --td-gold: #FFD700;
    --td-paper: #edd9a3;
    --td-paper-ink: #1c1508;
    --td-line: rgba(255, 215, 0, 0.32);
    --td-danger: #e24b4b;
    --td-success: #4ade80;
    --td-info: #4a90d9;
    --td-radius: 14px;
    --td-header: 60px;
    --td-nav: 68px;
    --td-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { min-height: 100%; }

body {
    font-family: var(--td-font);
    background-color: #120f0c;
    background-image:
        radial-gradient(1200px 420px at 50% -80px, rgba(255, 215, 0, 0.08), transparent 60%),
        repeating-linear-gradient(
            to bottom,
            transparent 0 31px,
            rgba(255, 215, 0, 0.035) 32px
        );
    color: var(--td-ink);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

.td-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-bottom: calc(var(--td-nav) + 28px + env(safe-area-inset-bottom));
}
.td-page {
    width: min(580px, 100%);
    margin: 0 auto;
    padding: 18px 16px 32px;
}
.td-header-inner {
    width: min(580px, 100%);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.td-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--td-header);
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #120f0c;
    border-bottom: 2px solid #FFD700;
}
.td-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-brand img {
    width: 36px; height: 36px; object-fit: contain;
    background: var(--td-paper); border-radius: 8px; padding: 3px;
    box-shadow: 0 0 0 1px rgba(255,215,0,0.45);
}
.td-brand-name {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.td-header-actions { display: flex; align-items: center; gap: 8px; }
.td-icon-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: #1b1712;
    border: 1px solid rgba(255,215,0,0.45);
    color: #FFD700;
    position: relative;
}
.td-icon-btn:hover { background: rgba(255,215,0,0.14); }
.td-badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 999px; background: var(--td-danger); color: #fff;
    font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #120f0c;
}
.td-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #FFD700;
    color: #1c1508; font-weight: 800; font-size: 12px;
    overflow: hidden;
    box-shadow: 0 0 0 2px #120f0c, 0 0 0 4px #FFD700;
}
.td-avatar img { width: 100%; height: 100%; object-fit: cover; }

.td-dock {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 50;
    height: calc(var(--td-nav) + env(safe-area-inset-bottom));
    padding: 6px 10px env(safe-area-inset-bottom);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: #0e0c0a;
    border-top: 2px solid #FFD700;
    box-shadow: 0 -12px 30px rgba(0,0,0,0.35);
}
.td-dock a {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; color: #8b7d64; font-size: 10px; font-weight: 700;
    position: relative;
}
.td-dock a i {
    width: 52px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    border-radius: 16px;
}
.td-dock a.active { color: #FFD700; }
.td-dock a.active i {
    background: #FFD700;
    color: #1c1508;
}

.td-kicker { display: none; }
.td-title {
    font-size: 22px; font-weight: 800;
    line-height: 1.15; color: #fff; margin-bottom: 16px;
    letter-spacing: -0.03em;
}
.td-sub { color: var(--td-muted); font-size: 13px; margin-bottom: 14px; }
.td-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 6px 0 14px;
}
.td-section-head h2 {
    font-size: 16px; font-weight: 800; color: #fff;
}
.td-link { color: #FFD700; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

.td-card {
    background: linear-gradient(180deg, #221c16 0%, #17130f 100%);
    border: 1px solid rgba(255,215,0,0.28);
    border-radius: var(--td-radius);
    box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.td-back {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    color: #1c1508; font-size: 13px;
    border-radius: 50%;
    border: 0; background: #FFD700;
    margin-bottom: 14px;
}

.td-chip {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700;
    padding: 4px 8px; border-radius: 999px;
    background: rgba(255,215,0,0.08); color: #efe4cc;
    border: 1px solid rgba(255,215,0,0.2);
}
.td-chip.gold { background: #FFD700; color: #1c1508; border: 0; }
.td-chip.photo, .td-chip.video { background: #1c1508; color: #efe4cc; border-color: rgba(28,21,8,0.2); }

.td-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 16px; border: 0; border-radius: 12px;
    font-size: 14px; font-weight: 800; cursor: pointer;
}
.td-btn-gold {
    background: #FFD700;
    color: #1c1508;
    box-shadow: 0 8px 18px rgba(255,215,0,0.18);
}
.td-btn-ghost {
    background: #221c16;
    color: #fff;
    border: 1px solid rgba(255,215,0,0.22);
}
.td-btn-danger { background: #e24b4b; color: #fff; box-shadow: none; }
.td-btn:disabled {
    background: #2a241c;
    color: #6f6554;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
}
.td-btn:hover:not(:disabled) { transform: translateY(-1px); }

.td-empty {
    text-align: center; padding: 46px 20px; color: var(--td-muted);
    border: 1px dashed rgba(255,215,0,0.35); border-radius: var(--td-radius);
    background: rgba(255,215,0,0.04);
}
.td-empty i { font-size: 32px; color: #FFD700; margin-bottom: 10px; display: block; }
.td-empty h3 { color: #fff; font-size: 16px; margin-bottom: 4px; }

.td-hero {
    position: relative;
    overflow: hidden;
    height: 180px;
    border-radius: 18px;
    margin: 0 0 24px;
    border: 1px solid rgba(255,215,0,0.32);
    background: #17130f;
    padding: 0;
    box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}
.td-hero img {
    width: 100%; height: 180px; object-fit: cover;
    background: #17130f;
}

.td-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.td-tile {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: #17130f;
    border: 1px solid rgba(255,215,0,0.38);
    border-radius: 18px;
    padding: 0;
    aspect-ratio: 1 / 1;
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.td-tile::before {
    content: "";
    display: block;
    width: 100%;
    padding-top: 100%;
}
@supports (aspect-ratio: 1 / 1) {
    .td-tile::before { content: none; display: none; padding: 0; }
}
.td-tile:hover {
    transform: translateY(-5px);
    border-color: #FFD700;
    box-shadow: 0 16px 32px rgba(255,215,0,0.12), 0 12px 24px rgba(0,0,0,0.35);
}
.td-tile img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    background: #fff;
    z-index: 1;
    transition: transform 0.4s ease;
}
.td-tile:hover img { transform: scale(1.06); }
.td-tile-overlay {
    position: absolute;
    left: 10px; right: 10px; bottom: 10px;
    z-index: 2;
    padding: 10px 12px;
    background: rgba(18, 15, 12, 0.9);
    border: 1px solid rgba(255,215,0,0.35);
    border-radius: 12px;
}
.td-tile-name {
    font-weight: 800; font-size: 13px; text-align: center;
    color: #FFD700;
    letter-spacing: -0.01em;
}
.td-tile.generate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 1;
    min-height: 0;
    background:
        radial-gradient(circle at 50% 32%, #2c2418 0%, #14110c 68%);
    color: #FFD700;
    border-color: #FFD700;
    padding: 18px 12px;
}
.td-tile.generate::before { content: none; padding: 0; }
.td-tile.generate .td-tile-overlay { display: none; }
.td-tile.generate .td-tile-name {
    position: relative;
    color: #FFD700;
    font-size: 14px;
}
.td-tile.generate i {
    font-size: 26px;
    width: 62px; height: 62px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid #FFD700;
    border-radius: 50%;
    background: rgba(255,215,0,0.08);
    box-shadow: 0 0 0 6px rgba(255,215,0,0.06);
}
.td-crown {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    background: #FFD700;
    color: #1c1508; font-size: 9px; font-weight: 800;
    padding: 4px 8px; border-radius: 999px;
}

.td-lesson {
    display: grid; grid-template-columns: 108px 1fr; min-height: 108px;
    overflow: hidden; margin-bottom: 12px;
    background: var(--td-paper);
    border: 1px solid #d8c07a;
    color: var(--td-paper-ink);
    box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}
.td-lesson-thumb { position: relative; width: 108px; min-width: 108px; height: 108px; background: #d9cbaa; overflow: hidden; }
.td-lesson-thumb img, .td-lesson-thumb .ph { display: block; width: 100%; height: 100%; min-height: 108px; object-fit: cover; object-position: center; }
.td-lesson-thumb .ph { display: flex; align-items: center; justify-content: center; color: #1c1508; font-size: 22px; }
.td-count {
    position: absolute; left: 8px; bottom: 8px;
    background: #1c1508; border: 0;
    color: #FFD700; font-size: 10px; font-weight: 800;
    padding: 3px 7px; border-radius: 999px;
}
.td-lesson-body { padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.td-lesson-body h3 { font-size: 15px; font-weight: 800; line-height: 1.25; color: var(--td-paper-ink); }
.td-lesson-body p {
    color: #6a5a3c; font-size: 12px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.td-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.td-lesson .td-chip {
    background: #1c1508;
    color: #efe4cc;
    border: 0;
}
.td-lesson .td-chip.gold {
    background: #FFD700;
    color: #1c1508;
}

.td-stage {
    position: relative; background: #0a0908; border: 1px solid var(--td-line);
    border-radius: 16px; overflow: hidden; min-height: 240px;
    display: flex; align-items: center; justify-content: center; margin: 10px 0 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}
.td-stage img { width: 100%; max-height: 70vh; object-fit: contain; }
.td-video { position: relative; width: 100%; padding-bottom: 56.25%; }
.td-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.td-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 50%;
    background: #FFD700; color: #1c1508;
    display: flex; align-items: center; justify-content: center;
    border: 0; z-index: 2;
}
.td-arrow.prev { left: 10px; }
.td-arrow.next { right: 10px; }
.td-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; }
.td-thumb { flex: 0 0 78px; height: 58px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; position: relative; }
.td-thumb.active { border-color: #FFD700; }
.td-thumb img { width: 100%; height: 100%; object-fit: cover; }
.td-thumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.28); }
.td-actions { display: flex; gap: 10px; }
.td-actions .td-btn { flex: 1; }
.td-progress { display: flex; justify-content: space-between; color: var(--td-muted); font-size: 13px; font-weight: 700; }
.td-progress span { color: #FFD700; }

.td-lightbox { display: none; position: fixed; inset: 0; background: rgba(12,10,8,0.96); z-index: 80; align-items: center; justify-content: center; }
.td-lightbox.show { display: flex; }
.td-lightbox img { max-width: 92%; max-height: 78vh; border-radius: 8px; }
.td-lightbox .close { position: absolute; top: 16px; right: 18px; color: #fff; font-size: 34px; cursor: pointer; }

.td-hero-card {
    padding: 26px 16px 22px; text-align: center; margin-bottom: 20px;
    background:
        radial-gradient(circle at 50% 18%, rgba(255,215,0,0.16), transparent 42%),
        linear-gradient(180deg, #221c16 0%, #17130f 100%);
}
.td-avatar-lg {
    width: 86px; height: 86px; margin: 0 auto 12px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #120f0c;
    border: 3px solid #FFD700;
    box-shadow: 0 0 0 6px rgba(255,215,0,0.12);
    font-size: 24px; font-weight: 800; color: #FFD700;
}
.td-hero-card h2 { font-size: 20px; font-weight: 800; }
.td-coin {
    width: 132px; height: 132px; margin: 0 auto 12px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 32% 28%, #ffe98a, #FFD700 42%, #c9a227 78%, #8a7014 100%);
    box-shadow:
        0 0 0 6px #17130f,
        0 0 0 8px rgba(255,215,0,0.55),
        0 12px 24px rgba(255,215,0,0.18);
}
.td-balance {
    font-size: 42px; font-weight: 800; line-height: 1; color: #1c1508; font-variant-numeric: tabular-nums;
}
.td-hero-card .td-sub { color: #d8c07a; }
.td-row {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 15px 0; border-bottom: 1px solid rgba(255,215,0,0.1);
}
.td-row:last-child { border-bottom: 0; }
.td-row .label { color: var(--td-muted); display: flex; align-items: center; gap: 10px; font-size: 14px; }
.td-row .label i {
    width: 28px; height: 28px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,215,0,0.12); color: #FFD700;
}
.td-row .value { font-weight: 800; color: #fff; }

.td-list { overflow: hidden; }
.td-task {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255,215,0,0.1);
    color: #fff;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
}
.td-task:last-child { border-bottom: 0; }
.td-task:disabled { cursor: default; }
.td-task:hover:not(:disabled) { background: rgba(255,215,0,0.05); }
.td-checkmark {
    width: 20px; height: 20px; flex-shrink: 0;
    border: 1.5px solid #FFD700;
    border-radius: 6px;
    background: transparent;
}
.td-task.is-done .td-checkmark {
    background: #FFD700;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%231c1508' stroke-width='2' d='M2 6.2l2.6 2.6L10 3.4'/%3E%3C/svg%3E");
    background-size: 12px; background-repeat: no-repeat; background-position: center;
}
.td-task-name { flex: 1; font-weight: 700; }
.td-task.is-done .td-task-name { color: #7d715c; text-decoration: line-through; }
.td-task-pts { color: #FFD700; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.td-task.is-done .td-task-pts { color: #6f6554; }

.td-mission { display: none; }

.td-contact {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; margin-bottom: 10px;
    position: relative;
}
.td-contact::after {
    content: "";
    width: 8px; height: 8px;
    border-right: 2px solid #FFD700;
    border-top: 2px solid #FFD700;
    transform: rotate(45deg);
    margin-left: auto;
}
.td-contact i.brand {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
    flex-shrink: 0;
}
.td-contact.telegram i.brand { background: #229ed9; }
.td-contact.viber i.brand { background: #7360f2; }
.td-contact.gmail i.brand { background: #c44536; }
.td-contact h3 { font-size: 16px; color: #fff; font-weight: 800; }
.td-contact p { color: var(--td-muted); font-size: 12px; }
.td-faq { padding: 6px 18px 8px; }
.td-faq-item { padding: 14px 0; border-bottom: 1px solid rgba(255,215,0,0.1); }
.td-faq-item:last-child { border-bottom: 0; }
.td-faq-item h4 { font-size: 14px; margin-bottom: 4px; }
.td-faq-item p { color: var(--td-muted); font-size: 13px; }

body.td-auth {
    display: flex; align-items: center; justify-content: center;
    padding: 28px 16px; min-height: 100vh;
}
.td-auth-card {
    width: min(400px, 100%); overflow: hidden; position: relative; z-index: 1;
    border-radius: 18px;
}
.td-auth-top {
    padding: 32px 22px 20px; text-align: center;
    background: var(--td-paper);
    border-bottom: 0;
}
.td-auth-top img {
    width: 72px; height: 72px; object-fit: contain; margin: 0 auto 12px;
    background: #fff; border-radius: 16px; padding: 6px;
    box-shadow: 0 8px 18px rgba(28,21,8,0.12);
}
.td-auth-top h1 { font-size: 22px; font-weight: 800; color: var(--td-paper-ink); }
.td-auth-body { padding: 24px 22px 28px; }
.td-field { margin-bottom: 14px; position: relative; }
.td-field label { display: block; font-size: 12px; color: #FFD700; font-weight: 800; margin-bottom: 7px; }
.td-field input, .td-field select, .td-field textarea {
    width: 100%; padding: 13px 14px; border-radius: 12px;
    background: #120f0c; border: 1px solid rgba(255,215,0,0.22);
    color: #fff; font-size: 15px; outline: none;
}
.td-field input:focus, .td-field select:focus, .td-field textarea:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255,215,0,0.12);
}
.td-toggle {
    position: absolute; right: 12px; bottom: 13px; background: none; border: 0;
    color: var(--td-muted); cursor: pointer; font-size: 15px;
}
.td-alert { padding: 11px 12px; border-radius: 12px; margin-bottom: 14px; font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.td-alert.error { background: rgba(226,75,75,0.12); color: #f0a3a3; border: 1px solid rgba(226,75,75,0.28); }
.td-alert.ok { background: rgba(74,222,128,0.1); color: #b8e0c0; border: 1px solid rgba(74,222,128,0.25); }
.td-fine { text-align: center; margin-top: 16px; color: var(--td-muted); font-size: 13px; }
.td-fine a { color: #FFD700; font-weight: 800; }

.td-tabs {
    display: flex; gap: 0; padding: 4px; background: #17130f;
    border: 1px solid var(--td-line); border-radius: 14px; margin-bottom: 14px; overflow: hidden;
}
.td-tabs a { flex: 1; text-align: center; padding: 9px; border-radius: 10px; color: #8b7d64; font-size: 13px; font-weight: 700; }
.td-tabs a.active { background: #FFD700; color: #1c1508; }

.td-note {
    display: flex; gap: 12px; padding: 16px;
    margin-bottom: 10px;
}
.td-note.unread { background: linear-gradient(180deg, #2a2218 0%, #17130f 100%); }
.td-note.priority-urgent,
.td-note.priority-high { border-left: 0; }
.td-note-icon {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    margin-top: 6px;
    background: #3a342a;
    display: block;
    font-size: 0;
    overflow: hidden;
}
.td-note-icon i { display: none; }
.td-note.unread .td-note-icon { background: #FFD700; box-shadow: 0 0 0 4px rgba(255,215,0,0.15); }
.td-note h3 { font-size: 15px; margin-bottom: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.td-note p { color: var(--td-muted); font-size: 13px; }
.td-note-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: #7d715c; }

.td-modal { display: none; position: fixed; inset: 0; background: rgba(12,10,8,0.82); z-index: 90; align-items: center; justify-content: center; padding: 18px; }
.td-modal.show { display: flex; }
.td-modal-card { width: min(400px, 100%); overflow: hidden; }
.td-modal-head { padding: 16px 16px 12px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--td-line); }
.td-modal-head h3 { font-size: 16px; font-weight: 800; }
.td-modal-body { padding: 16px; }
#tdConfirm { z-index: 96; }
.td-confirm .td-modal-head { border-bottom: 0; padding-bottom: 0; }
.td-confirm .td-modal-body { padding-top: 8px; }
.td-confirm-msg {
    color: var(--td-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.td-confirm .td-actions {
    flex-direction: row;
    gap: 8px;
}
.td-confirm .td-actions .td-btn { flex: 1; }
.td-toast {
    position: fixed; left: 50%; bottom: calc(var(--td-nav) + 14px);
    transform: translateX(-50%) translateY(16px);
    background: #FFD700; border: 0; color: #1c1508;
    padding: 11px 16px; border-radius: 999px; opacity: 0; pointer-events: none;
    transition: 0.2s ease; z-index: 100; font-size: 13px; font-weight: 800;
}
.td-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.td-stack { display: flex; flex-direction: column; gap: 10px; }
.td-pad { padding: 16px 18px; }
.td-mb { margin-bottom: 16px; }

.td-ws-grid { display: grid; gap: 8px; }
.td-problem { padding: 12px 14px; font-size: 15px; }
.td-problem b { color: #FFD700; margin-right: 8px; }
.td-answer { color: var(--td-info); font-weight: 700; margin-left: 8px; }
.td-check { display: flex; align-items: center; gap: 8px; color: var(--td-muted); font-size: 14px; }

@media (min-width: 760px) {
    .td-hero, .td-hero img { height: 200px; }
    .td-dock { width: 100%; max-width: 580px; left: 50%; right: auto; transform: translateX(-50%); }
}

@media (max-width: 480px) {
    .td-lesson { grid-template-columns: 92px 1fr; }
    .td-actions { flex-direction: column; }
    .td-confirm .td-actions { flex-direction: row; }
    .td-hero, .td-hero img { height: 156px; }
}

@media print {
    .td-header, .td-dock, .td-back, .no-print { display: none !important; }
    body { background: #fff; color: #111; }
    .td-shell { padding: 0; }
    .td-page { width: 100%; max-width: none; }
    .td-card, .td-problem, .td-lesson { background: #fff; border-color: #ddd; color: #111; box-shadow: none; }
}
