/* ============================================================
   Platforma Korepetycje — Kurs (Design System v4)
   Spójny ze style.css: fiolet #8c52ff / mięta #7ac1a4 · Manrope
   ============================================================ */

:root {
    --purple-50: #faf8ff;  --purple-100: #f3edff; --purple-200: #e7daff;
    --purple-300: #c9a8ff; --purple-400: #a97bff; --purple-500: #8c52ff;
    --purple-600: #7f3ff5; --purple-700: #6f2fe8;
    --mint-50: #f3faf7;  --mint-100: #e2f3eb; --mint-200: #c8e8da;
    --mint-300: #97d1b4; --mint-400: #a6e5d2; --mint-500: #7ac1a4;
    --mint-600: #5ea887; --mint-700: #4a9370;
    --gray-50: #faf9fc;  --gray-100: #f3f2f7; --gray-200: #e7e5ee;
    --gray-300: #d2cfdd; --gray-400: #9c97ac; --gray-500: #6f6a82;
    --gray-600: #524d66; --gray-700: #3b3650; --gray-800: #262138;
    --gray-900: #16121f; --white: #ffffff;
    --red-100: #fee2e2; --red-500: #ef4444;
    --yellow-100: #fef3c7; --yellow-500: #fbbf24; --yellow-700: #b45309;
    --radius-sm: 0.5rem; --radius-md: 0.75rem; --radius-lg: 1rem;
    --radius-xl: 1.5rem; --radius-2xl: 2rem;
    --shadow-sm: 0 1px 2px rgba(22, 18, 31, 0.05);
    --shadow-md: 0 4px 12px -2px rgba(22, 18, 31, 0.08), 0 2px 4px -2px rgba(22, 18, 31, 0.05);
    --shadow-lg: 0 12px 28px -6px rgba(22, 18, 31, 0.11), 0 4px 8px -4px rgba(22, 18, 31, 0.06);
    --shadow-xl: 0 24px 48px -10px rgba(22, 18, 31, 0.14), 0 8px 16px -8px rgba(22, 18, 31, 0.08);
    --shadow-purple: 0 12px 36px -12px rgba(140, 82, 255, 0.45);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --grad-brand: linear-gradient(135deg, var(--purple-600), var(--purple-400));
    --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-800);
    background-color: var(--white);
    background-image:
        linear-gradient(rgba(22, 18, 31, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 18, 31, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(640px 420px at 88% -4%, rgba(140, 82, 255, 0.07), transparent 70%),
        radial-gradient(560px 400px at -6% 22%, rgba(122, 193, 164, 0.08), transparent 70%);
}
::selection { background: var(--purple-200); color: var(--purple-700); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--purple-300); border-radius: 6px; border: 2px solid var(--gray-100); }
:focus-visible { outline: 3px solid rgba(140, 82, 255, 0.4); outline-offset: 2px; border-radius: 4px; }
button { font-family: inherit; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   Nagłówek — szklana pigułka (jak na stronie głównej)
   ============================================================ */
.header {
    position: fixed; top: 1rem; left: 50%; transform: translateX(-50%);
    width: min(95%, 1200px); z-index: 1000;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 100px;
    box-shadow: 0 8px 32px rgba(22, 18, 31, 0.08);
}
.header-inner {
    max-width: 1280px; width: 100%; margin: 0 auto; padding: 0 1.5rem;
    height: var(--header-h); display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-img { height: 44px; width: auto; max-width: 260px; display: block; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: var(--radius-lg);
    font-weight: 700; font-size: 0.875rem; cursor: pointer;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s, border-color 0.25s;
    border: none; text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.8rem; }
.btn-large { padding: 0.875rem 1.5rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-purple); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px -12px rgba(140, 82, 255, 0.55); }
.btn-outline { background: transparent; color: var(--purple-600); border: 2px solid var(--purple-200); }
.btn-outline:hover { background: var(--purple-50); border-color: var(--purple-400); }
.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }
.btn-white { background: #fff; color: var(--purple-700); border: 1px solid var(--purple-200); font-weight: 700; }
.btn-white:hover { background: var(--purple-50); box-shadow: var(--shadow-md); }
.hidden { display: none !important; }

.cart-btn {
    position: relative; width: 38px; height: 38px; border-radius: var(--radius-md);
    background: var(--gray-100); display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none; color: var(--gray-700);
    transition: background 0.25s, color 0.25s;
}
.cart-btn:hover { background: var(--purple-100); color: var(--purple-700); }
.cart-count {
    position: absolute; top: -4px; right: -4px; width: 18px; height: 18px;
    background: var(--grad-brand); color: #fff; border-radius: 50%;
    font-size: 0.65rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   Układ kursu
   ============================================================ */
.course-layout {
    display: grid; grid-template-columns: 320px 1fr;
    min-height: 100vh; padding-top: calc(var(--header-h) + 2rem);
}
@media (max-width: 1024px) {
    .course-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .mobile-nav-toggle { display: flex !important; }
}

.sidebar {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    border-right: 1px solid var(--gray-200);
    height: calc(100vh - var(--header-h) - 2rem);
    position: sticky; top: calc(var(--header-h) + 2rem);
    overflow-y: auto; display: flex; flex-direction: column;
}
.sidebar-header { padding: 1.25rem 1.25rem 0.75rem; display: flex; align-items: center; justify-content: space-between; }
.sidebar-title { font-size: 1.1rem; font-weight: 800; color: var(--gray-900); }
.back-btn {
    width: 32px; height: 32px; border-radius: var(--radius-md); border: none;
    background: var(--gray-100); cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: var(--gray-600);
    transition: background 0.2s, color 0.2s, transform 0.25s var(--ease-out);
}
.back-btn:hover { background: var(--purple-200); color: var(--purple-700); transform: translateX(-2px); }
.sidebar-help {
    margin: 0 1rem 1rem; padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--purple-100), var(--purple-50));
    border-radius: var(--radius-lg);
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.875rem; font-weight: 700; color: var(--purple-700);
    cursor: pointer; border: 1px solid var(--purple-200);
    transition: background 0.2s;
}
.sidebar-help:hover { background: var(--purple-200); }
.sidebar-help svg { width: 20px; height: 20px; flex-shrink: 0; }

