* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f7f3ff;
    --text: #10091f;
    --muted: #666177;
    --card: rgba(255, 255, 255, 0.72);
    --border: rgba(91, 30, 201, 0.18);
    --purple: #6d25f5;
    --orange: #ff7a00;
    --shadow: rgba(91, 30, 201, 0.18);
    --font-body: 'Inter', Arial, sans-serif;
    --font-heading: 'Unbounded', 'Inter', Arial, sans-serif;
}

html {
    width: 100%;
    min-height: 100%;
    background: #05030d;
    overscroll-behavior: none;
    scroll-behavior: smooth;
}

body.dark,
html.dark-start body {
    --bg: #05030d;
    --text: #f6f1ff;
    --muted: #b9aecb;
    --card: rgba(13, 9, 29, 0.72);
    --border: rgba(255, 122, 0, 0.22);
    --shadow: rgba(0, 0, 0, 0.45);
}

body {
    font-family: var(--font-body);
    width: 100%;
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    overscroll-behavior: none;
    background:
        radial-gradient(circle at top left, rgba(125, 0, 255, 0.18), transparent 42%),
        radial-gradient(circle at bottom right, rgba(255, 122, 0, 0.18), transparent 42%),
        radial-gradient(circle at 50% 45%, rgba(180, 40, 255, 0.08), transparent 55%),
        linear-gradient(180deg, #f6f3ff 0%, #ffffff 100%);
    transition:
        background 0.6s ease,
        color 0.6s ease;
}

h1,
h2,
h3,
h4,
.brand-text,
.error-code {
    font-family: var(--font-heading);
}

body.dark {
    background:
        radial-gradient(circle at top left, rgba(140, 0, 255, 0.36), transparent 45%),
        radial-gradient(circle at bottom right, rgba(255, 98, 0, 0.32), transparent 45%),
        radial-gradient(circle at 50% 45%, rgba(180, 60, 255, 0.14), transparent 55%),
        linear-gradient(180deg, #05030d 0%, #070412 45%, #090414 100%);
}

.site-scale {
    min-height: 100vh;
    background: transparent;
}

body::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: -120px;
    height: 320px;
    pointer-events: none;
    opacity: 0.85;
    background:
        radial-gradient(circle at 20% 50%, rgba(138, 43, 226, 0.5), transparent 38%),
        radial-gradient(circle at 80% 50%, rgba(255, 122, 0, 0.42), transparent 38%);
    filter: blur(90px);
    z-index: -1;
}

body.dark::after {
    opacity: 1;
    background:
        radial-gradient(circle at 20% 50%, rgba(160, 60, 255, 0.6), transparent 38%),
        radial-gradient(circle at 80% 50%, rgba(255, 140, 0, 0.5), transparent 38%);
}

body,
.header,
.brand,
.brand-mark,
.brand-text,
.nav,
.nav a,
.theme-btn,
.reason,
.teacher-card,
.contact-box,
.premium-contact,
.btn,
.badge {
    transition:
        background 0.6s ease,
        color 0.6s ease,
        border-color 0.6s ease,
        box-shadow 0.6s ease,
        transform 0.3s ease;
}


.header {
    position: relative;
    padding: 24px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    transition: transform 0.35s ease;
}

.brand-cube {
    position: relative;
    width: 44px;
    height: 50px;
    transition: filter 0.35s ease;
    animation: brandCubeSway 4.5s ease-in-out infinite;
}

.brand-cube-face {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--purple), var(--orange));
}

.brand-cube-top {
    clip-path: polygon(50% 0%, 100% 26%, 50% 52%, 0% 26%);
    filter: brightness(1.4);
}

.brand-cube-left {
    clip-path: polygon(0% 26%, 50% 52%, 50% 100%, 0% 74%);
    filter: brightness(0.82);
}

.brand-cube-right {
    clip-path: polygon(100% 26%, 50% 52%, 50% 100%, 100% 74%);
    filter: brightness(0.6);
}

.brand-cube-letter {
    position: absolute;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 12px;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.brand-cube-letter-top {
    top: 14%;
    left: 50%;
    transform: translate(-50%, 0);
}

.brand-cube-letter-left {
    top: 64%;
    left: 25%;
    transform: translate(-50%, -50%) skewY(30deg);
}

.brand-cube-letter-right {
    top: 64%;
    left: 75%;
    transform: translate(-50%, -50%) skewY(-30deg);
}

@keyframes brandCubeSway {
    0%, 100% { transform: rotate(-6deg) translateY(0); }
    50% { transform: rotate(6deg) translateY(-2px); }
}

.brand:hover .brand-mark {
    transform: translateY(-2px);
}

.brand:hover .brand-cube {
    filter:
        drop-shadow(0 0 12px rgba(215, 44, 255, 0.55))
        drop-shadow(0 0 20px rgba(255, 122, 0, 0.35));
}

.brand-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.8px;
    white-space: nowrap;
}

.nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Шапка на компьютере — сетка из трёх колонок: логотип | меню | кнопки.
   Меню стоит по центру, но колонки не могут налезть друг на друга
   (раньше меню было прибито к центру через position: absolute и на
   экранах 1280–1366px наезжало на логотип и кнопку Telegram). */
@media (min-width: 1280px) {
    .header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 24px;
    }

    .nav {
        display: contents;
    }

    .nav-links {
        justify-self: center;
    }

    .header-actions {
        justify-self: end;
    }
}

/* Ноутбуки: чуть компактнее, чтобы шапка не выглядела зажатой */
@media (min-width: 1280px) and (max-width: 1640px) {
    .header {
        padding-left: 4%;
        padding-right: 4%;
    }

    .brand-text {
        font-size: 18px;
    }

    .nav-links {
        gap: 8px;
    }

    .header-actions {
        gap: 12px;
    }
}

/* Самые узкие ноутбуки: пять пунктов меню + кнопки должны влезть без
   горизонтальной прокрутки */
@media (min-width: 1280px) and (max-width: 1400px) {
    .header {
        gap: 16px;
        padding-left: 3%;
        padding-right: 3%;
    }

    .brand-text {
        font-size: 16px;
    }

    .nav-links {
        gap: 6px;
    }

    .header-actions {
        gap: 8px;
    }
}

.nav a {
    position: relative;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
    font-size: 18px;
}

.nav .telegram-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;

    border: 2px solid #229ed9;
    border-radius: 999px;

    background: rgba(34, 158, 217, 0.08);

    color: #58b7ff;

    font-weight: 900;
    text-decoration: none;

    box-shadow:
        0 0 18px rgba(34, 158, 217, 0.18);

    transition:
        background 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}

.nav .telegram-nav-btn::after {
    display: none;
}

.nav .telegram-nav-btn:hover,
.nav .telegram-nav-btn.active {
    color: #ffffff;

    background: #229ed9;

    box-shadow:
        0 0 22px rgba(34, 158, 217, 0.38),
        0 0 34px rgba(34, 158, 217, 0.20);
}

.nav .telegram-nav-btn:hover {
    transform: translateY(-2px);
}

.nav .privacy-btn,
.nav .cabinet-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;

    border: 2px solid rgba(109, 37, 245, 0.45);
    border-radius: 50%;

    background: linear-gradient(135deg, rgba(109, 37, 245, 0.14), rgba(255, 122, 0, 0.10));
    /* Градиент на всю кнопку вместе с рамкой — иначе под прозрачной рамкой
       он повторяется и внутри круга проступает квадрат */
    background-origin: border-box;

    color: var(--purple);

    box-shadow: 0 0 18px rgba(109, 37, 245, 0.18);

    transition:
        background 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease,
        border-color 0.3s ease;
}

.nav .privacy-btn svg,
.nav .cabinet-nav-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.nav .privacy-btn::after,
.nav .cabinet-nav-btn::after {
    display: none;
}

.nav .privacy-btn:hover,
.nav .cabinet-nav-btn:hover {
    color: #ffffff;

    border-color: transparent;

    background: linear-gradient(135deg, var(--purple), var(--orange));
    background-origin: border-box;

    box-shadow:
        0 0 22px rgba(109, 37, 245, 0.4),
        0 0 34px rgba(255, 122, 0, 0.22);

    transform: translateY(-2px);
}

body.dark .nav .privacy-btn,
body.dark .nav .cabinet-nav-btn {
    color: #c89bff;
    border-color: rgba(200, 155, 255, 0.4);
}

body.dark .nav .privacy-btn:hover,
body.dark .nav .cabinet-nav-btn:hover,
body.dark .nav .cabinet-nav-btn.active {
    color: #ffffff;
    border-color: transparent;
}

/* «!?» в кружке кабинета до входа; после входа — буква имени */
.cabinet-nav-mark {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.cabinet-nav-mark.is-letter {
    font-size: 17px;
}

/* Кнопка кабинета: на компьютере — кружок со значком (или фото ученика),
   подпись видна только в мобильном меню */
.cabinet-nav-icon {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
}

.cabinet-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabinet-nav-text {
    display: none;
}

.nav .cabinet-nav-btn.active {
    color: #ffffff;
    border-color: transparent;
    /* border-box — градиент под рамкой тоже, иначе внутри круга квадрат */
    background: linear-gradient(135deg, var(--purple), var(--orange)) border-box;
}

/* Вошёл: фото в градиентной рамке */
.nav .cabinet-nav-btn.is-in {
    padding: 2px;
    border: none;
    background: linear-gradient(135deg, var(--purple), var(--orange));
}

.nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 0;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--purple), var(--orange));
    transition: 0.3s;
}

.nav a:hover {
    color: var(--purple);
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.nav a.active {
    color: var(--purple);
}

body.dark .nav a.active {
    color: #c89bff;
}

.nav-links a {
    position: relative;
    display: inline-flex;
    white-space: nowrap; /* «OTS Class» — в одну строку */
    align-items: center;
    justify-content: center;
    min-width: 116px;
    height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    color: #ffffff;
    background-color: rgba(88, 32, 190, 0.55);
    background-image: linear-gradient(90deg, var(--purple), var(--orange));
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 0% 100%;
    background-origin: border-box;
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 0 rgba(109, 37, 245, 0);
    transition: border-color 0.45s ease, background-size 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s ease, box-shadow 0.45s ease;
}

.nav-links a::after {
    display: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
    border-color: transparent;
    background-size: 100% 100%;
    box-shadow: 0 0 22px rgba(109, 37, 245, 0.4), 0 0 38px rgba(255, 122, 0, 0.22);
}

/* «OTS Class» в меню: неоновое свечение и короткий глитч раз в 4 секунды —
   тот же эффект, что у «Outside the System» на главной, только под размер
   кнопки. Ритм свечения совпадает со сбоем: в момент глитча вспышка ярче. */
.nav a.nav-class {
    border-color: rgba(215, 44, 255, 0.55);
    animation: navClassGlow 4.2s ease-in-out infinite;
}

.nav-glitch {
    position: relative;
    display: inline-block;
    animation: navGlitchJump 4.2s infinite steps(1);
}

.nav-glitch::before,
.nav-glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    color: inherit;
    pointer-events: none;
    opacity: 0;
}

.nav-glitch::before {
    text-shadow: -2px 0 #b13cff;
    animation: navGlitchTop 4.2s infinite steps(1);
}

.nav-glitch::after {
    text-shadow: 2px 0 #ff8a1f;
    animation: navGlitchBottom 4.2s infinite steps(1);
}