/* --- Rozdziały i lekcje --- */
.chapter { border-bottom: 1px solid var(--gray-200); }
.chapter-header {
    padding: 0.875rem 1.25rem; font-weight: 800; font-size: 0.95rem; color: var(--gray-900);
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; transition: background 0.15s;
}
.chapter-header:hover { background: var(--gray-50); }
.chapter-header svg { width: 18px; height: 18px; color: var(--gray-400); transition: transform 0.3s var(--ease-out); flex-shrink: 0; }
.chapter.open .chapter-header svg { transform: rotate(180deg); }
.chapter-body { display: none; }
.chapter.open .chapter-body { display: block; }

.week { margin-bottom: 0.25rem; }
.week-label {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.7rem; font-weight: 800; color: var(--gray-500);
    text-transform: uppercase; letter-spacing: 0.06em;
    display: flex; align-items: center; justify-content: space-between;
}
.week-label svg { width: 14px; height: 14px; color: var(--gray-400); }

.lesson { border-bottom: 1px solid var(--gray-100); }
.lesson:last-child { border-bottom: none; }
.lesson-header-row {
    padding: 0.6rem 1.25rem 0.6rem 1.75rem;
    display: flex; align-items: center; gap: 0.75rem;
    cursor: pointer; transition: background 0.15s; position: relative;
}
.lesson-header-row:hover { background: var(--purple-50); }
.lesson-header-row.active { background: var(--purple-100); }
.lesson-header-row.active::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--purple-600); border-radius: 0 2px 2px 0;
}
.lesson-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--purple-100); color: var(--purple-700);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.7rem; flex-shrink: 0;
}
.lesson-info { flex: 1; min-width: 0; }
.lesson-title { font-weight: 700; font-size: 0.85rem; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-day { font-size: 0.7rem; color: var(--gray-400); font-weight: 500; }
.lesson-lock { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.lesson-parts { display: none; padding: 0.25rem 0 0.5rem; }
.lesson.open .lesson-parts { display: block; }
.part-item {
    padding: 0.4rem 1.25rem 0.4rem 3.25rem;
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.8rem; color: var(--gray-600);
    cursor: pointer; transition: color 0.15s, background 0.15s;
}
.part-item:hover { color: var(--purple-700); background: var(--purple-50); }
.part-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.part-item.locked { opacity: 0.5; cursor: not-allowed; }
.part-item.locked:hover { background: transparent; color: var(--gray-600); }

/* --- Treść główna --- */
.main-content { background: transparent; min-height: calc(100vh - var(--header-h) - 2rem); }
.content-inner { max-width: 900px; margin: 0 auto; padding: 2rem; }
@media (max-width: 640px) { .content-inner { padding: 1rem; } }

.preview-card {
    background: linear-gradient(135deg, var(--purple-50), #fdf4ff);
    border: 1px solid var(--purple-200);
    border-radius: var(--radius-2xl);
    padding: 2.5rem; margin-bottom: 2.5rem;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow-md);
}
.preview-card::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(140, 82, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}
.preview-label { font-size: 0.75rem; font-weight: 800; color: var(--purple-500); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.preview-title { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-bottom: 1rem; line-height: 1.2; letter-spacing: -0.015em; }
.preview-desc { color: var(--gray-600); margin-bottom: 1.5rem; max-width: 600px; line-height: 1.7; }
.preview-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.program-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.program-header svg { width: 24px; height: 24px; color: var(--purple-500); }
.program-title { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); }

.module-card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl); margin-bottom: 1rem; overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}
.module-card:hover { box-shadow: var(--shadow-md); border-color: var(--purple-200); }
.module-header {
    padding: 1.25rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; background: linear-gradient(90deg, var(--gray-50), #fff);
    border: none; width: 100%; font-family: inherit; font-size: 1rem; text-align: left;
}
.module-title { font-size: 1.05rem; font-weight: 800; color: var(--gray-900); }
.module-count { font-size: 0.85rem; color: var(--gray-500); margin-left: 0.5rem; font-weight: 500; }
.module-header svg { width: 20px; height: 20px; color: var(--purple-500); transition: transform 0.35s var(--ease-out); flex-shrink: 0; }
.module-card.open .module-header svg { transform: rotate(180deg); }
.module-body { display: none; padding: 0.5rem 1.5rem 1.5rem; }
.module-card.open .module-body { display: block; animation: fadeIn 0.35s var(--ease-out); }
.topic-group { margin-bottom: 1.25rem; }
.topic-group:last-child { margin-bottom: 0; }
.topic-title { font-weight: 800; font-size: 0.95rem; color: var(--gray-800); margin-bottom: 0.5rem; }
.topic-items { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.topic-tag {
    padding: 0.5rem 0.875rem; border-radius: var(--radius-md);
    font-size: 0.85rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 0.4rem;
    border: 1px solid var(--gray-200); background: var(--gray-50); color: var(--gray-700);
    cursor: pointer; transition: all 0.2s;
}
.topic-tag:hover { border-color: var(--purple-300); background: var(--purple-50); color: var(--purple-700); transform: translateY(-1px); }
.topic-tag.locked { opacity: 0.6; cursor: not-allowed; }
.topic-tag.locked:hover { border-color: var(--gray-200); background: var(--gray-50); color: var(--gray-700); transform: none; }
.topic-tag svg { width: 14px; height: 14px; flex-shrink: 0; }

/* --- Widok lekcji --- */
.lesson-view { animation: fadeIn 0.4s var(--ease-out); }
.lesson-breadcrumb { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; color: var(--gray-500); font-size: 0.875rem; flex-wrap: wrap; }
.lesson-breadcrumb a { color: var(--purple-600); text-decoration: none; font-weight: 700; }
.lesson-breadcrumb a:hover { text-decoration: underline; }
.lesson-view-title { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin-bottom: 1.5rem; letter-spacing: -0.015em; }
.lesson-video {
    background: var(--gray-900); border-radius: var(--radius-xl);
    aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
    color: #fff; margin-bottom: 2rem; position: relative; overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.play-overlay { text-align: center; padding: 2rem; }
.play-btn-big {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-500), var(--mint-500));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; cursor: pointer; border: none; color: #fff;
    box-shadow: 0 10px 40px -10px rgba(140, 82, 255, 0.5);
    transition: transform 0.3s var(--ease-out);
}
.play-btn-big:hover { transform: scale(1.1); }

.lesson-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--gray-200); padding-bottom: 0.5rem; flex-wrap: wrap; }
.tab-btn {
    padding: 0.625rem 1.25rem; border-radius: var(--radius-md); border: none;
    background: none; font-weight: 700; color: var(--gray-500);
    cursor: pointer; transition: all 0.2s; font-size: 0.9rem; font-family: inherit;
}
.tab-btn:hover { color: var(--purple-600); background: var(--purple-50); }
.tab-btn.active { color: var(--purple-700); background: var(--purple-100); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s var(--ease-out); }
.notes-area {
    width: 100%; min-height: 200px; padding: 1rem;
    border: 2px solid var(--gray-200); border-radius: var(--radius-lg);
    font-family: inherit; font-size: 1rem; resize: vertical; outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.notes-area:focus { border-color: var(--purple-400); box-shadow: 0 0 0 4px var(--purple-100); }
.hw-upload {
    border: 2px dashed var(--gray-300); border-radius: var(--radius-xl);
    padding: 3rem 2rem; text-align: center; cursor: pointer;
    background: var(--gray-50); transition: border-color 0.3s, background 0.3s;
}
.hw-upload:hover { border-color: var(--purple-400); background: var(--purple-50); }
.hw-upload svg { width: 48px; height: 48px; color: var(--purple-400); margin-bottom: 1rem; }

.locked-overlay {
    text-align: center; padding: 4rem 2rem;
    background: var(--gray-50); border-radius: var(--radius-2xl);
    border: 1px dashed var(--gray-300);
}
.locked-overlay svg { width: 64px; height: 64px; color: var(--gray-300); margin-bottom: 1rem; }
.locked-overlay h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--gray-900); }
.locked-overlay p { color: var(--gray-600); margin-bottom: 1.5rem; }

/* --- Toast --- */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.75rem; }
.toast {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 1rem 1.5rem; box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--mint-500);
    display: flex; align-items: center; gap: 0.75rem;
    animation: slideIn 0.35s var(--ease-out);
    min-width: 280px; font-weight: 600; font-size: 0.9rem; color: var(--gray-800);
}
.toast.error { border-left-color: var(--red-500); }

/* --- Mobilna nawigacja --- */
.mobile-nav-toggle {
    display: none; position: fixed; bottom: 1.5rem; left: 1.5rem; z-index: 100;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--grad-brand); color: #fff; border: none;
    box-shadow: var(--shadow-lg); cursor: pointer;
    align-items: center; justify-content: center;
}
.mobile-sidebar {
    position: fixed; top: calc(var(--header-h) + 2rem); left: 0; bottom: 0;
    width: 320px; max-width: 88vw;
    background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(14px);
    border-right: 1px solid var(--gray-200); z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease-out);
    overflow-y: auto;
}
.mobile-sidebar.open { transform: translateX(0); }
.overlay {
    position: fixed; inset: 0; background: rgba(22, 18, 31, 0.35); z-index: 998;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.overlay.open { opacity: 1; pointer-events: all; }

/* ============================================================
   Interaktywna tablica
   ============================================================ */
.board-toolbar {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    margin-bottom: 1rem; padding: 0.75rem 1rem;
    background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}
.board-color {
    width: 28px; height: 28px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 0 0 1px var(--gray-300);
    cursor: pointer; padding: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}
.board-color:hover { transform: scale(1.12); }
.board-color.active { box-shadow: 0 0 0 3px var(--purple-500); }
.board-tool {
    padding: 0.4rem 0.875rem; border-radius: var(--radius-md);
    border: 1px solid var(--gray-200); background: #fff;
    font-weight: 700; font-size: 0.8rem; font-family: inherit;
    cursor: pointer; color: var(--gray-700); transition: all 0.2s;
}
.board-tool:hover { background: var(--purple-50); border-color: var(--purple-300); color: var(--purple-700); }
.board-tool.active { background: var(--purple-100); border-color: var(--purple-300); color: var(--purple-700); }
.board-size { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 700; color: var(--gray-600); }
.board-size input[type="range"] { accent-color: var(--purple-600); width: 100px; }
.board-wrap { border: 2px solid var(--gray-200); border-radius: var(--radius-xl); overflow: hidden; background: #fff; }
.note-canvas {
    display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
    touch-action: none; cursor: crosshair;
    user-select: none; -webkit-user-select: none;
}

/* ============================================================
   Poziomy maturalne (tiery)
   ============================================================ */
.tier-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tier-dot.t1 { background: #34d399; }
.tier-dot.t2 { background: #fbbf24; }
.tier-dot.t3 { background: #8c52ff; }

.tier-legend {
    margin: 0 1rem 1rem; padding: 0.875rem 1rem;
    background: #fff; border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.tier-legend-title { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.6rem; }
.tier-legend-title svg { width: 16px; height: 16px; color: var(--purple-500); }
.tier-row { display: flex; align-items: center; gap: 0.55rem; font-size: 0.8rem; color: var(--gray-600); padding: 0.2rem 0; }
.tier-row b { color: var(--gray-900); }
.tier-note { margin-top: 0.55rem; padding-top: 0.55rem; border-top: 1px dashed var(--gray-200); font-size: 0.7rem; color: var(--gray-400); line-height: 1.5; }

.lesson-num.t1 { background: #34d399; color: #064e3b; }
.lesson-num.t2 { background: #fbbf24; color: #78350f; }
.lesson-num.t3 { background: #8c52ff; color: #fff; }
.part-item.t1::before, .part-item.t2::before, .part-item.t3::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.part-item.t1::before { background: #34d399; }
.part-item.t2::before { background: #fbbf24; }
.part-item.t3::before { background: #8c52ff; }
.part-item.locked::before { opacity: 0.4; }

.topic-tag.t1 { border-left: 4px solid #34d399; }
.topic-tag.t2 { border-left: 4px solid #fbbf24; }
.topic-tag.t3 { border-left: 4px solid #8c52ff; }

.tier-strip {
    display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
    margin-bottom: 1.5rem; padding: 0.75rem 1rem;
    background: #fff; border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 0.85rem; color: var(--gray-600);
}
.tier-strip-label { font-weight: 800; color: var(--gray-900); }
.tier-chip {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.3rem 0.8rem; background: var(--gray-50);
    border: 1px solid var(--gray-200); border-radius: 100px;
    font-size: 0.8rem; font-weight: 700; color: var(--gray-700);
}
.lesson-tier-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin: -0.5rem 0 1.5rem; padding: 0.4rem 0.95rem;
    border-radius: 100px; font-size: 0.8rem; color: var(--gray-700);
    background: var(--gray-50); border: 1px solid var(--gray-200);
}
.lesson-tier-chip.t1 { background: #ecfdf5; border-color: #34d399; }
.lesson-tier-chip.t2 { background: #fffbeb; border-color: #fbbf24; }
.lesson-tier-chip.t3 { background: #f5efff; border-color: #bfa1fc; }

/* ============================================================
   Responsywność + dostępność
   ============================================================ */
@media (max-width: 640px) {
    .logo-img { height: 36px; max-width: 180px; }
    .preview-card { padding: 1.75rem 1.25rem; }
    .preview-title { font-size: 1.5rem; }
    .lesson-view-title { font-size: 1.5rem; }
    .toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
    .toast { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.15s !important;
        scroll-behavior: auto !important;
    }
}