@keyframes navClassGlow {
    0%, 100% {
        box-shadow: 0 0 14px rgba(109, 37, 245, 0.5), 0 0 26px rgba(255, 122, 0, 0.18);
    }

    40% {
        box-shadow: 0 0 22px rgba(160, 50, 255, 0.65), 0 0 38px rgba(255, 122, 0, 0.32);
    }

    68%, 74% {
        box-shadow: 0 0 24px rgba(215, 44, 255, 0.8), 0 0 44px rgba(255, 122, 0, 0.45);
    }
}

@keyframes navGlitchJump {
    0%, 66%, 76%, 100% {
        transform: translate(0, 0) skew(0deg);
    }

    68% {
        transform: translate(-1px, 0) skew(-6deg);
    }

    70% {
        transform: translate(2px, 0) skew(4deg);
    }

    72% {
        transform: translate(-2px, 0) skew(-3deg);
    }

    74% {
        transform: translate(1px, 0) skew(2deg);
    }
}

@keyframes navGlitchTop {
    0%, 66%, 76%, 100% {
        clip-path: inset(0 0 100% 0);
        transform: translateX(0);
        opacity: 0;
    }

    68% {
        clip-path: inset(0 0 58% 0);
        transform: translateX(-5px);
        opacity: 1;
    }

    70% {
        clip-path: inset(28% 0 44% 0);
        transform: translateX(4px);
        opacity: 1;
    }

    72% {
        clip-path: inset(8% 0 70% 0);
        transform: translateX(-6px);
        opacity: 1;
    }

    74% {
        clip-path: inset(40% 0 38% 0);
        transform: translateX(3px);
        opacity: 0.8;
    }
}

@keyframes navGlitchBottom {
    0%, 66%, 76%, 100% {
        clip-path: inset(100% 0 0 0);
        transform: translateX(0);
        opacity: 0;
    }

    68% {
        clip-path: inset(62% 0 0 0);
        transform: translateX(5px);
        opacity: 1;
    }

    70% {
        clip-path: inset(46% 0 22% 0);
        transform: translateX(-4px);
        opacity: 1;
    }

    72% {
        clip-path: inset(72% 0 4% 0);
        transform: translateX(6px);
        opacity: 1;
    }

    74% {
        clip-path: inset(54% 0 18% 0);
        transform: translateX(-3px);
        opacity: 0.8;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav a.nav-class,
    .nav-glitch,
    .nav-glitch::before,
    .nav-glitch::after {
        animation: none;
    }
}

/* Приподнимается только пункт под курсором — активный стоит в ряд с остальными */
.nav-links a:hover {
    transform: translateY(-2px);
}

body.dark .nav-links a.active {
    color: #ffffff;
}

.theme-btn {
    position: relative;
    width: 92px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(138, 43, 226, 0.22), rgba(255, 122, 0, 0.22)),
        rgba(10, 7, 25, 0.95);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 0 18px rgba(138, 43, 226, 0.35),
        0 0 40px rgba(255, 122, 0, 0.22);
    background-origin: border-box; /* градиент и под рамкой — без квадрата */
}

.theme-btn::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b2cff, #ff7a00);
    transition: 0.35s ease;
}

body.dark .theme-btn::before,
html.dark-start .theme-btn::before {
    transform: translateX(48px);
}

html.dark-start .theme-btn::before {
    transition: none;
}

.theme-btn span {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    color: #ffffff;
    user-select: none;
}

.theme-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.theme-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.burger-btn {
    display: none;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(109, 37, 245, 0.32);
}

.burger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    margin: 4px auto;
    border-radius: 999px;
    background: #ffffff;
    transition: 0.3s;
}

.burger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    position: relative;
    overflow: hidden;
    scroll-margin-top: 100px;
    min-height: calc(100vh - 130px);
    padding: 55px 7% 80px;
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    align-items: center;
    gap: 70px;
}

.hero-bg-lines,
.hero-bg-lines::before,
.hero-bg-lines::after,
.hero-glow {
    display: none !important;
    background: none !important;
    animation: none !important;
    opacity: 0 !important;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 850px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 34px;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(109, 37, 245, 0.10);
    color: var(--purple);
    font-weight: 800;
}

.badge::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 12px var(--purple), 0 0 26px rgba(109, 37, 245, 0.55);
}

.hero h1 {
    font-size: 68px;
    line-height: 1.05;
    letter-spacing: -2.5px;
    font-weight: 900;
}

.title-line {
    display: block;
}

.glitch {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    color: transparent;
    background: linear-gradient(90deg, #5b24ff 0%, #c029ff 48%, #ff7a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 0 18px rgba(109, 37, 245, 0.55),
        0 0 30px rgba(215, 44, 255, 0.35),
        0 0 42px rgba(255, 122, 0, 0.28);
    filter:
        drop-shadow(0 0 14px rgba(109, 37, 245, 0.35))
        drop-shadow(0 0 22px rgba(255, 122, 0, 0.22));
    animation: glitchTextJump 4.2s infinite steps(1);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    color: transparent;
    background: linear-gradient(90deg, #5d22ff 0%, #d72cff 48%, #ff7a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glitch::before {
    text-shadow:
        -8px 0 rgba(109, 37, 245, 0.9),
        8px 0 rgba(215, 44, 255, 0.45);
    animation: glitchScanTop 4.2s infinite steps(1);
}

.glitch::after {
    text-shadow:
        8px 0 rgba(255, 122, 0, 0.9),
        -8px 0 rgba(215, 44, 255, 0.45);
    animation: glitchScanBottom 4.2s infinite steps(1);
}

.glitch-lines {
    position: absolute;
    left: -4%;
    right: -4%;
    top: 0;
    bottom: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0%, rgba(109, 37, 245, 0.9) 8%, transparent 16%) 0 18% / 100% 3px no-repeat,
        linear-gradient(90deg, transparent 6%, rgba(180, 44, 255, 0.9) 24%, transparent 36%) 0 34% / 100% 4px no-repeat,
        linear-gradient(90deg, transparent 18%, rgba(215, 44, 255, 0.85) 42%, transparent 54%) 0 50% / 100% 3px no-repeat,
        linear-gradient(90deg, transparent 42%, rgba(255, 122, 0, 0.9) 66%, transparent 78%) 0 66% / 100% 4px no-repeat,
        linear-gradient(90deg, transparent 58%, rgba(255, 122, 0, 0.8) 82%, transparent 94%) 0 82% / 100% 3px no-repeat;
    opacity: 0;
    filter: drop-shadow(0 0 10px rgba(215, 44, 255, 0.7));
    animation: glitchLines 4.2s infinite steps(1);
}

.hero-description,
.subtitle {
    margin-top: 28px;
    max-width: 720px;
    color: var(--muted);
    font-size: 23px;
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    gap: 22px;
    margin-top: 42px;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    padding: 18px 32px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 900;
    font-size: 18px;
    background-repeat: no-repeat;
    background-position: bottom;
    background-size: 100% 0%;
    background-origin: border-box;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color 0.45s ease, border-color 0.45s ease, transform 0.45s ease, background-size 0.65s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background-size: 100% 100%;
    box-shadow: 0 0 26px rgba(109, 37, 245, 0.35), 0 0 44px rgba(255, 122, 0, 0.2);
}

body.dark .btn:hover {
    box-shadow: 0 0 30px rgba(170, 130, 255, 0.45), 0 0 50px rgba(255, 122, 0, 0.25);
}

.btn.primary {
    color: var(--text);
    background-color: rgba(109, 37, 245, 0.08);
    background-image: linear-gradient(135deg, var(--purple), var(--orange));
    border: 1px solid rgba(109, 37, 245, 0.28);
}

.btn.primary:hover {
    color: #ffffff;
    border-color: transparent;
}

.btn.secondary {
    color: var(--purple);
    background-color: rgba(109, 37, 245, 0.04);
    background-image: linear-gradient(135deg, var(--purple), var(--purple));
    border: 1px solid var(--purple);
}

.btn.secondary:hover {
    color: #ffffff;
    border-color: transparent;
}

.hero-visual {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    padding: 40px 0;
}

.hero-planet {
    position: relative;
    width: min(380px, 85%);
    aspect-ratio: 1;
}

.hero-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    border-radius: 50%;
    pointer-events: none;
    box-shadow:
        0 0 10px rgba(109, 37, 245, 0.35),
        0 0 18px rgba(255, 122, 0, 0.25);
}

.hero-ring-a {
    width: 58%;
    height: 58%;
    margin: -29% 0 0 -29%;
    border: 1.5px solid transparent;
    border-top-color: rgba(255, 122, 0, 0.85);
    border-right-color: rgba(215, 44, 255, 0.6);
    animation: heroRingSpin 30s linear infinite;
}

.hero-ring-b {
    width: 76%;
    height: 76%;
    margin: -38% 0 0 -38%;
    border: 1.5px solid transparent;
    border-bottom-color: rgba(109, 37, 245, 0.8);
    border-left-color: rgba(255, 122, 0, 0.55);
    animation: heroRingSpin 40s linear infinite reverse;
    animation-delay: -6s;
}

.hero-ring-c {
    width: 94%;
    height: 94%;
    margin: -47% 0 0 -47%;
    border: 1.5px solid transparent;
    border-top-color: rgba(215, 44, 255, 0.75);
    border-left-color: rgba(255, 122, 0, 0.5);
    animation: heroRingSpin 26s linear infinite;
    animation-delay: -10s;
}

.hero-ring-d {
    width: 112%;
    height: 112%;
    margin: -56% 0 0 -56%;
    border: 1.5px solid transparent;
    border-bottom-color: rgba(255, 122, 0, 0.7);
    border-right-color: rgba(109, 37, 245, 0.5);
    animation: heroRingSpin 52s linear infinite reverse;
    animation-delay: -3s;
}

.hero-ring-e {
    width: 130%;
    height: 130%;
    margin: -65% 0 0 -65%;
    border: 1.5px solid transparent;
    border-top-color: rgba(109, 37, 245, 0.65);
    border-left-color: rgba(215, 44, 255, 0.5);
    animation: heroRingSpin 35s linear infinite;
    animation-delay: -15s;
}

.hero-ring-f {
    width: 148%;
    height: 148%;
    margin: -74% 0 0 -74%;
    border: 1.5px solid transparent;
    border-bottom-color: rgba(215, 44, 255, 0.55);
    border-right-color: rgba(255, 122, 0, 0.4);
    animation: heroRingSpin 60s linear infinite reverse;
    animation-delay: -20s;
}

body.dark .hero-ring {
    box-shadow:
        0 0 12px rgba(170, 130, 255, 0.45),
        0 0 22px rgba(255, 122, 0, 0.3);
}

body.dark .hero-ring-a { border-top-color: rgba(255, 140, 0, 0.95); border-right-color: rgba(215, 44, 255, 0.75); }
body.dark .hero-ring-b { border-bottom-color: rgba(170, 130, 255, 0.9); border-left-color: rgba(255, 140, 0, 0.65); }
body.dark .hero-ring-c { border-top-color: rgba(215, 44, 255, 0.9); border-left-color: rgba(255, 140, 0, 0.6); }
body.dark .hero-ring-d { border-bottom-color: rgba(255, 140, 0, 0.85); border-right-color: rgba(170, 130, 255, 0.6); }
body.dark .hero-ring-e { border-top-color: rgba(170, 130, 255, 0.8); border-left-color: rgba(215, 44, 255, 0.6); }
body.dark .hero-ring-f { border-bottom-color: rgba(215, 44, 255, 0.7); border-right-color: rgba(255, 140, 0, 0.5); }

.hero-ring-dot-1 {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.hero-ring-dot-2 {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(50%, -50%);
    border-radius: 50%;
}

.hero-ring-a .hero-ring-dot-1 { width: 11px; height: 11px; background: var(--orange); box-shadow: 0 0 14px var(--orange); }
.hero-ring-a .hero-ring-dot-2 { width: 7px; height: 7px; background: #a855f7; box-shadow: 0 0 10px #a855f7; }

.hero-ring-b .hero-ring-dot-1 { width: 8px; height: 8px; background: #d72cff; box-shadow: 0 0 11px #d72cff; }
.hero-ring-b .hero-ring-dot-2 { width: 13px; height: 13px; background: var(--orange); box-shadow: 0 0 16px var(--orange); }

.hero-ring-c .hero-ring-dot-1 { width: 15px; height: 15px; background: var(--purple); box-shadow: 0 0 18px var(--purple); }
.hero-ring-c .hero-ring-dot-2 { width: 6px; height: 6px; background: #d72cff; box-shadow: 0 0 9px #d72cff; }

.hero-ring-d .hero-ring-dot-1 { width: 9px; height: 9px; background: var(--orange); box-shadow: 0 0 12px var(--orange); }
.hero-ring-d .hero-ring-dot-2 { width: 12px; height: 12px; background: var(--purple); box-shadow: 0 0 15px var(--purple); }

.hero-ring-e .hero-ring-dot-1 { width: 13px; height: 13px; background: #d72cff; box-shadow: 0 0 16px #d72cff; }
.hero-ring-e .hero-ring-dot-2 { width: 7px; height: 7px; background: #ffb347; box-shadow: 0 0 10px #ffb347; }

.hero-ring-f .hero-ring-dot-1 { width: 8px; height: 8px; background: var(--purple); box-shadow: 0 0 11px var(--purple); }
.hero-ring-f .hero-ring-dot-2 { width: 10px; height: 10px; background: var(--orange); box-shadow: 0 0 13px var(--orange); }

.hero-planet-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    width: 60%;
    height: 60%;
    margin: -30% 0 0 -30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109, 37, 245, 0.35), rgba(255, 122, 0, 0.12) 55%, transparent 75%);
    filter: blur(30px);
    pointer-events: none;
}

body.dark .hero-planet-glow {
    background: radial-gradient(circle, rgba(140, 60, 255, 0.5), rgba(255, 122, 0, 0.18) 55%, transparent 75%);
}

.hero-symbol-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 34%;
    height: 34%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(230, 120, 255, 0.95),
        rgba(140, 60, 255, 0.8) 40%,
        rgba(255, 122, 0, 0.55) 75%,
        transparent 100%
    );
    filter: blur(6px);
    box-shadow:
        0 0 50px rgba(140, 60, 255, 0.55),
        0 0 90px rgba(255, 122, 0, 0.3);
    animation: heroSymbolPulse 4.5s ease-in-out infinite;
}

@keyframes heroSymbolPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes heroRingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scroll-hint {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 60;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(109, 37, 245, 0.3);
    background: rgba(247, 243, 255, 0.85);
    color: var(--purple);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 1;
    transition: box-shadow 0.5s ease, border-color 0.5s ease, background 0.5s ease, opacity 0.35s ease;
    animation: scrollHintBounce 2.8s ease-in-out infinite;
}

.scroll-hint.hint-hidden {
    opacity: 0;
    pointer-events: none;
}

body.dark .scroll-hint {
    border-color: rgba(170, 130, 255, 0.4);
    background: rgba(13, 9, 29, 0.85);
    color: #c89bff;
}

.scroll-hint:hover {
    border-color: rgba(109, 37, 245, 0.55);
    box-shadow: 0 0 24px rgba(109, 37, 245, 0.4);
}

body.dark .scroll-hint:hover {
    border-color: rgba(170, 130, 255, 0.65);
    box-shadow: 0 0 28px rgba(170, 130, 255, 0.55);
}

.scroll-hint-icon {
    grid-area: 1 / 1;
    width: 20px;
    height: 20px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-hint-icon-up {
    opacity: 0;
    transform: scale(0.7);
}

.scroll-hint.scrolled .scroll-hint-icon-down {
    opacity: 0;
    transform: scale(0.7);
}

.scroll-hint.scrolled .scroll-hint-icon-up {
    opacity: 1;
    transform: scale(1);
}

@keyframes scrollHintBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

.reasons {
    position: relative;
    z-index: 2;
    padding: 40px 7% 110px;
    scroll-margin-top: 100px;
}

.reasons-heading {
    max-width: 700px;
    margin: 0 auto 50px;
    text-align: center;
}

.reasons-heading .badge {
    margin-left: auto;
    margin-right: auto;
}

.reasons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    gap: 24px;
}

.reason {
    position: relative;
    border-radius: 26px;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 18px 45px var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.reason:hover {
    transform: translateY(-8px);
}

.reason-toggle {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 30px 26px;
    border: none;
    border-radius: 26px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: 0.3s;
}

.reason-toggle:hover .reason-icon {
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 0 26px rgba(109, 37, 245, 0.22);
}

.reason-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 28px;
    background: rgba(109, 37, 245, 0.08);
    border: 1px solid rgba(109, 37, 245, 0.18);
    box-shadow: 0 0 22px rgba(109, 37, 245, 0.14);
    transition: 0.3s;
}

body.dark .reason-icon {
    background: rgba(109, 37, 245, 0.20);
    border: 1px solid rgba(170, 130, 255, 0.65);
    box-shadow:
        0 0 0 1px rgba(170, 130, 255, 0.22),
        0 0 20px rgba(109, 37, 245, 0.55),
        0 0 42px rgba(109, 37, 245, 0.35);
}

body.dark .reason-toggle:hover .reason-icon {
    box-shadow:
        0 0 0 1px rgba(255, 122, 0, 0.4),
        0 0 26px rgba(109, 37, 245, 0.75),
        0 0 50px rgba(109, 37, 245, 0.45),
        0 0 30px rgba(255, 122, 0, 0.4);
}

.reason h4 {
    font-size: 19px;
}

.reason p {
    color: var(--muted);
    line-height: 1.45;
}

.reason-info {
    max-height: 0;
    overflow: hidden;
    margin: 0 26px;
    padding: 0 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    border-left: 2px solid rgba(109, 37, 245, 0.25);
    opacity: 0;
    transition: 0.35s ease;
}

.reason.open .reason-info {
    max-height: 160px;
    margin: -6px 26px 26px;
    padding: 10px 14px 4px;
    opacity: 1;
}

.page {
    padding: 80px 7%;
    min-height: 75vh;
}

.page h1 {
    font-size: 58px;
    line-height: 1.08;
}

.teacher-grid {
    margin-top: 44px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.teacher-card,
.contact-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 34px;
    box-shadow: 0 18px 45px var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.teacher-photo {
    width: 90px;
    height: 90px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    font-size: 42px;
    background: linear-gradient(135deg, rgba(91, 30, 201, 0.16), rgba(255, 122, 0, 0.18));
    margin-bottom: 22px;
    box-shadow: 0 0 24px rgba(109, 37, 245, 0.16);
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

/* Фото учителя в карточке (если загружено в админке) — вместо иконки */
.teacher-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.dark .teacher-photo {
    box-shadow:
        0 0 0 1px rgba(170, 130, 255, 0.22),
        0 0 20px rgba(109, 37, 245, 0.55),
        0 0 42px rgba(109, 37, 245, 0.35);
}

.premium-teacher:hover .teacher-photo {
    box-shadow: 0 0 30px rgba(109, 37, 245, 0.3);
}

body.dark .premium-teacher:hover .teacher-photo {
    box-shadow:
        0 0 0 1px rgba(255, 122, 0, 0.4),
        0 0 26px rgba(109, 37, 245, 0.75),
        0 0 50px rgba(109, 37, 245, 0.45),
        0 0 30px rgba(255, 122, 0, 0.4);
}

.teacher-card h3 {
    margin-bottom: 12px;
    font-size: 24px;
    color: var(--purple);
}

.teacher-card p,
.contact-box p {
    color: var(--muted);
    line-height: 1.6;
}

.contact-box p {
    margin-bottom: 16px;
    font-size: 19px;
}

.footer {
    text-align: center;
    padding: 30px;
    color: var(--muted);
}

.footer-requisites {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.85;
}

/* Реквизиты на странице «Контакты» */
.requisites-box {
    max-width: 620px;
    margin: 40px auto 0;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--card);
    box-shadow: 0 18px 45px var(--shadow);
}

.requisites-box h3 {
    margin-bottom: 16px;
    font-size: 20px;
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.teachers-page {
    position: relative;
    overflow: hidden;
}

.page-heading {
    position: relative;
    z-index: 2;
    max-width: 850px;
}

.premium-teacher {
    position: relative;
    z-index: 2;
    overflow: hidden;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    border: 1px solid transparent;
    transition: 0.35s ease;
}

.premium-teacher::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 32px;
    background: linear-gradient(135deg, var(--purple), transparent, var(--orange));
    opacity: 0;
    filter: blur(22px);
    transition: 0.35s ease;
}

.premium-teacher:hover {
    transform: translateY(-10px);
}

.premium-teacher:hover::before {
    opacity: 0.35;
}

.teacher-tag {
    display: inline-block;
    margin-bottom: 18px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(109, 37, 245, 0.10);
    color: var(--purple);
    font-size: 14px;
    font-weight: 800;
}

.teacher-meta {
    display: grid;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.teacher-meta span {
    color: var(--muted);
    font-size: 15px;
}

.contacts {
    position: relative;
    overflow: hidden;
}

.contacts-grid {
    position: relative;
    z-index: 2;
    margin-top: 48px;
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 24px;
    align-items: start;
}

.premium-contact {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid transparent;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.04),
            rgba(109, 37, 245, 0.08)
        ) padding-box,
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    transition: 0.35s ease;
}

.premium-contact::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 32px;
    background: linear-gradient(135deg, var(--purple), transparent, var(--orange));
    opacity: 0;
    filter: blur(22px);
    transition: 0.35s ease;
}

.premium-contact:hover {
    transform: translateY(-10px);
}

.premium-contact:hover::before {
    opacity: 0.35;
}

.contact-icon {
    width: 68px;
    height: 68px;
    margin-bottom: 22px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    color: var(--purple);
    background: linear-gradient(
        135deg,
        rgba(109, 37, 245, 0.18),
        rgba(255, 122, 0, 0.16)
    );
    box-shadow: 0 0 24px rgba(109, 37, 245, 0.16);
    transition: box-shadow 0.3s ease;
}

body.dark .contact-icon {
    box-shadow:
        0 0 0 1px rgba(170, 130, 255, 0.22),
        0 0 20px rgba(109, 37, 245, 0.55),
        0 0 42px rgba(109, 37, 245, 0.35);
}

.premium-contact:hover .contact-icon {
    box-shadow: 0 0 30px rgba(109, 37, 245, 0.3);
}

body.dark .premium-contact:hover .contact-icon {
    box-shadow:
        0 0 0 1px rgba(255, 122, 0, 0.4),
        0 0 26px rgba(109, 37, 245, 0.75),
        0 0 50px rgba(109, 37, 245, 0.45),
        0 0 30px rgba(255, 122, 0, 0.4);
}

.contact-icon svg {
    width: 30px;
    height: 30px;
    display: block;
}

.premium-contact h3 {
    margin-bottom: 10px;
    font-size: 24px;
    color: var(--text);
}

.premium-contact p {
    word-break: break-word;
    font-size: 17px;
}

.contact-link,
.contact-status {
    width: fit-content;
    margin-top: auto;
    padding: 12px 18px;
    border-radius: 999px;
    background:
        linear-gradient(
            135deg,
            var(--purple),
            var(--orange)
        );
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    box-shadow:
        0 12px 28px rgba(109, 37, 245, 0.25);
    transition: 0.3s;
}

.contact-link:hover {
    transform: translateY(-2px);
}

.contact-dropdown {
    justify-content: flex-start;
}

.contact-dropdown .contact-status {
    border: none;
    outline: none;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.contact-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-toggle:hover {
    transform: translateY(-2px);
}

.contact-details {
    width: 100%;
    max-height: 0;
    /* Пока закрыто, убираем отступ карточки (gap: 18px) — иначе кнопка
       «Подробнее» стоит выше, чем «Написать» и «Открыть» в соседних карточках */
    margin-top: -18px;
    overflow: hidden;
    opacity: 0;
    color: var(--muted);
    line-height: 1.7;
    transition:
        max-height 0.4s ease,
        opacity 0.3s ease,
        margin-top 0.3s ease,
        padding-top 0.3s ease;
}

.contact-details p {
    margin-top: 14px;
    margin-bottom: 0;
    font-size: 16px;
}

.contact-dropdown.open .contact-details {
    max-height: 430px;
    opacity: 1;
    margin-top: 0;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.contact-dropdown.open .contact-status {
    background: linear-gradient(135deg, var(--orange), var(--purple));
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glitchTextJump {
    0%, 66%, 100% {
        transform: translate(0, 0) skew(0deg);
    }

    68% {
        transform: translate(-3px, 1px) skew(-1deg);
    }

    70% {
        transform: translate(4px, -1px) skew(1deg);
    }

    72% {
        transform: translate(-5px, 0) skew(-2deg);
    }

    74% {
        transform: translate(3px, 1px) skew(1deg);
    }

    76% {
        transform: translate(0, 0) skew(0deg);
    }
}

@keyframes glitchScanTop {
    0%, 66%, 100% {
        clip-path: inset(0 0 100% 0);
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }

    68% {
        clip-path: inset(0 0 72% 0);
        transform: translateX(-28px) scaleX(1.06);
        opacity: 1;
    }

    70% {
        clip-path: inset(18% 0 58% 0);
        transform: translateX(22px) scaleX(0.98);
        opacity: 0.85;
    }

    72% {
        clip-path: inset(34% 0 46% 0);
        transform: translateX(-34px) scaleX(1.08);
        opacity: 1;
    }

    74% {
        clip-path: inset(8% 0 78% 0);
        transform: translateX(18px) scaleX(1.03);
        opacity: 0.8;
    }

    76% {
        clip-path: inset(0 0 100% 0);
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }
}

@keyframes glitchScanBottom {
    0%, 66%, 100% {
        clip-path: inset(100% 0 0 0);
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }

    68% {
        clip-path: inset(70% 0 0 0);
        transform: translateX(30px) scaleX(1.07);
        opacity: 1;
    }

    70% {
        clip-path: inset(48% 0 28% 0);
        transform: translateX(-24px) scaleX(0.98);
        opacity: 0.85;
    }

    72% {
        clip-path: inset(58% 0 16% 0);
        transform: translateX(36px) scaleX(1.08);
        opacity: 1;
    }

    74% {
        clip-path: inset(82% 0 0 0);
        transform: translateX(-18px) scaleX(1.03);
        opacity: 0.8;
    }

    76% {
        clip-path: inset(100% 0 0 0);
        transform: translateX(0) scaleX(1);
        opacity: 0;
    }
}

@keyframes glitchLines {
    0%, 66%, 100% {
        opacity: 0;
        transform: translateX(0);
    }

    68% {
        opacity: 1;
        transform: translateX(-20px);
    }

    70% {
        opacity: 0.8;
        transform: translateX(18px);
    }

    72% {
        opacity: 1;
        transform: translateX(-28px);
    }

    74% {
        opacity: 0.75;
        transform: translateX(14px);
    }

    76% {
        opacity: 0;
        transform: translateX(0);
    }
}

@keyframes codeSoftPulse {
    0%, 100% {
        opacity: 0.48;
        transform: translateX(0);
    }

    50% {
        opacity: 1;
        transform: translateX(4px);
    }
}

@media (max-width: 1100px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-planet {
        width: min(280px, 80%);
    }

    .reasons-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacts-grid {
        grid-template-columns: 1fr;
        max-width: 720px;
    }
}

@media (max-width: 900px) {
    .header {
        gap: 24px;
    }

    .hero {
        padding-top: 25px;
    }

    .hero h1,
    .page h1 {
        font-size: 42px;
        letter-spacing: -1px;
    }

    .hero-description,
    .subtitle {
        font-size: 19px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .teacher-grid {
        grid-template-columns: 1fr;
    }

    .reason-icon {
        width: 52px;
        height: 52px;
        font-size: 22px;
    }
}

@media (max-width: 1279px) {
    /* Мобильное меню (бургер). С 1280px полное меню уже помещается в шапку */

    body.menu-open {
        overflow: hidden;
    }

    /* Шапка — «жидкое стекло»: полупрозрачная, всё под ней размыто и
       чуть насыщеннее, сверху световой блик, снизу светлая кромка */
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
        min-height: 76px;
        padding: 14px 5%;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(247, 243, 255, 0.38));
        border-bottom: 1px solid rgba(255, 255, 255, 0.65);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.8),
            0 10px 30px rgba(45, 16, 96, 0.08);
        backdrop-filter: blur(22px) saturate(180%);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
    }

    .header::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 55%),
            linear-gradient(100deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.1) 100%);
    }

    body.dark .header {
        background: linear-gradient(180deg, rgba(22, 13, 44, 0.5), rgba(5, 3, 13, 0.3));
        border-bottom-color: rgba(255, 255, 255, 0.09);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.12),
            0 10px 30px rgba(0, 0, 0, 0.35);
    }

    body.dark .header::before {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 55%),
            linear-gradient(100deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(215, 44, 255, 0.06) 100%);
    }

    .brand {
        gap: 10px;
    }

    .brand-mark {
        width: 46px;
        height: 46px;
    }

    .brand-cube {
        width: 36px;
        height: 40px;
    }

    .brand-cube-letter {
        font-size: 10px;
    }

    .brand-text {
        display: block;
        max-width: 132px;
        font-size: 15px;
        line-height: 1.05;
        letter-spacing: -0.4px;
    }

    .burger-btn {
        display: grid;
        place-items: center;
        position: relative;
        z-index: 120;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: none;
        outline: none;
        background: transparent;
        box-shadow: none;
        appearance: none;
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.2s ease;
    }

    .burger-btn:active,
    .theme-btn:active {
        transform: scale(0.96);
    }

    .burger-btn span {
        width: 5px;
        height: 5px;
        margin: 0;
        border-radius: 50%;
        background: var(--purple);
        transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    }

    .burger-btn span + span {
        margin-top: 3px;
    }

    .burger-btn.active span:nth-child(1) {
        transform: translateY(8px) scale(0);
        opacity: 0;
    }

    .burger-btn.active span:nth-child(2) {
        transform: scale(1.8);
        background: var(--orange);
        opacity: 1;
    }

    .burger-btn.active span:nth-child(3) {
        transform: translateY(-8px) scale(0);
        opacity: 0;
    }

    .nav {
        position: fixed;
        top: 92px;
        left: 16px;
        right: 16px;
        z-index: 110;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
        border-radius: 24px;
        background: linear-gradient(145deg, rgba(255,255,255,0.985), rgba(248,244,255,0.985));
        border: 1px solid rgba(109,37,245,0.08);
        box-shadow: 0 18px 54px rgba(45,16,96,0.10);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.98);
        pointer-events: none;
        transition:
            opacity 0.24s ease,
            visibility 0.24s ease,
            transform 0.24s ease;
        background-origin: border-box; /* градиент и под рамкой — без квадрата */
    }

    body.dark .nav {
        background: linear-gradient(145deg, rgba(18,11,38,0.985), rgba(10,6,25,0.985));
        border-color: rgba(255,122,0,0.10);
        box-shadow: 0 18px 54px rgba(0,0,0,0.42);
        background-origin: border-box; /* градиент и под рамкой — без квадрата */
    }

    .nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .nav-links,
    .header-actions {
        display: contents;
    }

    .nav a {
        width: 100%;
        min-height: 54px;
        padding: 14px 16px;
        border-radius: 16px;
        font-size: 16px;
        font-weight: 800;
        display: flex;
        align-items: center;
        color: var(--text);
        background: rgba(109,37,245,0.045);
    }

    body.dark .nav a {
        background: rgba(255,255,255,0.05);
    }

    .nav a::after {
        display: none;
    }

    /* body.dark — чтобы в тёмной теме активный пункт тоже был с градиентом
       (иначе его перебивало правило body.dark .nav a выше) */
    .nav a.active,
    body.dark .nav a.active {
        color: #ffffff;
        border-color: transparent;
        background: linear-gradient(135deg, var(--purple), var(--orange)) border-box;
        box-shadow: 0 10px 22px rgba(109,37,245,0.16);
    }

    /* Telegram — такой же пункт меню, как остальные, только голубой */
    .nav .telegram-nav-btn {
        height: auto;
        border-width: 1px;
        border-radius: 16px;
    }

    /* Кабинет — пункт меню с подписью «Личный кабинет» / «Мои уроки» */
    .nav .cabinet-nav-btn,
    .nav .cabinet-nav-btn.is-in {
        width: 100%;
        height: auto;
        min-height: 54px;
        gap: 10px;
        padding: 12px 16px;
        border: 1px solid rgba(109, 37, 245, 0.4);
        border-radius: 16px;
        background: rgba(109, 37, 245, 0.08);
        color: var(--text);
        box-shadow: none;
    }

    body.dark .nav .cabinet-nav-btn {
        border-color: rgba(200, 155, 255, 0.35);
        background: rgba(255, 255, 255, 0.05);
        color: var(--text);
    }

    .nav .cabinet-nav-btn.active,
    body.dark .nav .cabinet-nav-btn.active {
        color: #ffffff;
        border-color: transparent;
        background: linear-gradient(135deg, var(--purple), var(--orange)) border-box;
    }

    .nav .cabinet-nav-btn:hover {
        transform: none;
    }

    .cabinet-nav-icon {
        flex: none;
        width: 28px;
        height: 28px;
        color: var(--purple);
    }

    body.dark .cabinet-nav-icon {
        color: #c89bff;
    }

    .cabinet-nav-btn.active .cabinet-nav-icon {
        color: #ffffff;
    }

    .cabinet-nav-btn.is-in .cabinet-nav-icon {
        padding: 2px;
        background: linear-gradient(135deg, var(--purple), var(--orange));
    }

    .cabinet-nav-btn.is-in .cabinet-nav-icon img {
        border-radius: 50%;
    }

    .cabinet-nav-text {
        display: inline;
    }

    .nav .privacy-btn {
        min-height: 44px;
        justify-self: center;
        margin-top: 6px;
    }

    .theme-btn {
        position: relative;
        justify-self: center;
        width: 112px;
        height: 54px;
        margin-top: 6px;
        padding: 0 16px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 999px;
        background:
            linear-gradient(135deg, rgba(138, 43, 226, 0.22), rgba(255, 122, 0, 0.22)),
            rgba(10, 7, 25, 0.95);
        display: flex;
        align-items: center;
        justify-content: space-between;
        overflow: hidden;
        box-shadow:
            0 0 18px rgba(138, 43, 226, 0.28),
            0 0 34px rgba(255, 122, 0, 0.18);
        transition: transform 0.2s ease;
        background-origin: border-box; /* градиент и под рамкой — без квадрата */
    }

    .theme-btn::before {
        content: "";
        position: absolute;
        top: 5px;
        left: 6px;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: linear-gradient(135deg, #7b2cff, #ff7a00);
        transition: 0.35s ease;
    }

    body.dark .theme-btn::before,
    html.dark-start .theme-btn::before {
        transform: translateX(56px);
    }

    .theme-btn:hover {
        transform: none;
    }
}

@media (max-width: 600px) {

    .hero {
        min-height: auto;
        padding: 32px 5% 56px;
        gap: 34px;
        align-items: start;
    }

    .badge {
        max-width: 100%;
        font-size: 13px;
        line-height: 1.2;
        padding: 9px 14px;
        margin-bottom: 22px;
    }

    .badge::before {
        width: 11px;
        height: 11px;
        flex: 0 0 auto;
    }

    .hero h1 {
        font-size: clamp(40px, 11.8vw, 52px);
        line-height: 1.03;
        letter-spacing: -1.5px;
    }

    .glitch {
        margin-top: 4px;
    }

    .glitch::before,
    .glitch::after,
    .glitch-lines {
        opacity: 0.55;
    }

    .hero-description,
    .subtitle {
        font-size: 18px;
        line-height: 1.55;
        margin-top: 22px;
    }

    .hero-buttons {
        margin-top: 30px;
        gap: 14px;
        flex-direction: column;
    }

    .btn {
        min-width: unset;
        width: 100%;
        padding: 16px 20px;
        font-size: 17px;
        border-radius: 999px;
    }

    .hero-planet {
        width: min(230px, 78%);
    }

    .reasons-grid {
        grid-template-columns: 1fr;
    }

    .reason:hover {
        transform: none;
    }

    .reason-toggle {
        padding: 22px 20px;
        gap: 12px;
    }

    .reason-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .reason h4 {
        font-size: 17px;
    }

    .reason p {
        font-size: 15px;
    }

    .reason-info {
        margin: 0 20px;
    }

    .reason.open .reason-info {
        margin: -6px 20px 20px;
    }

    .page {
        padding: 44px 5% 56px;
    }

    .page h1 {
        font-size: 42px;
        line-height: 1.02;
    }

    .contacts-grid,
    .teacher-grid {
        gap: 18px;
    }

    .premium-contact,
    .teacher-card {
        min-height: unset;
        padding: 24px;
    }

}

.teacher-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.teacher-detail-page {
    position: relative;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--purple);
    text-decoration: none;
    font-weight: 900;
}

.back-link-arrow {
    transition: transform 0.25s ease;
}

.back-link:hover .back-link-arrow {
    transform: translateX(-4px);
}

.teacher-profile {
    position: relative;
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 46px;
    align-items: center;
    padding: 46px;
    border-radius: 38px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(109, 37, 245, 0.08)) padding-box,
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 26px 80px var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

.teacher-profile::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 40px;
    background: linear-gradient(135deg, var(--purple), transparent, var(--orange));
    opacity: 0.35;
    filter: blur(24px);
}

.teacher-profile-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 34px;
    overflow: hidden;

    display: grid;
    place-items: center;

    font-size: 120px;

    background:
        linear-gradient(
            135deg,
            rgba(109, 37, 245, 0.18),
            rgba(255, 122, 0, 0.18)
        );

    box-shadow:
        0 20px 54px rgba(109, 37, 245, 0.18);
}

body.dark .teacher-profile-photo {
    box-shadow:
        0 20px 54px rgba(109, 37, 245, 0.18),
        0 0 0 1px rgba(170, 130, 255, 0.22),
        0 0 42px rgba(109, 37, 245, 0.35);
}

.teacher-profile-photo img {
    width: 100%;
    height: 100%;
    display: block;

    object-fit: cover;
    object-position: center;
}

.teacher-profile-content h1 {
    margin-top: 18px;
    font-size: 58px;
    line-height: 1;
    letter-spacing: -2px;
}

.teacher-profile-text {
    margin-top: 24px;
    max-width: 760px;
    color: var(--muted);
    font-size: 21px;
    line-height: 1.7;
}

.teacher-profile-stats {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 18px;
}

.teacher-stat-card {
    padding: 22px;
    border-radius: 24px;
    background: rgba(109, 37, 245, 0.07);
    border: 1px solid var(--border);
}

.teacher-stat-card span {
    display: block;
    margin-bottom: 12px;
    color: var(--purple);
    font-weight: 900;
    font-size: 14px;
}

.teacher-stat-card p {
    color: var(--text);
    font-weight: 800;
    line-height: 1.4;
}

@media (max-width: 800px) {
    .teacher-profile {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 28px;
        border-radius: 30px;
    }

    .teacher-profile-photo {
        border-radius: 26px;
        font-size: 90px;
    }

    .teacher-profile-content h1 {
        font-size: 40px;
        letter-spacing: -1px;
    }

    .teacher-profile-text {
        font-size: 17px;
        line-height: 1.6;
    }

    .teacher-profile-stats {
        grid-template-columns: 1fr;
    }
}
.faq-section {
    padding: 40px 7% 90px;
}

.faq-heading {
    max-width: 820px;
    margin-bottom: 34px;
}

.faq-heading h2 {
    font-size: 52px;
    line-height: 1.05;
    letter-spacing: -1.8px;
}

.faq-heading p:not(.badge) {
    margin-top: 18px;
    color: var(--muted);
    font-size: 21px;
    line-height: 1.6;
}

.faq-list {
    display: grid;
    gap: 16px;
    max-width: 920px;
}

.faq-item {
    border-radius: 24px;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 16px 42px var(--shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow:
        0 16px 42px var(--shadow),
        0 0 24px rgba(109, 37, 245, 0.25);
}

.faq-toggle {
    width: 100%;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.faq-toggle span {
    font-size: 19px;
    font-weight: 900;
}

.faq-toggle strong {
    position: relative;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(145deg, #6d25f5, #b53de0 50%, #ff7a00);
    box-shadow: 0 4px 14px rgba(109, 37, 245, 0.3);
    transition: box-shadow 0.3s ease;
}

.faq-toggle strong::before,
.faq-toggle strong::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #ffffff;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.faq-toggle strong::before {
    width: 14px;
    height: 2px;
}

.faq-toggle strong::after {
    width: 2px;
    height: 14px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
    opacity: 0;
    transition: 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 260px;
    padding: 0 24px 24px;
    opacity: 1;
}

.faq-item.open .faq-toggle strong::after {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
}

@media (max-width: 600px) {
    .faq-section {
        padding: 20px 5% 64px;
    }

    .faq-heading h2 {
        font-size: 38px;
    }

    .faq-heading p:not(.badge) {
        font-size: 17px;
    }

    .faq-toggle {
        padding: 18px;
    }

    .faq-toggle span {
        font-size: 17px;
    }

    .faq-answer {
        font-size: 16px;
        padding: 0 18px;
    }

    .faq-item.open .faq-answer {
        padding: 0 18px 20px;
    }
}
/* =========================================
404 PAGE
========================================= */

.error-page {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.error-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 880px;
    padding: 60px;
    border-radius: 40px;
    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,0.08),
            rgba(109,37,245,0.08)
        ) padding-box,
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;

    border: 1px solid transparent;

    box-shadow:
        0 30px 90px var(--shadow),
        0 0 50px rgba(109,37,245,0.12);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    overflow: hidden;
}

.error-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;

    border-radius: 42px;

    background:
        linear-gradient(
            135deg,
            var(--purple),
            transparent,
            var(--orange)
        );

    opacity: 0.35;
    filter: blur(24px);
}

.error-code {
    display: inline-block;
    margin-bottom: 24px;

    font-size: 180px;
    font-weight: 900;
    line-height: 1;

    letter-spacing: -10px;
}

.error-page h1 {
    margin-top: 10px;
    font-size: 58px;
    line-height: 1.05;
    letter-spacing: -2px;
}

.error-accent {
    display: block;

    margin-top: 10px;

    color: transparent;

    background:
        linear-gradient(
            90deg,
            var(--purple),
            var(--orange)
        );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-text {
    max-width: 620px;

    margin:
        28px auto 0;

    color: var(--muted);

    font-size: 22px;
    line-height: 1.7;
}

.error-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;

    margin-top: 42px;
}

@media (max-width: 800px) {

    .error-card {
        padding: 34px 24px;
        border-radius: 30px;
    }

    .error-code {
        font-size: 110px;
        letter-spacing: -5px;
    }

    .error-page h1 {
        font-size: 38px;
        letter-spacing: -1px;
    }

    .error-text {
        font-size: 17px;
        line-height: 1.6;
    }

    .error-buttons {
        flex-direction: column;
    }
}
.teacher-photo-fallback {
    display: none;
    font-size: 110px;
    line-height: 1;
}

.teacher-photo-fallback.visible,
.teacher-profile-photo.photo-error .teacher-photo-fallback {
    display: block;
}

.teacher-profile-photo img + .teacher-photo-fallback {
    display: none;
}

.teacher-profile-photo.photo-error img {
    display: none;
}

/* ==========================================================================
   OTS Class: кнопка в центре сферы, окно с пояснением, страница /class/
   ========================================================================== */

[hidden] {
    display: none !important;
}

/* Кнопка в центре сферы */
.orb-button {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: max(34%, 104px);
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.28), rgba(140, 60, 255, 0.35) 45%, rgba(255, 122, 0, 0.25) 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    text-align: center;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 30px rgba(140, 60, 255, 0.45), inset 0 0 22px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    background-origin: border-box; /* градиент и под рамкой — без квадрата */
}

/* Расходящаяся волна — подсказка, что на сферу можно нажать */
.orb-button::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 2px solid rgba(215, 44, 255, 0.7);
    border-radius: 50%;
    pointer-events: none;
    animation: orbPing 2.6s ease-out infinite;
}

.orb-button:hover,
.orb-button:focus-visible {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 46px rgba(170, 100, 255, 0.75), 0 0 80px rgba(255, 122, 0, 0.35), inset 0 0 22px rgba(255, 255, 255, 0.25);
}

.orb-button:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}

/* Знак вопроса: дышит (пульсирует) и светится */
.orb-question-mark {
    display: block;
    font-size: clamp(52px, 4.6vw, 70px);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 30%, #f3c6ff 70%, #ffb36b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(215, 44, 255, 0.85)) drop-shadow(0 0 22px rgba(255, 122, 0, 0.45));
    animation: questionPulse 2.6s ease-in-out infinite;
}

/* Вторая волна — со сдвигом, чтобы пульсация была непрерывной */
.orb-question::before {
    content: "";
    position: absolute;
    inset: -1px;
    border: 2px solid rgba(255, 140, 0, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: orbPing 2.6s ease-out 1.3s infinite;
}

@keyframes questionPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.14); }
}

/* Всплывающий указатель над знаком вопроса */
.orb-pointer {
    position: absolute;
    bottom: calc(67% + 16px);
    left: 50%;
    z-index: 4;
    margin: 0;
    padding: 10px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--purple), #b32cff 60%, var(--orange));
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(109, 37, 245, 0.45);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

/* Хвостик облачка, смотрит вниз на знак вопроса */
.orb-pointer::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    border: 9px solid transparent;
    border-top-color: #b32cff;
    transform: translateX(-50%);
}

.orb-pointer.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 1s;
    animation: pointerFloat 2.2s ease-in-out 1.5s infinite;
}

@keyframes pointerFloat {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -8px); }
}

/* На странице /class/ та же сфера — просто картинка, не кнопка */
.orb-static {
    cursor: default;
}

.orb-static::after {
    display: none;
}

/* Надпись в сфере на странице /class/: «OTS» крупно, «CLASS» мелко под ним.
   Сфера здесь больше, чем на главной, — чтобы текст не прижимался к краю */
.orb-static {
    width: max(44%, 116px);
    gap: 2px;
}

.orb-static-title {
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(40, 0, 90, 0.6);
}

.orb-static-sub {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    /* letter-spacing добавляет отступ и после последней буквы — компенсируем */
    margin-right: -4px;
    opacity: 0.9;
}

/* На странице /class/ ядро сферы — ссылка в личный кабинет: снова
   с расходящейся волной, как кнопка на главной */
.orb-static.orb-link {
    cursor: pointer;
    text-decoration: none;
}

.orb-static.orb-link::after {
    display: block;
}

.orb-link-hint {
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

@keyframes orbPing {
    0% { transform: scale(1); opacity: 0.8; }
    80%, 100% { transform: scale(1.55); opacity: 0; }
}

/* Окно с пояснением */
.class-modal {
    width: min(560px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 30px;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    color: var(--text);
    box-shadow: 0 30px 80px rgba(40, 0, 90, 0.35);
    overflow: auto;
}

body.dark .class-modal {
    background:
        linear-gradient(#0d081d, #0d081d) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(109, 37, 245, 0.35);
}

.class-modal::backdrop {
    background: rgba(5, 3, 13, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.class-modal[open] {
    animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.class-modal[open]::backdrop {
    animation: backdropIn 0.35s ease;
}

.class-modal.closing {
    animation: modalOut 0.22s ease forwards;
}

.class-modal.closing::backdrop {
    animation: backdropOut 0.22s ease forwards;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes modalOut {
    to { opacity: 0; transform: translateY(16px) scale(0.97); }
}

@keyframes backdropIn {
    from { opacity: 0; }
}

@keyframes backdropOut {
    to { opacity: 0; }
}

body:has(.class-modal[open]) {
    overflow: hidden;
}

.class-modal-card {
    position: relative;
    padding: 40px 36px 34px;
}

.class-modal .badge {
    margin-bottom: 20px;
    font-size: 14px;
}

.class-modal h2 {
    margin-bottom: 14px;
    padding-right: 30px;
    font-size: 28px;
    line-height: 1.2;
}

/* «OTS Class» в окне на главной — глитч как у «Outside the System».
   Окно при открытии заново запускает анимацию; сдвиг -2.4s — чтобы первый
   «сбой» случился почти сразу, а не через 3 секунды */
.class-modal-glitch {
    display: block;
    width: fit-content;
    margin: 0 0 6px;
    font-size: 46px;
    line-height: 1.1;
    animation-delay: -2.4s;
}

.class-modal-glitch::before {
    text-shadow: -4px 0 rgba(109, 37, 245, 0.9), 4px 0 rgba(215, 44, 255, 0.45);
    animation-delay: -2.4s;
}

.class-modal-glitch::after {
    text-shadow: 4px 0 rgba(255, 122, 0, 0.9), -4px 0 rgba(215, 44, 255, 0.45);
    animation-delay: -2.4s;
}

.class-modal-glitch .glitch-lines {
    animation-delay: -2.4s;
}

.class-modal-subtitle {
    display: block;
}

.class-modal-text {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.class-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
}

.class-modal-close:hover {
    background: rgba(109, 37, 245, 0.12);
    transform: rotate(90deg);
}

.class-modal-close svg {
    width: 18px;
    height: 18px;
}

.class-points {
    display: grid;
    gap: 10px;
    margin: 22px 0 28px;
    padding: 0;
    list-style: none;
}

.class-points li {
    position: relative;
    padding-left: 30px;
    font-weight: 600;
    line-height: 1.45;
}

.class-points li::before {
    content: "";
    position: absolute;
    top: 0.3em;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    box-shadow: 0 0 10px rgba(109, 37, 245, 0.5);
}

.class-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.class-modal-actions .btn {
    flex: 1 1 180px;
    min-width: 0;
    cursor: pointer;
    font-family: inherit;
}

/* Главные кнопки OTS Class сразу залиты градиентом, а не только при наведении */
.class-modal .btn.primary,
.class-hero-actions .btn.primary,
.lesson-signup.btn {
    color: #ffffff;
    background-size: 100% 100%;
    border-color: transparent;
}

.class-modal .btn.secondary {
    flex-grow: 0;
    border-color: var(--border);
    background-image: none;
    color: var(--muted);
}

.class-modal .btn.secondary:hover {
    color: var(--text);
    box-shadow: none;
}

/* Страница /class/ */
.class-hero {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 60px;
}

.class-page h1 span {
    display: block;
}

.class-accent {
    background: linear-gradient(135deg, var(--purple), #d72cff 55%, var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.class-page .subtitle {
    max-width: 620px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.6;
}

.class-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 34px;
}

.class-note,
.class-muted {
    margin-top: 14px;
    color: var(--muted);
    font-size: 15px;
}

.class-orb {
    position: relative;
    width: min(300px, 80%);
    aspect-ratio: 1;
    justify-self: center;
}

.class-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px 40px;
    margin: 70px 0 0;
    padding: 22px 26px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--card);
    list-style: none;
}

.class-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.class-features li::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 10px var(--purple);
}

.class-schedule {
    margin-top: 80px;
    scroll-margin-top: 30px;
}

.class-schedule-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}

.class-schedule h2,
.class-steps-box h2 {
    font-size: 36px;
    line-height: 1.15;
}

.class-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.class-chip {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.class-chip[aria-pressed="true"] {
    border-color: transparent;
    background: linear-gradient(135deg, var(--purple), var(--orange)) border-box;
    color: #ffffff;
}

.lesson-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 34px;
}

.lesson-grid:empty {
    display: none;
}

.lesson-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid transparent;
    border-radius: 26px;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    box-shadow: 0 18px 45px var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.35s ease;
}

.lesson-card:hover {
    transform: translateY(-6px);
}

/* В расписании вся карточка ведёт на страницу урока */
.lesson-card.is-clickable {
    cursor: pointer;
}

.lesson-open {
    text-decoration: none;
}

.lesson-tags {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.lesson-grade {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(109, 37, 245, 0.12);
    color: var(--purple);
    font-size: 14px;
    font-weight: 800;
}

body.dark .lesson-grade {
    color: #c9a8ff;
}

.lesson-subject {
    margin-left: auto;
    color: var(--muted);
    font-size: 14px;
}

.lesson-card h3 {
    margin-bottom: 10px;
    font-size: 22px;
    line-height: 1.25;
}

.lesson-description {
    color: var(--muted);
    line-height: 1.55;
}

.lesson-meta {
    display: grid;
    gap: 6px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    font-weight: 600;
}

.lesson-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.lesson-meta + .lesson-footer {
    margin-top: 20px;
}

.lesson-price {
    font-family: var(--font-heading);
    font-size: 22px;
    white-space: nowrap;
}

.lesson-signup.btn {
    min-width: 0;
    padding: 12px 20px;
    font-size: 16px;
}

/* «Запись скоро», «Привязать Discord — скоро»: кнопка видна, но не
   нажимается и не подсвечивается */
.btn.is-soon {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

.lesson-empty {
    margin-top: 30px;
    padding: 30px;
    border: 1px dashed var(--border);
    border-radius: 24px;
    background: var(--card);
}

.lesson-empty p {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.class-steps-box {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
    gap: 30px;
    margin-top: 80px;
    padding: 36px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(109, 37, 245, 0.14), rgba(255, 122, 0, 0.08));
    border: 1px solid var(--border);
    background-origin: border-box; /* градиент и под рамкой — без квадрата */
}

.class-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.class-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: 600;
    line-height: 1.4;
    counter-increment: step;
}

.class-steps li::before {
    content: counter(step);
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (max-width: 1100px) {
    .class-hero {
        grid-template-columns: 1fr;
    }

    .class-orb {
        width: min(240px, 70%);
        order: -1;
    }

    .lesson-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .class-steps-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .class-orb {
        width: min(190px, 60%);
    }

    .class-page .subtitle {
        font-size: 17px;
    }

    .class-hero-actions .btn {
        flex: 1 1 100%;
    }

    .class-features {
        justify-content: flex-start;
        flex-direction: column;
        margin-top: 50px;
    }

    .class-schedule h2,
    .class-steps-box h2 {
        font-size: 26px;
    }

    .lesson-grid {
        grid-template-columns: 1fr;
    }

    .class-steps-box {
        padding: 26px 22px;
    }

    .class-modal-card {
        padding: 34px 22px 24px;
    }

    .class-modal h2 {
        font-size: 22px;
    }

    .class-modal-glitch {
        font-size: 36px;
    }

    .class-modal .btn.secondary {
        flex-grow: 1;
    }

    .orb-pointer {
        padding: 8px 14px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .orb-button::after,
    .orb-question::before,
    .orb-question-mark,
    .orb-pointer.visible,
    .class-modal[open],
    .class-modal[open]::backdrop {
        animation: none;
    }
}

/* ==========================================================================
   Личный кабинет OTS Class (/cabinet/)
   ========================================================================== */

.cabinet-loading {
    color: var(--muted);
    font-size: 18px;
}

.cabinet-login {
    max-width: 640px;
}

.cabinet-telegram {
    margin-top: 34px;
}

.cabinet-telegram:empty {
    display: none;
}

.cabinet-dev-login {
    margin-top: 24px;
    cursor: pointer;
    font-family: inherit;
}

.cabinet-error {
    margin-top: 16px;
    color: #e5484d;
    font-weight: 700;
}

.cabinet-profile {
    display: flex;
    align-items: center;
    gap: 26px;
}

.cabinet-profile-text {
    flex: 1;
    min-width: 0;
}

.cabinet-profile h1 {
    overflow-wrap: anywhere;
}

/* Фото из Telegram или первая буква имени */
.cabinet-avatar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: 110px;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 44px;
    font-weight: 900;
    box-shadow: 0 0 30px rgba(140, 60, 255, 0.45);
}

.cabinet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cabinet-logout {
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}

.cabinet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 50px;
}

/* У преподавателя — одна карточка Discord, не на всю ширину */
.cabinet-grid.is-single {
    grid-template-columns: minmax(0, 620px);
}

.cabinet-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 30px;
    border: 1px solid transparent;
    border-radius: 26px;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    box-shadow: 0 18px 45px var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.cabinet-card h2 {
    font-size: 26px;
}

.cabinet-card .class-muted {
    margin-top: 0;
}

.cabinet-card-text {
    margin-bottom: 8px;
    color: var(--muted);
    line-height: 1.6;
}

.cabinet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cabinet-actions .btn {
    cursor: pointer;
    font-family: inherit;
}

.cabinet-notice {
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(48, 164, 108, 0.14);
    color: #30a46c;
    font-weight: 700;
    line-height: 1.5;
}

.cabinet-notice.is-error {
    background: rgba(229, 72, 77, 0.12);
    color: #e5484d;
}

/* «Смотреть как» из админки: заметная плашка, мигает на попытку действия */
.cabinet-view-as {
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 2px dashed #f5a524;
    border-radius: 16px;
    background: rgba(245, 165, 36, 0.12);
    line-height: 1.5;
}

.cabinet-view-as.is-flash {
    animation: view-as-flash 0.9s ease;
}

@keyframes view-as-flash {
    0%, 50% { background: rgba(245, 165, 36, 0.4); }
    100% { background: rgba(245, 165, 36, 0.12); }
}

.is-view-only {
    display: none !important;
}

.cabinet-purchases {
    display: grid;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cabinet-purchases:empty {
    display: none;
}

.cabinet-purchases li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
}

.cabinet-purchases span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

/* Блок «Мои уроки» */
.cabinet-section {
    margin-top: 50px;
}

.cabinet-section h2 {
    font-size: 36px;
    line-height: 1.15;
}

.cabinet-payment-notice {
    margin-top: 30px;
}

/* «Ты — реферал / преподаватель OTS Class…» */
.cabinet-role-notice {
    margin-top: 30px;
    background: rgba(109, 37, 245, 0.12);
    color: var(--purple);
}

body.dark .cabinet-role-notice {
    color: #c89bff;
}

/* Код автора у ученика: «Пришёл от автора? Введи его код» */
.author-code {
    margin-top: 24px;
    padding: 18px 22px;
    border: 1px dashed var(--border);
    border-radius: 20px;
    background: var(--card);
}

.author-code-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
}

.author-code-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-code-text .class-muted {
    margin: 0;
}

.author-code-row {
    display: flex;
    gap: 10px;
}

.author-code-row input {
    width: 180px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.author-code-error {
    flex-basis: 100%;
    margin: 0;
}

.author-code-done {
    margin: 0;
    color: #30a46c;
    font-weight: 700;
}

/* Кабинет реферала */
.referral {
    margin-top: 10px;
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 26px;
}

.referral-stat,
.referral-money-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--card);
}

.referral-stat strong {
    font-family: var(--font-heading);
    font-size: 28px;
}

.referral-stat span,
.referral-money-item span {
    color: var(--muted);
    font-size: 14px;
}

.referral-money {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.referral-money-item strong {
    font-size: 22px;
}

.referral-money-item.is-accent {
    border: 2px solid transparent;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), var(--orange)) border-box;
}

.referral-money-item.is-accent strong {
    color: var(--orange);
}

.referral-title {
    margin-top: 44px;
}

.referral-hint {
    margin-top: 6px;
}

.referral-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.referral-student {
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
}

.referral-student-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
}

.referral-student-head .class-muted,
.referral-none {
    margin: 0;
    font-size: 14px;
}

.referral-none {
    margin-top: 6px;
}

.referral-purchase {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr 1.6fr;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 15px;
}

.referral-purchase .class-muted {
    margin: 0;
}

.referral-purchase-title {
    font-weight: 700;
}

.referral-state {
    font-weight: 700;
    text-align: right;
}

.referral-purchase.is-earned .referral-state {
    color: #30a46c;
}

.referral-purchase.is-waiting .referral-state {
    color: var(--purple);
}

body.dark .referral-purchase.is-waiting .referral-state {
    color: #c89bff;
}

.referral-purchase.is-refunded .referral-state,
.referral-purchase.is-cancelled .referral-state {
    color: var(--muted);
}

.referral-empty {
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: 18px;
}

.referral-payouts {
    margin-top: 24px;
}

/* «Создай свой код автора» */
.my-code.author-create {
    grid-template-columns: 1fr;
}

.author-create .my-code-text {
    margin-top: 6px;
}

.author-create-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.author-create-row input {
    flex: 0 1 220px;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.author-create .cabinet-notice {
    margin: 0;
}

@media (max-width: 900px) {
    .referral-stats,
    .referral-money {
        grid-template-columns: 1fr 1fr;
    }

    .referral-purchase {
        grid-template-columns: 1fr 1fr;
    }

    .referral-state {
        text-align: left;
    }
}

/* Вход: «Кто ты? Ученик / Преподаватель / Реферал» и код регистрации */
.login-roles {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 26px 0 8px;
}

.login-roles-title {
    color: var(--muted);
    font-weight: 700;
}

.login-roles-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
}

.login-role {
    padding: 10px 18px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.login-role:hover {
    color: var(--purple);
}

.login-role.is-active {
    background: linear-gradient(135deg, var(--purple), var(--orange));
    color: #ffffff;
}

.login-code {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0 6px;
}

.login-code label {
    font-weight: 700;
}

.login-code-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
}

.login-code input {
    width: 240px;
    max-width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.login-code-hint {
    margin: 0;
    font-size: 14px;
}

.login-code-ok {
    max-width: 520px;
    margin: 18px 0 6px;
}

.login-no-code {
    padding: 0;
    border: 0;
    background: none;
    color: var(--purple);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

body.dark .login-no-code {
    color: #c89bff;
}

.login-no-code:hover {
    text-decoration: underline;
}

/* Код для входа (регистрации): фиолетовая рамка, спокойно — «сохрани
   и никому не давай». Код автора у реферала (.author-own) — наоборот,
   яркий оранжевый: его раздают ученикам. Так их не перепутать. */
.my-code {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px 20px;
    margin-top: 20px;
    padding: 22px 26px;
    border: 2px solid rgba(109, 37, 245, 0.55);
    border-radius: 22px;
    background: var(--card);
}

.my-code .my-code-label {
    color: var(--purple);
}

body.dark .my-code .my-code-label {
    color: #c89bff;
}

.my-code.author-own {
    border-color: transparent;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--orange), #ffb347) border-box;
    box-shadow: 0 0 30px rgba(255, 122, 0, 0.28);
}

.my-code.author-own .my-code-label,
.my-code.author-own .my-code-value {
    color: var(--orange);
}

/* У реферала код для входа — в конце кабинета, поменьше */
.referral .my-code:not(.author-own) {
    margin-top: 40px;
}

.referral .my-code:not(.author-own) .my-code-value {
    font-size: 22px;
}

.my-code-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.my-code-label {
    color: var(--orange);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 13px;
}

.my-code-value {
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text);
    user-select: all;
}

.my-code-text {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

@media (max-width: 600px) {
    .my-code {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .my-code-value {
        font-size: 22px;
    }
}

.login-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cabinet-warning {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 122, 0, 0.14);
    color: var(--orange);
    font-weight: 700;
    line-height: 1.5;
}

.cabinet-section .lesson-empty .btn {
    cursor: pointer;
}

.my-lesson-countdown {
    color: var(--muted);
    font-weight: 700;
}

/* Внизу карточки урока: отсчёт, под ним кнопка на всю ширину */
.my-lesson .lesson-footer {
    flex-direction: column;
    align-items: stretch;
}

.my-lesson-countdown:empty {
    display: none;
}

.my-lesson-join.btn {
    justify-content: center;
    min-width: 0;
    padding: 12px 20px;
    font-size: 15px;
    text-align: center;
}

.my-lesson-join.btn.primary:not(.is-soon) {
    color: #ffffff;
    background-size: 100% 100%;
    border-color: transparent;
}

/* Урок идёт прямо сейчас — карточка светится, статус зелёный */
.my-lesson.is-live {
    box-shadow: 0 0 0 2px rgba(48, 164, 108, 0.6), 0 18px 45px var(--shadow);
}

.my-lesson.is-live .lesson-grade {
    background: rgba(48, 164, 108, 0.16);
    color: #30a46c;
}

/* Подпись под уроком: перенос (оранжевая) или отмена (красная) */
.my-lesson-note {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 122, 0, 0.12);
    color: var(--orange);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.my-lesson.is-cancelled .my-lesson-note {
    background: rgba(229, 72, 77, 0.12);
    color: #e5484d;
}

.my-lesson.is-cancelled .lesson-grade {
    background: rgba(229, 72, 77, 0.14);
    color: #e5484d;
}

.my-lesson.is-cancelled h3,
.my-lesson.is-cancelled .lesson-meta {
    opacity: 0.6;
}

.my-lesson.is-cancelled .lesson-meta li:first-child {
    text-decoration: line-through;
}

.my-lesson-calendar {
    width: fit-content;
    margin: 12px 0 18px;
    color: var(--purple);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.my-lesson-calendar:hover {
    text-decoration: underline;
}

/* Прошедшие уроки — свёрнутым списком */
.cabinet-past {
    margin-top: 30px;
}

.cabinet-past summary {
    width: fit-content;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.cabinet-past .cabinet-purchases {
    margin-top: 16px;
}

.cabinet-steps {
    display: grid;
    gap: 14px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.cabinet-steps li {
    display: flex;
    gap: 12px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.5;
    counter-increment: step;
}

.cabinet-steps li::before {
    content: counter(step);
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Для родителей: чей Discord привязывать (кабинет и окно записи) */
.parent-note,
.checkout-parent {
    position: relative;
    padding: 12px 14px 12px 42px;
    border-radius: 14px;
    background: rgba(255, 122, 0, 0.09);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.parent-note {
    margin-top: 18px;
}

.checkout-parent {
    margin: 18px 0 0;
}

.parent-note::before,
.checkout-parent::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 12px;
    width: 20px;
    height: 20px;
    /* значок «взрослый и ребёнок» */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff7a00' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='6' r='3'/%3E%3Cpath d='M3 21v-2a5 5 0 0 1 10 0v2'/%3E%3Ccircle cx='17' cy='10' r='2.3'/%3E%3Cpath d='M14 21v-1.5a3 3 0 0 1 6 0V21'/%3E%3C/svg%3E") center / contain no-repeat;
}

body.dark .parent-note,
body.dark .checkout-parent {
    background: rgba(255, 122, 0, 0.1);
}

/* Пустой кабинет: ближайшие уроки из расписания */
.empty-suggest {
    display: grid;
    gap: 10px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.suggest-item {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 14px 44px 14px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.suggest-item::after {
    content: "→";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--purple);
    font-weight: 800;
}

.suggest-item:hover {
    border-color: var(--purple);
    transform: translateY(-2px);
}

.suggest-when,
.suggest-meta {
    color: var(--muted);
    font-size: 14px;
}

.suggest-item strong {
    font-size: 17px;
}

body.dark .suggest-item::after {
    color: #c9a8ff;
}

/* «Discord не открывается? Напиши нам» в карточке Discord */
.discord-note {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(109, 37, 245, 0.07);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.discord-note a {
    display: inline-block; /* почта переносится целиком, а не посреди слова */
    max-width: 100%;
    color: var(--purple);
    font-weight: 700;
    overflow-wrap: anywhere;
}

body.dark .discord-note {
    background: rgba(255, 255, 255, 0.05);
}

body.dark .discord-note a {
    color: #c9a8ff;
}

/* «Нет Discord? Как создать аккаунт» в карточке Discord */
.discord-help {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.discord-help summary {
    width: fit-content;
    color: var(--purple);
    font-weight: 700;
    cursor: pointer;
}

body.dark .discord-help summary,
body.dark .discord-help-link {
    color: #c9a8ff;
}

.discord-help .cabinet-steps {
    margin-top: 16px;
}

.discord-help .cabinet-steps li {
    font-size: 15px;
}

.discord-help-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--purple);
    font-weight: 700;
}

/* «Запись и оплата откроются скоро» под главной кнопкой /class/ */
.class-soon {
    width: fit-content;
    margin-top: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 122, 0, 0.12);
    color: var(--orange);
    font-size: 14px;
    font-weight: 700;
}

/* Описание услуги: цена, характеристики, комплектация, гарантии.
   Внизу /class/ и на странице каждого урока */
.service-box {
    margin-top: 80px;
    scroll-margin-top: 30px;
}

.service-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px 40px;
}

.service-head h2 {
    font-size: 36px;
    line-height: 1.15;
}

.service-head .class-muted {
    max-width: 640px;
    line-height: 1.6;
}

.service-price {
    display: grid;
    gap: 4px;
    text-align: right;
}

.service-price span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.service-price strong {
    font-family: var(--font-heading);
    font-size: 28px;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.service-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 24px;
    margin-top: 30px;
}

.service-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 26px;
    background: var(--card);
    box-shadow: 0 18px 45px var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.service-card h3 {
    margin-bottom: 16px;
    font-size: 20px;
}

.service-sub {
    margin: -8px 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.service-specs {
    display: grid;
    grid-template-columns: minmax(110px, auto) 1fr;
    gap: 10px 16px;
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
}

.service-specs dt {
    color: var(--muted);
}

.service-specs dd {
    margin: 0;
    font-weight: 600;
}

.service-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    line-height: 1.45;
}

.service-list li {
    position: relative;
    padding-left: 22px;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.5em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--orange));
}

.service-refund {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.service-refund a,
.lesson-back,
.lesson-more {
    color: var(--purple);
    font-weight: 700;
}

body.dark .service-refund a,
body.dark .lesson-back,
body.dark .lesson-more {
    color: #c9a8ff;
}

/* Превью урока: сверху карточки во всю ширину, 16:9 */
.lesson-cover {
    display: block;
    margin: -28px -28px 20px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 25px 25px 0 0;
    background: rgba(109, 37, 245, 0.08);
}

.lesson-cover[hidden] {
    display: none;
}

.lesson-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

a.lesson-cover:hover img {
    transform: scale(1.04);
}

/* На странице урока — с теми же отступами, что у карточки (36px) */
.lesson-detail-cover {
    margin: -36px -36px 26px;
    border-radius: 29px 29px 0 0;
    /* во всю ширину карточки; на широком экране картинка обрезается по высоте */
    aspect-ratio: auto;
    height: clamp(190px, 30vw, 400px);
}

/* Карточка в расписании: название и «Подробнее» ведут на страницу урока */
.lesson-link {
    color: inherit;
    text-decoration: none;
}

.lesson-link:hover {
    color: var(--purple);
}

.lesson-more {
    align-self: flex-start;
    margin-top: 12px;
    font-size: 15px;
    text-decoration: none;
}

.lesson-more:hover,
.lesson-back:hover {
    text-decoration: underline;
}

/* Страница одного урока */
.lesson-back {
    display: inline-block;
    margin-bottom: 26px;
    text-decoration: none;
}

.lesson-detail {
    padding: 36px;
    border: 1px solid transparent;
    border-radius: 30px;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    box-shadow: 0 18px 45px var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.lesson-detail .lesson-tags {
    justify-content: flex-start;
}

.lesson-detail .lesson-subject {
    margin-left: 0;
}

.lesson-detail h1 {
    font-size: 44px;
    line-height: 1.15;
}

.lesson-detail-text {
    margin-top: 16px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
    white-space: pre-line;
}

.lesson-detail-text:empty {
    display: none;
}

.lesson-status {
    margin-top: 18px;
    color: var(--orange);
    font-weight: 700;
}

.lesson-buy {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.lesson-buy-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 14px;
}

.lesson-buy-price > span:first-child {
    color: var(--muted);
    font-weight: 700;
}

.lesson-buy .lesson-price {
    font-size: 30px;
}

.lesson-buy .lesson-seats {
    font-size: 15px;
    font-weight: 600;
}

.lesson-page .service-box {
    margin-top: 50px;
}

/* На странице урока цена уже есть в карточке выше — у урока она своя */
.lesson-page .service-price {
    display: none;
}

@media (max-width: 1100px) {
    .service-grid {
        grid-template-columns: 1fr 1fr;
    }

    .service-card:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .service-box {
        margin-top: 60px;
    }

    .service-head h2 {
        font-size: 26px;
    }

    .service-price {
        text-align: left;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 22px;
    }

    .service-specs {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .service-specs dd + dt {
        margin-top: 10px;
    }

    .lesson-detail {
        padding: 26px 22px;
    }

    .lesson-detail-cover {
        margin: -26px -22px 20px;
    }

    .lesson-detail h1 {
        font-size: 28px;
    }

    .lesson-detail-text {
        font-size: 16px;
    }

    .lesson-buy .btn {
        flex: 1 1 100%;
    }
}

/* Страница оферты: узкая колонка, удобная для чтения */
.offer-page {
    max-width: 860px;
    margin: 0 auto;
}

.offer-page h1 {
    font-size: 44px;
    line-height: 1.15;
}

.offer-text {
    margin-top: 34px;
}

.offer-text h2 {
    margin: 36px 0 14px;
    font-size: 24px;
    line-height: 1.25;
}

.offer-text p {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

/* «Осталось 3 места» — оранжевым, когда мест мало */
.lesson-seats.is-low {
    color: var(--orange);
}

/* Кнопка в расписании для уже купленного урока */
.lesson-signup.is-done {
    border-color: rgba(48, 164, 108, 0.5);
    background: rgba(48, 164, 108, 0.14);
    color: #30a46c;
}

/* Окно записи на урок */
.checkout-details {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.checkout-details li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 15px;
}

.checkout-details span {
    color: var(--muted);
}

.checkout-details strong {
    text-align: right;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 20px 0;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.checkout-total span {
    font-weight: 700;
}

.checkout-total strong {
    font-family: var(--font-heading);
    font-size: 30px;
}

.checkout-agree {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.checkout-agree input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--purple);
    cursor: pointer;
}

.checkout-agree a {
    color: var(--purple);
}

.checkout-note {
    margin-top: 14px;
    color: var(--orange);
    font-size: 14px;
    font-weight: 700;
}

.checkout-modal .cabinet-error {
    margin-top: 14px;
}

.checkout-modal .class-modal-actions {
    margin-top: 22px;
}

.checkout-modal .btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Страница «Тестовая оплата» */
.pay-test-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 40px;
    border: 1px dashed var(--orange);
    border-radius: 30px;
    background: var(--card);
}

.pay-test-card h1 {
    font-size: 40px;
}

.pay-test-description {
    margin-top: 26px;
    font-weight: 700;
    line-height: 1.5;
}

.pay-test-amount {
    margin: 10px 0 26px;
    font-family: var(--font-heading);
    font-size: 44px;
    font-weight: 900;
}

.pay-test-card .btn {
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 900px) {
    .cabinet-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .cabinet-profile {
        flex-wrap: wrap;
        gap: 18px;
    }

    .cabinet-avatar {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }

    .cabinet-logout {
        flex: 1 1 100%;
    }

    .cabinet-card {
        padding: 24px 20px;
    }

    .cabinet-section h2 {
        font-size: 26px;
    }

    .pay-test-card {
        padding: 28px 22px;
    }

    .pay-test-card h1 {
        font-size: 30px;
    }

    .offer-page h1 {
        font-size: 30px;
    }

    .offer-text h2 {
        font-size: 20px;
    }

    .offer-text p {
        font-size: 16px;
    }
}

/* Окно записи: скидка по коду автора и «Есть код автора?» */
.checkout-discount {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    color: #30a46c;
    font-weight: 700;
}

.checkout-author {
    margin-top: 14px;
    color: var(--muted);
}

.checkout-author summary {
    width: fit-content;
    cursor: pointer;
    font-weight: 700;
}

.checkout-author-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.checkout-author-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.checkout-author-hint {
    margin: 8px 0 0;
    font-size: 13px;
}

/* Кабинет преподавателя */
.teaching {
    margin-top: 20px;
}

.teaching-title {
    margin-top: 36px;
}

.teaching-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.teaching-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 22px;
    border: 1px dashed var(--border);
    border-radius: 18px;
}

.teach-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 24px;
    border: 1px solid transparent;
    border-radius: 24px;
    background:
        linear-gradient(var(--card), var(--card)) padding-box,
        linear-gradient(135deg, var(--purple), rgba(215, 44, 255, 0.5), var(--orange)) border-box;
    box-shadow: 0 14px 36px var(--shadow);
}

.teach-card.is-past,
.teach-card.is-cancelled {
    opacity: 0.65;
}

.teach-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.teach-time {
    font-family: var(--font-heading);
    font-size: 30px;
    line-height: 1;
}

.teach-when {
    color: var(--muted);
    font-weight: 600;
}

.teach-card.is-cancelled .teach-when {
    color: #e5484d;
}

.teach-card h3 {
    margin: 4px 0 0;
    font-size: 21px;
}

.teach-tags {
    margin: 0;
    font-size: 14px;
}

.teach-count {
    margin: 4px 0;
    color: var(--muted);
}

.teach-count strong {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 22px;
}

.teach-channel {
    margin-top: 4px;
    text-decoration: none;
    color: #ffffff;
    background-size: 100% 100%;
    border-color: transparent;
}

.teach-students {
    width: 100%;
    margin-top: 6px;
}

.teach-students summary {
    cursor: pointer;
    font-weight: 700;
}

.teach-students ul {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.teach-students li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.teach-students li .class-muted {
    margin: 0;
}

.teach-nodiscord {
    color: var(--orange);
    font-weight: 600;
}

/* Кабинет преподавателя: «+ Новый урок», метка «На проверке», действия */
.teaching-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    margin-top: 10px;
    padding: 18px 22px;
    border: 1px dashed var(--border);
    border-radius: 20px;
}

.teaching-head .class-muted {
    flex: 1 1 320px;
    margin: 0;
}

.teach-card.is-review {
    border: 2px dashed var(--orange);
    background: var(--card);
}

.teaching-head .btn.primary {
    color: #ffffff;
    background-size: 100% 100%;
    border-color: transparent;
}

.teach-badge {
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 122, 0, 0.14);
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
}

.teach-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 6px;
}

.teach-actions .btn {
    padding: 9px 18px;
    font-size: 15px;
}

.teach-cancel {
    padding: 0;
    border: 0;
    background: none;
    color: #e5484d;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.teach-cancel:hover {
    text-decoration: underline;
}

/* Окно «Новый урок» */
.teach-modal .class-modal-card {
    max-width: 640px;
    text-align: left;
}

.teach-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.teach-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.teach-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
    font-size: 15px;
}

.teach-field input,
.teach-field textarea {
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    resize: vertical;
}

.teach-field.has-error input,
.teach-field.has-error textarea {
    border-color: #e5484d;
}

.teach-error {
    color: #e5484d;
    font-size: 13px;
    font-weight: 600;
}

.teach-field small.class-muted {
    margin: 0;
    font-weight: 500;
}

.teach-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.teach-preview img {
    width: 160px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

.teach-preview input[type=file] {
    font: inherit;
    font-size: 14px;
    font-weight: 500;
}

.teach-note {
    margin: 0;
    font-size: 14px;
}

/* Полностью скрываем блок ввода кода автора в модалке */
.checkout-author,
details.checkout-author,
#checkoutAuthorCode {
    display: none !important;
}
