/* ============================================
   ШРИФТЫ (SELF-HOSTED, Решение 40)
   ============================================ */
/* Заменяют подключение через Google Fonts.
   Файлы: static/fonts/*.woff2 (8 файлов).
   font-display: swap — текст виден сразу,
   шрифт подменяется после загрузки. */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/static/fonts/Inter-Light.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('/static/fonts/JetBrainsMono-Light.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/JetBrainsMono-Bold.woff2') format('woff2');
}

/* ============================================
   ОБЩИЕ СТИЛИ
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    background: #0B0B0B;
    color: #E0E0E0;
    font-family: 'Inter', sans-serif;
    /* G-2 Группа 7, АДАПТАЦИЯ-2: 100dvh (dynamic viewport height) */
    /* Fallback: 100vh для старых браузеров. */
    /* 100dvh — для современных (Chrome 108+, Safari 15.4+, Firefox 101+). */
    /* На мобильных адресная строка динамически меняет высоту — 100dvh стабильнее. */
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    /* G-2 Группа 7, АДАПТАЦИЯ-2: 100dvh с fallback */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   ШАПКА (ЕДИНАЯ ДЛЯ ВСЕХ СТРАНИЦ)
   ============================================ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}

.header-left {
    flex: 0 0 auto;
}

.menu-btn {
    background: none;
    border: none;
    color: #C4A35A;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s;
}

.menu-btn:hover {
    color: #E0E0E0;
}

.menu-icon {
    font-size: 24px;
    line-height: 1;
}

.header-center {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 0;
    padding-right: 0;
}

/* ============================================
   РАЗДЕЛИТЕЛЬ МЕЖДУ ЛОГОТИПОМ И СТАТУСОМ
   ============================================ */
.header-divider {
    flex: 0 0 1px;
    width: 1px;
    height: 32px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(196, 163, 90, 0.2) 15%,
        rgba(196, 163, 90, 0.4) 50%,
        rgba(196, 163, 90, 0.2) 85%,
        transparent
    );
    margin: 0 28px;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.header:hover .header-divider {
    opacity: 0.9;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-link:hover {
    opacity: 0.8;
    transition: opacity 0.2s;
}

.header-right {
    flex: 0 0 auto;
    text-align: right;
}

.status-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 10px;
    line-height: 1.4;
}

.level {
    color: #888;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.status {
    color: #00AA55;
    font-size: 10px;
    letter-spacing: 0.5px;
}

/* ============================================
   МЕНЮ (БОКОВОЕ)
   ============================================ */
.menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: #0A0A0A;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 40px 40px 40px;
    z-index: 1000;
    overflow-y: auto;
}

.menu.open {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.menu ul {
    list-style: none;
}

.menu ul li {
    margin-bottom: 12px;
}

.menu ul li a {
    color: #E0E0E0;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.menu ul li a:hover {
    color: #C4A35A;
}

.menu .divider {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 20px 0;
}

.menu .level-info {
    color: #666;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    margin: 20px 0 8px 0;
}

.menu .upgrade {
    color: #C4A35A !important;
    font-weight: 400 !important;
    font-size: 13px !important;
}

.menu .upgrade:hover {
    color: #D4B36A !important;
}

/* G-2 Группа 7, АДАПТАЦИЯ-3: блокировка прокрутки body при открытом меню. */
/* Класс .menu-open добавляется/убирается в common.js. */
body.menu-open {
    overflow: hidden;
}

/* ============================================
   ОСНОВНОЙ БЛОК (ГЛАВНАЯ СТРАНИЦА)
   ============================================ */
.main {
    position: relative;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 0;
}

.code-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0.4;
    z-index: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #8B8B5A;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(139, 139, 90, 0.15);
}

.content {
    position: relative;
    z-index: 1;
    max-width: 820px;
    width: 100%;
    opacity: 0;
    animation: fadeInContent 0.6s ease forwards;
}

.content .actions {
    opacity: 0;
    animation: fadeInContent 0.6s ease 0.3s forwards;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chapter-preview {
    position: relative;
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 50px 60px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 40px rgba(196, 163, 90, 0.04), 0 0 80px rgba(196, 163, 90, 0.02);
    transition: box-shadow 0.4s ease;
}

.chapter-preview:hover {
    box-shadow: 0 0 60px rgba(196, 163, 90, 0.08), 0 0 120px rgba(196, 163, 90, 0.04);
}

.chapter-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    color: #C4A35A;
    margin-bottom: 20px;
    letter-spacing: 1px;
    font-weight: 400;
}

.chapter-text-wrapper {
    margin-bottom: 20px;
}

.chapter-text {
    font-size: 14px;
    line-height: 1.9;
    color: #D0D0D0;
    font-weight: 300;
    font-family: 'Inter', sans-serif;
}

.chapter-text p {
    margin-bottom: 16px;
}

.chapter-text .epigraph {
    font-size: 16px;
    color: #C4A35A;
    font-style: italic;
    text-align: right;
    padding: 20px 30px;
    border-right: 2px solid rgba(196, 163, 90, 0.3);
    margin: 0 0 30px auto;
    max-width: 80%;
}

.chapter-text .dialogue {
    color: #B0B0B0;
    padding-left: 20px;
    border-left: 2px solid rgba(196, 163, 90, 0.2);
    margin: 8px 0;
}

.btn-expand {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #C4A35A;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 0;
    transition: color 0.3s;
    letter-spacing: 1px;
}

.btn-expand:hover {
    color: #E0E0E0;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #E0E0E0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn:hover {
    border-color: #C4A35A;
    color: #C4A35A;
    background: rgba(196, 163, 90, 0.05);
}

.btn-primary {
    background: #C4A35A;
    border-color: #C4A35A;
    color: #0B0B0B;
    font-weight: 400;
}

.btn-primary:hover {
    background: #D4B36A;
    border-color: #D4B36A;
    color: #0B0B0B;
}

/* ============================================
   АУДИО-ПЛЕЕР
   ============================================ */
.audio-player {
    background: rgba(13, 13, 13, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    display: none;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.player-play {
    background: none;
    border: 2px solid #C4A35A;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #C4A35A;
    flex-shrink: 0;
    padding: 0;
}

.player-play:hover {
    background: rgba(196, 163, 90, 0.1);
    transform: scale(1.05);
}

.player-play .play-icon {
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.player-play .pause-icon {
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
    font-weight: 400;
}

.player-progress {
    flex: 1;
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
}

.player-progress-bar {
    height: 100%;
    background: #C4A35A;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.player-progress-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.player-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #666;
    min-width: 40px;
    flex-shrink: 0;
}

.player-close {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0 4px;
    flex-shrink: 0;
}

.player-close:hover {
    color: #C4A35A;
}

/* ============================================
   СТАНДАРТЫ ТИПОГРАФИКИ
   ============================================ */
.typography-h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    color: #C4A35A;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.typography-h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    color: #C4A35A;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.typography-body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #D0D0D0;
    font-weight: 300;
    margin-bottom: 24px;
}

.typography-body:last-child {
    margin-bottom: 0;
}

.typography-epigraph {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-style: italic;
    font-weight: 300;
    color: #C4A35A;
    text-align: right;
    padding: 20px 30px 20px 0;
    border-right: 2px solid rgba(196, 163, 90, 0.3);
    margin: 32px 0 32px auto;
    max-width: 80%;
}

.typography-dialogue {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #B0B0B0;
    font-weight: 300;
    padding-left: 20px;
    border-left: 2px solid rgba(196, 163, 90, 0.2);
    margin-bottom: 12px;
}

.typography-dialogue:last-child {
    margin-bottom: 0;
}

.typography-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #666;
    letter-spacing: 0.3px;
}

/* ============================================
   ФУТЕР
   ============================================ */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
    margin-top: 60px;
    text-align: center;
    width: 100%;
}

.footer p {
    color: #444;
    font-size: 11px;
    line-height: 1.8;
    letter-spacing: 0.3px;
}

/* ============================================
   ФУТЕР: ССЫЛКИ (CSP-совместимый hover)
   ============================================ */
/* Заменяет inline onmouseover/onmouseout в base.html.
   Совместимо с CSP script-src 'self' (шаг 12). */

.footer-link {
    text-decoration: none;
    transition: color 0.3s;
}

.manifesto-link {
    color: #666;
}

.manifesto-link:hover {
    color: #C4A35A;
}

.privacy-link {
    color: #444;
}

.privacy-link:hover {
    color: #C4A35A;
}

/* ============================================
   СТРАНИЦА "МЕМУАРЫ БРАХМАНА"
   ============================================ */
.memoires-page {
    align-items: flex-start;
    padding-top: 60px;
}

.memoires-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.terminal-header {
    margin-bottom: 30px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #8B8B5A;
    text-align: left;
}

.terminal-line {
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.memoires-list {
    margin-bottom: 40px;
}

.memoire-item {
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s ease;
    margin-bottom: 2px;
    border-left: 2px solid transparent;
}

.memoire-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: #C4A35A;
}

.memoire-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #E0E0E0;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}

.memoire-item:hover .memoire-line {
    color: #C4A35A;
}

.memoire-content {
    margin-top: 10px;
    padding: 0 10px 10px 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.memoire-log {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    padding: 20px 25px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #D0D0D0;
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow-x: auto;
}

.log-line {
    margin-bottom: 2px;
    white-space: pre-wrap;
    word-break: break-word;
}

.log-line:last-child {
    margin-bottom: 0;
}

/* ============================================
   СТРАНИЦА "ГЛАВЫ"
   ============================================ */
.archive-page {
    align-items: flex-start;
    padding-top: 40px;
}

.archive-content {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
}

.archive-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.archive-item {
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 24px 30px;
    transition: border-color 0.3s, background 0.3s, transform 0.2s;
}

.archive-item:hover {
    border-color: rgba(196, 163, 90, 0.3);
    background: rgba(13, 13, 13, 0.95);
    transform: translateY(-2px);
}

.archive-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.archive-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    color: #C4A35A;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.archive-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #666;
    letter-spacing: 0.3px;
}

.archive-preview {
    color: #B0B0B0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
    font-weight: 300;
}

.archive-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.archive-actions .btn {
    padding: 0 22px;
    height: 36px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

/* ==== СТРАНИЦА /archive – DRAFT-СОСТОЯНИЕ (А-4.1.а, 13.10.2026) ===== */
.archive-item--draft {
    opacity: 0.5;
    background: rgba(13, 13, 13, 0.4);
    border-color: rgba(255, 255, 255, 0.03);
    cursor: not-allowed;
}
.archive-item--draft:hover {
    border-color: rgba(255, 255, 255, 0.05);
    transform: none;
}
.archive-item--draft .archive-title {
    color: #666;
}
.archive-item--draft .archive-preview {
    color: #555;
}

/* ============================================
   СТРАНИЦА "ГЛАВА" (ПОЛНЫЙ ТЕКСТ)
   ============================================ */
.chapter-page {
    align-items: flex-start;
    padding-top: 40px;
}

.chapter-content {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
}

.chapter-full {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 50px 60px;
    margin-bottom: 30px;
}

.chapter-full-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    color: #C4A35A;
    margin-bottom: 14px;
    letter-spacing: 1px;
    font-weight: 400;
}

.chapter-full-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.chapter-full-text {
    color: #D0D0D0;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.9;
    font-weight: 300;
    margin-bottom: 30px;
}

.chapter-full-text p {
    margin-bottom: 18px;
}

.chapter-full-text p:last-child {
    margin-bottom: 0;
}

.chapter-full-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chapter-full-actions .btn {
    padding: 0 28px;
    height: 40px;
    font-size: 13px;
}

/* ============================================
   СТРАНИЦА /levels — НОВЫЙ ДИЗАЙН
   ============================================ */
.levels-content {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.levels-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    color: #C4A35A;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 400;
}

.levels-subtitle {
    text-align: center;
    color: #888;
    font-size: 15px;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}

/* ВЕРТИКАЛЬНАЯ ЛЕСТНИЦА */
.levels-stairs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
    position: relative;
    padding-left: 20px;
}

.levels-stairs::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.level-card {
    display: flex;
    align-items: stretch;
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.level-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.level-card__line {
    width: 3px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0 2px 2px 0;
    transition: background 0.3s ease;
}

.level-card.current .level-card__line {
    background: #00AA55;
}

.level-card.locked .level-card__line {
    background: #C4A35A;
}

.level-card.phantom .level-card__line {
    background: #444;
}

.level-card__body {
    padding: 18px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.level-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.level-card__title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.level-card__icon {
    color: #C4A35A;
    font-size: 14px;
}

.level-card__name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: #E0E0E0;
    letter-spacing: 0.3px;
    font-weight: 400;
}

.level-card__status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.level-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.level-badge.free {
    background: rgba(0, 170, 85, 0.12);
    color: #00AA55;
    border-color: rgba(0, 170, 85, 0.15);
}

.level-badge.premium {
    background: rgba(196, 163, 90, 0.12);
    color: #C4A35A;
    border-color: rgba(196, 163, 90, 0.15);
}

.level-badge.current-badge {
    background: rgba(0, 170, 85, 0.08);
    color: #00AA55;
    border-color: rgba(0, 170, 85, 0.1);
}

.level-badge.locked-badge {
    background: rgba(196, 163, 90, 0.06);
    color: #888;
    border-color: rgba(255, 255, 255, 0.05);
}

.level-badge.phantom-badge {
    background: rgba(255, 255, 255, 0.03);
    color: #555;
    border-color: rgba(255, 255, 255, 0.03);
}

.level-card__desc {
    font-size: 13px;
    color: #B0B0B0;
    line-height: 1.6;
    font-weight: 300;
    margin: 2px 0 0 0;
}

.level-card__features {
    list-style: none;
    padding: 0;
    margin: 2px 0 0 0;
}

.level-card__features li {
    color: #888;
    font-size: 12px;
    line-height: 1.7;
    padding-left: 16px;
    position: relative;
    font-weight: 300;
}

.level-card__features li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #C4A35A;
    font-size: 11px;
}

/* ПРИЗРАЧНАЯ КАРТОЧКА ХРАНИТЕЛЯ */
.level-card.phantom {
    opacity: 0.5;
    background: rgba(13, 13, 13, 0.4);
    border-color: rgba(255, 255, 255, 0.03);
}

.level-card.phantom:hover {
    opacity: 0.7;
    border-color: rgba(255, 255, 255, 0.06);
}

.level-card.phantom .level-card__name {
    color: #666;
}

.level-card.phantom .level-card__desc {
    color: #666;
}

.level-card__action {
    margin-top: 4px;
}

.level-card__link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #888;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    display: inline-block;
}

.level-card__link:hover {
    color: #C4A35A;
}

/* РАЗДЕЛИТЕЛЬ */
.levels-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(196, 163, 90, 0.3), transparent);
    margin: 0 auto 40px;
}

/* ДВА БЛОКА (60/40) */
.levels-actions {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 30px;
    align-items: stretch;
}

.levels-actions__item {
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.levels-actions__item:hover {
    border-color: rgba(196, 163, 90, 0.15);
}

.levels-actions__item h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: #C4A35A;
    letter-spacing: 0.5px;
    font-weight: 400;
    margin-bottom: 20px;
}

.levels-actions__item p {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 16px;
}

.promocode-form__group {
    display: flex;
    gap: 10px;
    max-width: 100%;
}

.promocode-form__group input {
    flex: 1;
    min-width: 0;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 0 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #E0E0E0;
    outline: none;
    transition: border-color 0.3s;
    height: 40px;
}

.promocode-form__group input:focus {
    border-color: #C4A35A;
}

.promocode-form__group .btn {
    height: 40px;
    padding: 0 20px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-promo {
    background: #6C3B9E;
    border-color: #6C3B9E;
    color: #FFFFFF;
}

.btn-promo:hover {
    background: #7D4BAE;
    border-color: #7D4BAE;
    color: #FFFFFF;
}

.levels-actions__item--coop .btn-primary {
    background: #C4A35A;
    border-color: #C4A35A;
    color: #0B0B0B;
    font-weight: 400;
    padding: 0 24px;
    height: 40px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
}

.levels-actions__item--coop .btn-primary:hover {
    background: #D4B36A;
    border-color: #D4B36A;
    color: #0B0B0B;
}

.promocode-hint {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.promocode-hint a {
    color: #C4A35A;
    text-decoration: none;
    transition: color 0.3s;
}

.promocode-hint a:hover {
    color: #D4B36A;
}

/* Заменено в A-4.2.b-1 (14.10.2026): #promocodeMessage удалён.
   Используется .promocode-message + .mt-16 + .hidden.
   Причина: ID-селектор перебивал utility .mt-16 (специфичность). */

/* ============================================
   СТРАНИЦЫ: О ПРОЕКТЕ, АРТЕФАКТЫ, СОТРУДНИЧЕСТВО
   ============================================ */
.about-content,
.artifacts-content,
.cooperation-content {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.about-card {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 40px 50px;
    position: relative;
}

.about-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.about-header .title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: #C4A35A;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.about-header .status-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #666;
}

.about-header .highlight {
    color: #C4A35A;
}

.about-header .grief {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #444;
    margin-top: 4px;
}

.about-text .entry-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    color: #C4A35A;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.about-text p {
    font-size: 15px;
    line-height: 1.9;
    color: #D0D0D0;
    font-weight: 300;
    margin-bottom: 18px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text .accent {
    color: #C4A35A;
}

.about-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 12px;
}

.about-footer .verified {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #00AA55;
    letter-spacing: 0.5px;
}

.about-footer .hash {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #444;
}

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

.about-actions .btn {
    padding: 0 22px;
    height: 36px;
    font-size: 12px;
}

.about-stamp {
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.03);
    letter-spacing: 2px;
    transform: rotate(-5deg);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    .chapter-preview {
        padding: 40px 40px;
    }
    .chapter-title {
        font-size: 18px;
    }
    .chapter-text {
        font-size: 15px;
    }
    .chapter-full {
        padding: 40px 40px;
    }
}

@media (max-width: 768px) {
    .header {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .header-right {
        flex: 0 0 auto;
        margin-left: 0;
        text-align: left;
        width: 100%;
    }
    .status-group {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    .level {
        font-size: 9px;
    }
    .status {
        font-size: 9px;
    }
    .header-divider {
        height: 24px;
        margin: 0 16px;
        opacity: 0.3;
    }
    .chapter-preview {
        padding: 30px 25px;
    }
    .chapter-title {
        font-size: 18px;
    }
    .chapter-text {
        font-size: 14px;
        line-height: 1.8;
    }
    .chapter-text .epigraph {
        font-size: 15px;
        padding: 15px 20px;
        max-width: 100%;
    }
    .menu {
        width: 100%;
        padding: 50px 30px 30px 30px;
    }
    .menu ul li a {
        font-size: 14px;
    }
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn {
        text-align: center;
        padding: 0 20px;
        height: 44px;
    }
    .btn-primary {
        padding: 0 30px;
    }
    .footer {
        margin-top: 40px;
        padding-top: 20px;
    }
    .memoire-log {
        padding: 15px 18px;
        font-size: 12px;
    }
    .terminal-header {
        font-size: 12px;
    }
    .memoire-line {
        font-size: 11px;
    }
    .archive-item {
        padding: 20px 22px;
    }
    .archive-title {
        font-size: 16px;
    }
    .archive-preview {
        font-size: 14px;
        line-height: 1.7;
    }
    .archive-actions .btn {
        padding: 0 18px;
        height: 36px;
        font-size: 12px;
    }
    .chapter-full {
        padding: 30px 28px;
    }
    .chapter-full-title {
        font-size: 20px;
    }
    .chapter-full-text {
        font-size: 14px;
        line-height: 1.7;
    }
    .chapter-full-actions .btn {
        height: 38px;
        font-size: 12px;
        padding: 0 20px;
    }
    .about-card {
        padding: 30px 25px;
    }
    .about-text {
        font-size: 14px;
        line-height: 1.8;
    }
    .about-text .entry-title {
        font-size: 18px;
    }
    .about-stamp {
        display: none;
    }
    .about-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* /levels mobile */
    .levels-stairs {
        padding-left: 12px;
        gap: 12px;
    }
    .levels-stairs::before {
        left: 4px;
    }
    .level-card__body {
        padding: 14px 16px;
    }
    .level-card__name {
        font-size: 13px;
    }
    .level-card__desc {
        font-size: 12px;
    }
    .level-card__features li {
        font-size: 11px;
    }
    .level-badge {
        font-size: 9px;
        padding: 2px 8px;
    }
    .levels-actions {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .levels-actions__item {
        padding: 22px 24px;
    }
    .levels-actions__item h3 {
        font-size: 14px;
    }
    .promocode-form__group {
        flex-direction: column;
        gap: 10px;
    }
    .promocode-form__group input {
        width: 100%;
        height: 40px;
    }
    .promocode-form__group .btn {
        width: 100%;
        height: 40px;
        justify-content: center;
    }
    .levels-actions__item--coop .btn-primary {
        width: 100%;
        justify-content: center;
    }
    .levels-divider {
        margin-bottom: 30px;
    }

    /* G-2 Группа 7, АДАПТАЦИЯ-5: тач-таргеты ≥ 44px на мобильных. */
    /* WCAG 2.1 AA (2.5.5 Target Size), Apple HIG, Google Material. */
    .menu-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .menu ul li a {
        display: block;
        padding: 10px 0;
        min-height: 44px;
        line-height: 24px;
    }
    .player-play {
        width: 44px;
        height: 44px;
    }
    .player-close {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }
    .footer-link {
        display: inline-block;
        padding: 10px 0;
    }
    .logo {
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    .header {
        gap: 6px;
        padding: 10px 0 15px 0;
    }
    .level {
        font-size: 8px;
    }
    .status {
        font-size: 8px;
    }
    .menu-icon {
        font-size: 20px;
    }
    .header-right {
        flex: 0 0 auto;
        width: 100%;
    }
    .status-group {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 10px;
    }
    .header-divider {
        height: 18px;
        margin: 0 10px;
        opacity: 0.2;
    }
    .chapter-preview {
        padding: 20px 15px;
        border-radius: 12px;
    }
    .chapter-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    .chapter-text {
        font-size: 13px;
        line-height: 1.7;
    }
    .chapter-text .epigraph {
        font-size: 14px;
        padding: 12px 16px;
        border-right: none;
        border-left: 2px solid rgba(196, 163, 90, 0.3);
        text-align: left;
    }
    .btn-expand {
        font-size: 12px;
    }
    .btn {
        font-size: 12px;
        padding: 0 16px;
        height: 40px;
    }
    .btn-primary {
        padding: 0 20px;
    }
    .actions {
        gap: 10px;
        margin-top: 20px;
        padding-top: 20px;
    }
    .menu {
        padding: 40px 20px 20px 20px;
    }
    .menu ul li a {
        font-size: 13px;
    }
    .menu .level-info {
        font-size: 11px;
    }
    .menu .upgrade {
        font-size: 12px !important;
    }
    .footer {
        margin-top: 30px;
        padding-top: 15px;
    }
    .footer p {
        font-size: 9px;
        line-height: 1.6;
    }
    .memoire-log {
        padding: 12px 14px;
        font-size: 11px;
        line-height: 1.6;
    }
    .terminal-header {
        font-size: 10px;
    }
    .memoire-line {
        font-size: 10px;
    }
    .log-line {
        margin-bottom: 1px;
    }
    .archive-item {
        padding: 16px 16px;
        border-radius: 8px;
    }
    .archive-title {
        font-size: 14px;
    }
    .archive-meta {
        font-size: 10px;
    }
    .archive-preview {
        font-size: 13px;
        line-height: 1.6;
        margin-bottom: 14px;
    }
    .archive-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .archive-actions {
        gap: 8px;
        padding-top: 12px;
        flex-direction: column;
        align-items: stretch;
    }
    .archive-actions .btn {
        text-align: center;
        padding: 0 14px;
        height: 36px;
        font-size: 12px;
    }
    .chapter-full {
        padding: 20px 16px;
        border-radius: 8px;
    }
    .chapter-full-title {
        font-size: 17px;
    }
    .chapter-full-text {
        font-size: 13px;
        line-height: 1.6;
    }
    .chapter-full-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .chapter-full-actions .btn {
        text-align: center;
        height: 38px;
        font-size: 12px;
    }
    .about-card {
        padding: 20px 16px;
    }
    .about-text {
        font-size: 13px;
        line-height: 1.7;
    }
    .about-text .entry-title {
        font-size: 16px;
    }
    .about-header .title {
        font-size: 14px;
    }

    /* /levels mobile small */
    .levels-title {
        font-size: 20px;
    }
    .levels-subtitle {
        font-size: 13px;
        max-width: 100%;
        margin-bottom: 30px;
    }
    .level-card__body {
        padding: 12px 14px;
    }
    .level-card__name {
        font-size: 12px;
    }
    .level-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .level-card__status {
        gap: 4px;
    }
    .level-card__desc {
        font-size: 11px;
    }
    .level-card__features li {
        font-size: 10px;
    }
    .levels-actions__item {
        padding: 18px 16px;
    }
    .levels-actions__item h3 {
        font-size: 13px;
    }
    .levels-actions__item p {
        font-size: 12px;
    }
    .promocode-form__group input {
        font-size: 12px;
        padding: 0 12px;
    }
    .promocode-form__group .btn {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .header-divider {
        display: none;
    }
}

@media (max-width: 360px) {
    .level {
        font-size: 7px;
    }
    .status {
        font-size: 7px;
    }
    .chapter-title {
        font-size: 14px;
    }
    .chapter-text {
        font-size: 12px;
    }
    .btn {
        font-size: 11px;
        padding: 0 12px;
        height: 36px;
    }
    .chapter-preview {
        padding: 15px 12px;
    }
    .archive-item {
        padding: 12px 12px;
    }
    .archive-title {
        font-size: 13px;
    }
    .archive-preview {
        font-size: 12px;
    }
    .archive-actions .btn {
        font-size: 11px;
        height: 32px;
        padding: 0 12px;
    }
    .about-text {
        font-size: 12px;
        line-height: 1.6;
    }
    .about-text .entry-title {
        font-size: 14px;
    }
}

/* ============================================
   СТРАНИЦА /manifesto — ДЕРЕВО У ОПУШКИ
   ============================================ */

.manifesto-tree svg .line {
    stroke: #C4A35A;
    stroke-width: 1.5;
    opacity: 0.4;
    transition: opacity 0.6s ease;
}

/* ============================================
   СТРАНИЦА /404 — Ошибка неслучайна
   ============================================ */
/* ===== СТРАНИЦА /404 – ПОЛНАЯ ВЕРСИЯ (А-1.5-6, А-4.1.а, 13.10.2026) ===== */
/* Заменяет урезанный .error-terminal (был 1 селектор).
   Полный блок перенесён из 404.html (inline <style>).
   На Этапе 2 inline <style> в 404.html удаляется. */

.error-page {
    padding-top: 20px;
    align-items: flex-start;
}

.error-content {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.error-terminal {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 40px 48px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #D0D0D0;
    font-weight: 300;
}

.error-terminal .line {
    margin-bottom: 4px;
}

.error-terminal .line:last-child {
    margin-bottom: 0;
}

.error-terminal .header {
    color: #8B8B5A;
    letter-spacing: 0.5px;
    font-size: 13px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.error-terminal .error-title {
    color: #C4A35A;
    font-weight: 400;
    font-size: 16px;
    margin: 16px 0 8px 0;
}

.error-terminal .highlight {
    color: #C4A35A;
}

.error-terminal .blink {
    animation: blink 1s step-end infinite;
    display: inline-block;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.error-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.error-actions .btn {
    height: 40px;
    padding: 0 28px;
    font-size: 13px;
    font-weight: 200;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .error-terminal {
        padding: 28px 24px;
        font-size: 13px;
        line-height: 1.7;
    }
    .error-terminal .header {
        font-size: 12px;
    }
    .error-actions {
        margin-top: 22px;
        padding-top: 18px;
    }
}

@media (max-width: 480px) {
    .error-terminal {
        padding: 20px 16px;
        font-size: 12px;
        line-height: 1.6;
    }
    .error-terminal .header {
        font-size: 11px;
    }
    .error-actions {
        margin-top: 18px;
        padding-top: 14px;
    }
    .error-actions .btn {
        height: 38px;
        font-size: 12px;
        padding: 0 20px;
    }
}

/* ============================================
   НОВЫЙ КОМБИНИРОВАННЫЙ ЛОГОТИП (ФИНАЛ)
   ============================================ */

a.logo,
.logo {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: opacity 0.3s ease !important;
}

a.logo:hover,
.logo:hover {
    opacity: 0.92 !important;
}

.logo-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.6px solid #C4A35A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 400;
    color: #C4A35A;
    transition: box-shadow 0.3s ease, transform 0.25s ease;
    font-family: 'Georgia', 'Times New Roman', serif;
    padding-bottom: 1px;
    line-height: 1;
}

.logo:hover .logo-icon {
    box-shadow: 0 0 40px rgba(196, 163, 90, 0.12);
    transform: scale(1.04);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #FFFFFF;
    text-transform: uppercase;
    margin-bottom: 1px;
    height: 14px;
    line-height: 1;
}

.logo-formula {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 300;
    color: #666;
    letter-spacing: 1px;
}

/* ===== АДАПТИВНОСТЬ ЛОГОТИПА ===== */

@media (max-width: 768px) {
    a.logo,
    .logo {
        gap: 10px !important;
    }
    .logo-icon {
        width: 20px;
        height: 20px;
        font-size: 12px;
        border-width: 1.4px;
    }
    .logo-name {
        font-size: 12px;
        height: 12px;
        letter-spacing: 2px;
    }
    .logo-formula {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    a.logo,
    .logo {
        gap: 8px !important;
    }
    .logo-icon {
        width: 16px;
        height: 16px;
        font-size: 10px;
        border-width: 1.2px;
    }
    .logo-name {
        font-size: 10px;
        height: 10px;
        letter-spacing: 1.5px;
    }
    .logo-formula {
        font-size: 7px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 380px) {
    a.logo,
    .logo {
        gap: 6px !important;
    }
    .logo-icon {
        width: 14px;
        height: 14px;
        font-size: 8px;
        border-width: 1px;
    }
    .logo-name {
        font-size: 9px;
        height: 9px;
        letter-spacing: 1px;
    }
    .logo-formula {
        font-size: 6px;
    }
}

/* ============================================
   АНИМАЦИЯ "ЖИВОГО КОДА"
   ============================================ */
/* Keyframes используются в common.js (createCodeBackground).
   Перенесены из inline-стиля для совместимости с CSP
   (script-src 'self', без 'unsafe-inline' для скриптов). */

@keyframes moveUp {
    0% {
        transform: translateY(0);
        opacity: 0.25;
    }
    50% {
        opacity: 0.45;
    }
    100% {
        transform: translateY(-110%);
        opacity: 0.1;
    }
}

@keyframes fadeCode {
    0% {
        opacity: 0.25;
    }
    100% {
        opacity: 0.45;
    }
}

/* ============================================
   СТРАНИЦА /levels — ССЫЛКА ВОССТАНОВЛЕНИЯ
   ============================================ */
/* Заменяет inline style="..." + onmouseover/onmouseout
   в levels.html (шаг 12.6, CSP script-src 'self'). */

.recover-link {
    color: #00AA55;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-decoration: none;
    border: 1px solid rgba(0, 170, 85, 0.2);
    padding: 10px 28px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
}

.recover-link:hover {
    border-color: #00AA55;
    background: rgba(0, 170, 85, 0.05);
}

/* ============================================
   МЕНЮ: ССЫЛКА «ВОССТАНОВИТЬ ДОСТУП» (H24)
   ============================================ */
/* Заменяет inline style="color: #00AA55; font-weight: 400;"
   в base.html. Специфичность выше, чем .menu ul li a,
   поэтому !important не нужен. Не конфликтует с .recover-link
   (тот — для levels.html) и .menu .upgrade (другой класс). */

.menu ul li a.menu-link-recover {
    color: #00AA55;
    font-weight: 400;
}

.menu ul li a.menu-link-recover:hover {
    color: #00CC66;
}

/* ============================================
   G-2 Группа 7, АДАПТАЦИЯ-4: ЛАНДШАФТНАЯ ОРИЕНТАЦИЯ
   ============================================ */
/* На телефоне в ландшафте (например, 844×390) мало вертикального
   пространства. Уменьшаем отступы хедера, меню, контента.
   max-height: 500px ограничивает — чтобы не задеть планшеты в ландшафте
   (например, iPad 1024×768 — height 768 > 500, не попадает). */

@media (orientation: landscape) and (max-height: 500px) {
    .header {
        padding: 8px 0 10px 0;
    }
    .menu {
        padding-top: 40px;
    }
    .main {
        padding: 20px 0;
    }
    .chapter-preview {
        padding: 20px 25px;
    }
    .chapter-full {
        padding: 20px 25px;
    }
}

/* ============================================
   G-2 Группа 7, АДАПТАЦИЯ-6: FOCUS-VISIBLE
   ============================================ */
/* WCAG 2.1 AA (2.4.7 Focus Visible).
   Показывает рамку фокуса только при клавиатурной навигации (Tab),
   не при клике мышью. Не мешает мышью, помогает клавиатуре. */

:focus-visible {
    outline: 2px solid #C4A35A;
    outline-offset: 2px;
    border-radius: 2px;
}

.btn:focus-visible,
.menu-btn:focus-visible,
.player-play:focus-visible,
.player-close:focus-visible,
.btn-expand:focus-visible {
    outline: 2px solid #C4A35A;
    outline-offset: 2px;
}

.menu ul li a:focus-visible,
.footer-link:focus-visible,
.promocode-hint a:focus-visible,
.recover-link:focus-visible,
.level-card__link:focus-visible {
    outline: 2px solid #C4A35A;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================
   G-2 Группа 7, АДАПТАЦИЯ-7: PREFERS-REDUCED-MOTION
   ============================================ */
/* WCAG 2.1 AA (2.3.3 Animation from Interactions).
   Уважение к пользователям с вестибулярными расстройствами.
   Отключает анимацию «живого кода» и transition. */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .code-bg {
        display: none;
    }
}

/* ==== СТРАНИЦА /manifesto – ДЕРЕВО У ОПУШКИ (А-4.1.а, 13.10.2026) ===== */
/* ВАЖНО: @keyframes fadeInManifesto – переименован из fadeIn во избежание
   конфликта с @keyframes fadeIn (для .memoire-content).
   НЕ переименовывать обратно. (Решение 106, 13.10.2026) */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInManifesto {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.manifesto-page {
    padding-top: 20px;
    align-items: flex-start;
}

.manifesto-content {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

/* ===== СИМВОЛ ===== */
.manifesto-symbol {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeInManifesto 0.8s ease 0.2s forwards;
}

.manifesto-symbol-img {
    width: 72px;
    height: 72px;
    display: block;
    filter: invert(0.6) sepia(1) saturate(2) hue-rotate(0deg);
    transition: filter 0.4s ease, transform 0.5s ease;
}

.manifesto-symbol:hover .manifesto-symbol-img {
    filter: invert(0.5) sepia(0.3) saturate(0.5) hue-rotate(0deg) brightness(0.6);
    transform: rotate(-3deg) scale(1.02);
}

/* ===== ТЕКСТ ===== */
.manifesto-text {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 40px 48px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #D0D0D0;
    font-weight: 200;
    position: relative;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.manifesto-text-inner {
    max-width: 580px;
    width: 100%;
}

.manifesto-text .section {
    margin-bottom: 20px;
}

.manifesto-text .section:last-child {
    margin-bottom: 0;
}

.manifesto-text .lead {
    color: #C4A35A;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.manifesto-text p {
    margin-bottom: 0;
}

/* ===== ПОСЛЕДНИЙ АБЗАЦ (ВИЗУАЛЬНЫЙ АКЦЕНТ) ===== */
.manifesto-text .section-outro {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(196, 163, 90, 0.1);
    color: #C4A35A;
    font-weight: 250;
    letter-spacing: 0.2px;
}

.manifesto-text .section-outro p {
    color: #C4A35A;
}

/* ===== КНОПКА ===== */
.manifesto-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.manifesto-actions .btn {
    height: 40px;
    padding: 0 28px;
    font-size: 13px;
    font-weight: 200;
    letter-spacing: 0.5px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .manifesto-symbol-img {
        width: 60px;
        height: 60px;
    }
    .manifesto-text {
        padding: 28px 28px;
        font-size: 14px;
        line-height: 1.7;
    }
    .manifesto-text-inner {
        max-width: 100%;
    }
    .manifesto-text .section {
        margin-bottom: 16px;
    }
    .manifesto-actions {
        margin-top: 22px;
        padding-top: 18px;
    }
    .manifesto-text .section-outro {
        padding-top: 16px;
    }
}

@media (max-width: 480px) {
    .manifesto-symbol-img {
        width: 50px;
        height: 50px;
    }
    .manifesto-text {
        padding: 20px 18px;
        font-size: 13px;
        line-height: 1.6;
    }
    .manifesto-text-inner {
        max-width: 100%;
    }
    .manifesto-text .section {
        margin-bottom: 14px;
    }
    .manifesto-actions {
        margin-top: 18px;
        padding-top: 14px;
    }
    .manifesto-actions .btn {
        height: 38px;
        font-size: 12px;
        padding: 0 20px;
    }
    .manifesto-text .section-outro {
        padding-top: 14px;
    }
}

/* ==== СТРАНИЦА /privacy – ПОЛИТИКА КОНФИДЕНЦИАЛЬНОСТИ (А-4.1.а, 13.10.2026) ===== */

.privacy-page {
    padding-top: 20px;
    align-items: flex-start;
}

.privacy-content {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.privacy-card {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 40px 48px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.8;
    color: #D0D0D0;
    font-weight: 200;
}

.privacy-card .section {
    margin-bottom: 24px;
}

.privacy-card .section:last-child {
    margin-bottom: 0;
}

.privacy-card .section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #C4A35A;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 400;
}

.privacy-card .section-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #888;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    font-weight: 300;
}

.privacy-card p {
    margin-bottom: 6px;
    font-weight: 200;
}

.privacy-card p:last-child {
    margin-bottom: 0;
}

.privacy-card .list-item {
    padding-left: 20px;
    position: relative;
    margin-bottom: 4px;
    font-weight: 200;
}

.privacy-card .list-item::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #C4A35A;
    font-size: 11px;
}

.privacy-card .divider {
    width: 40px;
    height: 1px;
    background: rgba(196, 163, 90, 0.12);
    margin: 20px 0;
}

.privacy-card .meta {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 12px;
    color: #666;
    text-align: center;
    letter-spacing: 0.3px;
}

.privacy-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.privacy-actions .btn {
    height: 40px;
    padding: 0 28px;
    font-size: 13px;
    font-weight: 200;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .privacy-card {
        padding: 28px 28px;
        font-size: 13px;
        line-height: 1.7;
    }
    .privacy-card .section {
        margin-bottom: 18px;
    }
    .privacy-card .section-title {
        font-size: 12px;
    }
    .privacy-card .section-sub {
        font-size: 11px;
    }
    .privacy-actions {
        margin-top: 22px;
        padding-top: 18px;
    }
}

@media (max-width: 480px) {
    .privacy-card {
        padding: 20px 18px;
        font-size: 12px;
        line-height: 1.6;
    }
    .privacy-card .section {
        margin-bottom: 14px;
    }
    .privacy-card .section-title {
        font-size: 11px;
    }
    .privacy-card .section-sub {
        font-size: 10px;
    }
    .privacy-actions {
        margin-top: 18px;
        padding-top: 14px;
    }
    .privacy-actions .btn {
        height: 38px;
        font-size: 12px;
        padding: 0 20px;
    }
    .privacy-card .meta {
        font-size: 10px;
    }
}

/* ==== СТРАНИЦА /recover – ВОССТАНОВЛЕНИЕ ДОСТУПА (A-4.1.a, 13.10.2026) ==== */

.recover-page {
    padding-top: 20px;
    align-items: flex-start;
}

.recover-content {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.recover-card {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 40px 48px;
}

.recover-card h1 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    color: #C4A35A;
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 400;
}

.recover-card .subtitle {
    color: #888;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 24px;
}

.recover-card .subtitle .highlight {
    color: #C4A35A;
}

.recover-form__group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recover-form__group input {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #E0E0E0;
    outline: none;
    transition: border-color 0.3s;
    width: 100%;
    letter-spacing: 1px;
}

.recover-form__group input:focus {
    border-color: #C4A35A;
}

.recover-form__group input::placeholder {
    color: #444;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.recover-form__group .btn {
    height: 44px;
    font-size: 14px;
    padding: 0 32px;
    justify-content: center;
}

.recover-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.recover-message.success {
    display: block;
    background: rgba(0, 170, 85, 0.08);
    border: 1px solid rgba(0, 170, 85, 0.15);
    color: #00AA55;
}

.recover-message.error {
    display: block;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
}

.recover-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    flex-wrap: wrap;
    gap: 12px;
}

.recover-actions .btn {
    height: 36px;
    font-size: 12px;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .recover-card {
        padding: 28px 24px;
    }
    .recover-card h1 {
        font-size: 18px;
    }
    .recover-form__group .btn {
        height: 40px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .recover-card {
        padding: 20px 16px;
    }
    .recover-card h1 {
        font-size: 16px;
    }
    .recover-card .subtitle {
        font-size: 13px;
    }
    .recover-form__group input {
        font-size: 12px;
        padding: 10px 12px;
    }
    .recover-form__group .btn {
        height: 38px;
        font-size: 12px;
    }
    .recover-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .recover-actions .btn {
        justify-content: center;
    }
}


/* ==== СТРАНИЦА /admin -- ПАНЕЛЬ УПРАВЛЕНИЯ (A-4.1.b, 13.10.2026) ==== */

.admin-page {
    padding-top: 20px;
    align-items: flex-start;
}

.admin-content {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.admin-card {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 32px 36px;
    margin-bottom: 24px;
}

.admin-card h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: #C4A35A;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    font-weight: 400;
}

/* ===== СТАТИСТИКА ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 12px;
}

.stats-grid__item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 16px 20px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.stats-grid__item:hover {
    border-color: rgba(196, 163, 90, 0.15);
}

.stats-grid__item .value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    color: #C4A35A;
    font-weight: 400;
    line-height: 1.2;
}

.stats-grid__item .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #666;
    letter-spacing: 0.3px;
    margin-top: 4px;
}

.stats-grid__item .value.green {
    color: #00AA55;
}

.stats-grid__item .value.gold {
    color: #C4A35A;
}

/* ===== КНОПКА ОЧИСТКИ ===== */
.cleanup-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cleanup-section .btn {
    height: 40px;
    padding: 0 28px;
    font-size: 13px;
}

/* Заменено в A-4.2.b-1 (14.10.2026):
   привязка к родителю убрана. Универсальный .btn-danger — в конце style.css. */

.cleanup-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #888;
}

.cleanup-status .success {
    color: #00AA55;
}

.cleanup-status .error {
    color: #FF6B6B;
}

/* ===== ТАБЛИЦА ===== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th {
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    color: #888;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table td {
    padding: 8px 6px;
    color: #D0D0D0;
    font-weight: 200;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.admin-table .status-active {
    color: #00AA55;
}

.admin-table .status-inactive {
    color: #666;
}

.admin-table .status-used {
    color: #C4A35A;
}

.admin-table .btn-sm {
    padding: 4px 12px;
    height: 28px;
    font-size: 11px;
}

.admin-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-actions .btn {
    height: 36px;
    font-size: 12px;
    padding: 0 20px;
}

.admin-logs {
    max-height: 300px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #888;
    line-height: 1.8;
}

.admin-logs .log-success {
    color: #00AA55;
}

.admin-logs .log-error {
    color: #FF6B6B;
}

.admin-error {
    color: #FF6B6B;
    font-size: 14px;
    margin-top: 8px;
}

.admin-success {
    color: #00AA55;
    font-size: 14px;
    margin-top: 8px;
}

.admin-generated-codes {
    margin-top: 16px;
    padding: 12px;
    background: rgba(0, 170, 85, 0.05);
    border: 1px solid rgba(0, 170, 85, 0.1);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #00AA55;
}

.admin-generated-codes .code {
    display: block;
    margin-bottom: 4px;
    color: #C4A35A;
}

.admin-login {
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
}

.admin-login input {
    width: 100%;
    padding: 12px 16px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: #E0E0E0;
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.3s;
}

.admin-login input:focus {
    border-color: #C4A35A;
}

.admin-login .btn {
    width: 100%;
    justify-content: center;
}

/* ===== БЭКАП ===== */
.backup-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Заменено в A-4.2.b-1 (14.10.2026):
   привязка к родителю убрана. Универсальный .btn-backup — в конце style.css. */

.backup-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #888;
}

.backup-status .success {
    color: #00AA55;
}

.backup-status .error {
    color: #FF6B6B;
}

.backup-list {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #666;
    /* display: none убран в A-4.2.b-1 (14.10.2026).
       Видимость управляется классом .hidden в HTML + JS.
       Единый механизм видимости (как у .chapter-form). */
}

.backup-list .item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.backup-list .item:last-child {
    border-bottom: none;
}

/* ===== УПРАВЛЕНИЕ ГЛАВАМИ / МЕМУАРАМИ ===== */
.chapter-form {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    /* display: none убран в A-4.2.b-1 (14.10.2026).
       Видимость управляется классом .hidden в HTML + JS. */
}

.chapter-form input,
.chapter-form textarea,
.chapter-form select {
    width: 100%;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 8px 12px;
    color: #E0E0E0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
    font-family: 'Inter', sans-serif;
}

.chapter-form textarea {
    font-family: 'JetBrains Mono', monospace;
    resize: vertical;
}

.chapter-form input:focus,
.chapter-form textarea:focus,
.chapter-form select:focus {
    border-color: #C4A35A;
}

.chapter-form select option {
    background: #111;
}

.chapter-form label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #888;
    display: block;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.chapter-form input[readonly] {
    background: #0a0a0a;
    color: #888;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .admin-card {
        padding: 20px 16px;
    }
    .admin-table {
        font-size: 11px;
    }
    .admin-table th,
    .admin-table td {
        padding: 4px 4px;
    }
    .admin-actions {
        flex-direction: column;
    }
    .admin-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .cleanup-section {
        flex-direction: column;
        align-items: stretch;
    }
    .cleanup-section .btn {
        width: 100%;
        justify-content: center;
    }
    .backup-section {
        flex-direction: column;
        align-items: stretch;
    }
    .backup-section .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .stats-grid__item .value {
        font-size: 20px;
    }
    .chapter-form {
        padding: 14px;
    }
    .chapter-form input,
    .chapter-form textarea,
    .chapter-form select {
        font-size: 12px;
    }
}

/* ==== СТРАНИЦА /artifacts -- АРТ (A-4.1.b, 13.10.2026) ==== */

.art-page {
    padding-top: 20px;
    align-items: flex-start;
}

.art-content {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.art-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    color: #C4A35A;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 2px;
    font-weight: 400;
}

.art-subtitle {
    text-align: center;
    color: #888;
    font-size: 15px;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 40px;
    font-weight: 300;
}

/* ===== ДВЕ КАРТИНКИ (ПРЕВЬЮ МЕРЧА) ===== */
.art-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

.art-preview__item {
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.2s ease;
}

.art-preview__item:hover {
    border-color: rgba(196, 163, 90, 0.25);
    transform: translateY(-3px);
}

.art-preview__item img {
    width: 100%;
    height: auto;
    display: block;
    background: #0A0A0A;
}

.art-preview__item .label {
    padding: 12px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #666;
    letter-spacing: 1px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.art-preview__item .label .highlight {
    color: #C4A35A;
}

/* ===== РАЗДЕЛИТЕЛЬ ===== */
.art-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, rgba(196, 163, 90, 0.3), transparent);
    margin: 0 auto 40px;
}

/* ===== СЕТКА КАТЕГОРИЙ (ПЛАТОНОВЫ ТЕЛА) ===== */
.art-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.art-grid__item {
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.2s ease;
    text-align: center;
    cursor: default;
}

.art-grid__item:hover {
    border-color: rgba(196, 163, 90, 0.2);
    background: rgba(13, 13, 13, 0.95);
    transform: translateY(-2px);
}

/* ПЛАТОНОВЫ ТЕЛА (SVG) */
.art-grid__icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    color: #C4A35A;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.art-grid__item:hover .art-grid__icon {
    opacity: 1;
    transform: scale(1.05);
}

.art-grid__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.art-grid__label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #888;
    letter-spacing: 1px;
    font-weight: 300;
}

.art-grid__item:hover .art-grid__label {
    color: #C4A35A;
}

/* ===== БЛОК ВНИЗУ С ПРИЗЫВОМ ===== */
.art-cta {
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 32px 40px;
    text-align: center;
}

.art-cta p {
    font-size: 15px;
    color: #B0B0B0;
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 20px;
}

.art-cta .art-cta__highlight {
    color: #C4A35A;
}

.art-cta__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.art-cta__actions .btn {
    padding: 0 28px;
    height: 40px;
    font-size: 13px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .art-title {
        font-size: 24px;
    }
    .art-subtitle {
        font-size: 14px;
        max-width: 100%;
        margin-bottom: 30px;
    }
    .art-preview {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 36px;
    }
    .art-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin-bottom: 36px;
    }
    .art-grid__item {
        min-height: 130px;
        padding: 16px 12px;
    }
    .art-grid__icon {
        width: 40px;
        height: 40px;
    }
    .art-grid__label {
        font-size: 10px;
    }
    .art-cta {
        padding: 24px 20px;
    }
    .art-cta p {
        font-size: 14px;
    }
    .art-cta__actions {
        flex-direction: column;
        align-items: center;
    }
    .art-cta__actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .art-divider {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .art-title {
        font-size: 20px;
        letter-spacing: 1px;
    }
    .art-subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }
    .art-preview {
        gap: 12px;
        margin-bottom: 28px;
    }
    .art-preview__item .label {
        font-size: 9px;
        padding: 8px 12px;
    }
    .art-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 28px;
    }
    .art-grid__item {
        min-height: 110px;
        padding: 12px 8px;
        border-radius: 8px;
    }
    .art-grid__icon {
        width: 32px;
        height: 32px;
        margin-bottom: 6px;
    }
    .art-grid__label {
        font-size: 9px;
        letter-spacing: 0.5px;
    }
    .art-cta {
        padding: 20px 16px;
        border-radius: 8px;
    }
    .art-cta p {
        font-size: 13px;
        margin-bottom: 16px;
    }
    .art-cta__actions .btn {
        height: 38px;
        font-size: 12px;
        max-width: 100%;
    }
    .art-divider {
        margin-bottom: 24px;
        width: 40px;
    }
}

/* ==== СТРАНИЦА /cooperation -- СОТРУДНИЧЕСТВО (A-4.1.b, 13.10.2026) ==== */

.coop-page {
    padding-top: 20px;
    align-items: flex-start;
}

.coop-content {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

/* ТЕРМИНАЛЬНЫЙ БЛОК */
.coop-terminal {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 40px 45px;
    margin-bottom: 30px;
    font-family: 'JetBrains Mono', monospace;
}

.coop-terminal__header {
    color: #8B8B5A;
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.coop-terminal__header .line {
    margin-bottom: 2px;
}

.coop-terminal__header .line:last-child {
    margin-bottom: 0;
}

.coop-terminal__body {
    color: #D0D0D0;
    font-size: 14px;
    line-height: 1.9;
    font-weight: 300;
}

.coop-terminal__body .highlight {
    color: #C4A35A;
}

.coop-terminal__body .accent {
    color: #C4A35A;
    font-weight: 400;
}

.coop-terminal__body p {
    margin-bottom: 16px;
}

.coop-terminal__body p:last-child {
    margin-bottom: 0;
}

.coop-terminal__body .divider {
    width: 40px;
    height: 1px;
    background: rgba(196, 163, 90, 0.2);
    margin: 20px 0;
}

.coop-terminal__body .list {
    margin: 12px 0 20px 0;
    padding-left: 4px;
}

.coop-terminal__body .list-item {
    color: #B0B0B0;
    font-size: 13px;
    line-height: 1.8;
    padding-left: 20px;
    position: relative;
}

.coop-terminal__body .list-item::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #C4A35A;
}

.coop-terminal__footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #666;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.coop-terminal__footer .status {
    color: #00AA55;
}

/* ===== ФОРМА ===== */
.coop-form {
    background: rgba(13, 13, 13, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 32px 36px;
}

.coop-form__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #C4A35A;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.coop-form__sub {
    font-size: 13px;
    color: #888;
    font-weight: 300;
    margin-bottom: 20px;
    line-height: 1.6;
}

.coop-form__group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coop-form__group label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #888;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.coop-form__group input,
.coop-form__group textarea {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #E0E0E0;
    transition: border-color 0.3s;
    outline: none;
    width: 100%;
}

.coop-form__group input:focus,
.coop-form__group textarea:focus {
    border-color: #C4A35A;
}

.coop-form__group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: 'Inter', sans-serif;
}

.coop-form__actions {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 4px;
}

.coop-form__actions .btn {
    height: 40px;
    padding: 0 32px;
    font-size: 13px;
}

.coop-form__message {
    font-size: 13px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    display: none;
}

.coop-form__message.success {
    display: block;
    background: rgba(0, 170, 85, 0.08);
    border: 1px solid rgba(0, 170, 85, 0.15);
    color: #00AA55;
}

.coop-form__message.error {
    display: block;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .coop-terminal {
        padding: 28px 24px;
    }
    .coop-terminal__body {
        font-size: 13px;
    }
    .coop-terminal__body .list-item {
        font-size: 12px;
    }
    .coop-form {
        padding: 24px 20px;
    }
    .coop-form__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .coop-form__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .coop-terminal {
        padding: 20px 16px;
        border-radius: 8px;
    }
    .coop-terminal__header {
        font-size: 11px;
    }
    .coop-terminal__body {
        font-size: 12px;
        line-height: 1.7;
    }
    .coop-terminal__body .list-item {
        font-size: 11px;
    }
    .coop-form {
        padding: 18px 14px;
        border-radius: 8px;
    }
    .coop-form__title {
        font-size: 13px;
    }
    .coop-form__sub {
        font-size: 12px;
    }
    .coop-form__group input,
    .coop-form__group textarea {
        font-size: 13px;
        padding: 8px 12px;
    }
    .coop-form__group textarea {
        min-height: 80px;
    }
    .coop-form__actions .btn {
        height: 38px;
        font-size: 12px;
    }
}

/* ==== СТРАНИЦА /profile -- ЛИЧНЫЙ КАБИНЕТ (A-4.1.b, 13.10.2026) ==== */

.profile-page {
    padding-top: 20px;
    align-items: flex-start;
}

.profile-content {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.profile-card {
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 40px 48px;
}

.profile-header {
    font-family: 'JetBrains Mono', monospace;
    color: #8B8B5A;
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.profile-status .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #666;
    letter-spacing: 0.3px;
}

.profile-status .value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: #C4A35A;
    font-weight: 400;
}

.profile-level-desc {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #B0B0B0;
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.profile-level-desc .highlight {
    color: #C4A35A;
}

/* ============================================
   RECOVERY-КОД
   ============================================ */

.recovery-block {
    margin-bottom: 24px;
    padding: 20px 24px;
    background: rgba(196, 163, 90, 0.03);
    border: 1px solid rgba(196, 163, 90, 0.12);
    border-radius: 8px;
}

.recovery-block__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.recovery-block__title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #C4A35A;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.recovery-block__code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: #E8D5A8;
    letter-spacing: 1px;
    margin-bottom: 12px;
    word-break: break-all;
}

.recovery-block__code--new {
    color: #FFE9B0;
    background: rgba(196, 163, 90, 0.08);
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid rgba(196, 163, 90, 0.25);
}

.recovery-block__hint {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #888;
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 16px;
}

.recovery-block__hint strong {
    color: #C4A35A;
    font-weight: 400;
}

.recovery-block__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.recovery-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(196, 163, 90, 0.3);
    color: #C4A35A;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 400;
}

.recovery-btn:hover {
    background: rgba(196, 163, 90, 0.08);
    border-color: rgba(196, 163, 90, 0.5);
    color: #E8D5A8;
}

.recovery-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.recovery-msg {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    display: none;
}

.recovery-msg--success {
    color: #A8D5A8;
    background: rgba(120, 200, 120, 0.06);
    border: 1px solid rgba(120, 200, 120, 0.2);
}

.recovery-msg--error {
    color: #D5A8A8;
    background: rgba(200, 120, 120, 0.06);
    border: 1px solid rgba(200, 120, 120, 0.2);
}

.recovery-msg--visible {
    display: block;
}

.recovery-placeholder {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #555;
    font-weight: 300;
    font-style: italic;
}

/* ============================================
   ПЛЕЙСХОЛДЕРЫ
   ============================================ */

.profile-placeholder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.profile-placeholder__item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 16px 20px;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: default;
}

.profile-placeholder__item:hover {
    border-color: rgba(196, 163, 90, 0.15);
}

.profile-placeholder__item .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
    height: 24px;
}

.profile-placeholder__item .icon svg {
    width: 22px;
    height: 22px;
    stroke: #C4A35A;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.profile-placeholder__item:hover .icon svg {
    opacity: 1;
}

.profile-placeholder__item .title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #666;
    letter-spacing: 0.5px;
}

.profile-placeholder__item .desc {
    font-size: 11px;
    color: #444;
    font-weight: 300;
    margin-top: 4px;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.profile-actions .btn {
    height: 40px;
    padding: 0 28px;
    font-size: 13px;
    font-weight: 200;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .profile-card {
        padding: 28px 24px;
    }
    .profile-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .profile-placeholder {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .profile-actions {
        margin-top: 22px;
        padding-top: 18px;
    }
    .recovery-block {
        padding: 16px 18px;
    }
    .recovery-block__header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .profile-card {
        padding: 20px 16px;
    }
    .profile-status .value {
        font-size: 14px;
    }
    .profile-actions {
        margin-top: 18px;
        padding-top: 14px;
    }
    .profile-actions .btn {
        height: 38px;
        font-size: 12px;
        padding: 0 20px;
    }
    .profile-placeholder__item .icon svg {
        width: 18px;
        height: 18px;
    }
    .recovery-block__code {
        font-size: 13px;
        letter-spacing: 0.5px;
    }
    .recovery-block__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .recovery-btn {
        width: 100%;
    }
}

/* ==== A-4.2.a-1 -- UTILITY-КЛАССЫ (13.10.2026) ==== */
/* Первый под-подпакет A-4.2: замена inline-атрибутов style="..." на классы.
   Файлы: 404.html, about.html, privacy.html, profile.html.
   Стратегия: гибрид (utility для повторяющихся, семантические для уникальных). */

.hidden { display: none; }
.text-error { color: #FF6B6B; }
.text-success { color: #00AA55; }
.text-gold { color: #C4A35A; }
.text-muted { color: #666; }
.text-dim { color: #888; }
.text-center { text-align: center; }
.mt-6 { margin-top: 6px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.ml-20 { margin-left: 20px; }
.pl-20 { padding-left: 20px; }
.fs-12 { font-size: 12px; }
.fw-400 { font-weight: 400; }

/* ==== A-4.2.a-1 -- СЕМАНТИЧЕСКИЕ КЛАССЫ (13.10.2026) ==== */

.terminal-header-divider {
    display: block;
    color: #666;
    font-size: 11px;
}

.error-terminal-hint {
    margin-top: 16px;
    color: #666;
    font-size: 12px;
}

.about-epilogue {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

.about-epilogue-quote {
    color: #888;
    font-style: italic;
}

.privacy-inline-link {
    color: #C4A35A;
    text-decoration: none;
}

.privacy-inline-link:hover {
    color: #D4B36A;
}

/* ==== A-4.2.a-2 -- СЕМАНТИЧЕСКИЕ КЛАССЫ (13.10.2026) ==== */
/* Второй под-подпакет A-4.2: archive.html, memoires.html.
   Стратегия: гибрид (utility для повторяющихся, семантические для уникальных). */

.archive-btn-disabled {
    border-color: rgba(255, 255, 255, 0.05);
    color: #666;
    cursor: pointer;
    text-decoration: none;
}

.memoire-cursor {
    color: #00FF41;
}

/* ==== A-4.2.a-3 -- МОДИФИКАТОР ПЛЕЕРА (13.10.2026) ==== */
/* Третий под-подпакет A-4.2: chapter.html, index.html.
   .audio-player--chapter — модификатор: плеер главы имеет
   дополнительный отступ снизу (30px). display: none наследуется
   от .audio-player (базовое значение в style.css). */

.audio-player--chapter {
    margin-bottom: 30px;
}

/* ==== A-4.2.b-1 -- КЛАССЫ ДЛЯ ADMIN.HTML (14.10.2026) ==== */
/* Первый под-подпакет A-4.2.b: замена inline-атрибутов style="..." в admin.html.
   Стратегия: гибрид (utility для повторяющихся, семантические для уникальных).
   Переиспользование существующих классов (.stats-grid, .btn-sm, .text-muted, .hidden, .mt-12).
   Все новые классы — семантические или utility. Никаких привязок к родителю. */

/* ===== ADMIN: ЗАГОЛОВКИ ===== */
.admin-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    color: #C4A35A;
}
.admin-title--login {
    margin-bottom: 24px;
}

/* ===== ADMIN: ШАПКА ПАНЕЛИ ===== */
.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

/* ===== ADMIN: КНОПКА МАЛОГО РАЗМЕРА В ШАПКЕ ===== */
.admin-btn-small {
    height: 36px;
    font-size: 12px;
    padding: 0 20px;
}

/* ===== ADMIN: СОСТОЯНИЕ ЗАГРУЗКИ ===== */
.admin-stats-placeholder {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

/* ===== ADMIN: ОБЁРТКА ТАБЛИЦЫ (горизонтальный скролл) ===== */
.admin-table-wrapper {
    overflow-x: auto;
}

/* ===== ADMIN: ПУСТАЯ ЯЧЕЙКА ТАБЛИЦЫ ===== */
.admin-table-empty {
    text-align: center;
    color: #666;
}

/* ===== ADMIN: ЯЧЕЙКА ДЕЙСТВИЙ В ТАБЛИЦЕ ===== */
.admin-table-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* ===== ADMIN: КОД / ID В ТАБЛИЦЕ ===== */
.admin-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #C4A35A;
}

/* ===== ADMIN: ДАТА В ТАБЛИЦЕ ===== */
.admin-date {
    font-size: 11px;
    color: #666;
}

/* ===== ADMIN: БЛОК КНОПКИ ДЕЙСТВИЯ СЕКЦИИ ===== */
.admin-section-actions {
    margin-bottom: 16px;
}

/* ===== ADMIN: ФОРМА (главы / мемуары) ===== */
.admin-form-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #C4A35A;
    margin-bottom: 16px;
}

.admin-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-form-grid-2-1 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-form-field {
    margin-bottom: 12px;
}

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

.admin-form-message {
    margin-top: 12px;
    font-size: 13px;
}

/* ===== ADMIN: РЕЗУЛЬТАТ ОПЕРАЦИИ (бэкап / очистка) ===== */
.admin-result-success {
    background: rgba(0, 170, 85, 0.05);
    border: 1px solid rgba(0, 170, 85, 0.1);
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
    color: #00AA55;
}

/* ===== ADMIN: СЕТКА СТАТИСТИКИ (3 КОЛОНКИ) ===== */
/* Базовый .stats-grid — 4 колонки (в style.css).
   Для admin.html нужны 3 колонки. Используем модификатор. */
.stats-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
    .stats-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .stats-grid--3 {
        grid-template-columns: 1fr;
    }
}

/* ===== УНИВЕРСАЛЬНЫЕ КНОПКИ ===== */
/* Заменяют привязки к родителю (.cleanup-section .btn-danger,
   .backup-section .btn-backup). Теперь работают в любом контексте. */

.btn-danger {
    background: #8B0000;
    border-color: #8B0000;
    color: #FFFFFF;
}
.btn-danger:hover {
    background: #A00000;
    border-color: #A00000;
    color: #FFFFFF;
}
.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-backup {
    background: #1a5a8b;
    border-color: #1a5a8b;
    color: #FFFFFF;
}
.btn-backup:hover {
    background: #2a6a9b;
    border-color: #2a6a9b;
    color: #FFFFFF;
}
.btn-backup:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-publish {
    background: #1a5a8b;
    border-color: #1a5a8b;
    color: #FFFFFF;
}
.btn-publish:hover {
    background: #2a6a9b;
    border-color: #2a6a9b;
    color: #FFFFFF;
}
.btn-publish:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ADMIN: RECOVERY-КОД (для levels.js) ===== */
/* Согласовано с .recovery-block__code--new (profile.html).
   Label — 11px, value — 18px. */

.promocode-recovery-code {
    background: rgba(196, 163, 90, 0.08);
    border: 1px solid rgba(196, 163, 90, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    margin: 12px 0;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

.promocode-recovery-label {
    font-size: 11px;
    color: #888;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.promocode-recovery-value {
    font-size: 18px;
    color: #C4A35A;
    letter-spacing: 1px;
    word-break: break-all;
}

/* ===== UTILITY: ДОПОЛНЕНИЕ ===== */
.mt-8 {
    margin-top: 8px;
}

/* ==== A-4.2.b-1 -- ДОПОЛНЕНИЕ (14.10.2026) ==== */
/* Дополнительные решения, согласованные при работе над A-4.2.b-1.
   Вариант Б: устранение скрытых конфликтов и дублирования. */

/* Сообщение промокода (levels.html). Заменяет #promocodeMessage.
   Причина: ID-селектор перебивал utility .mt-16 (специфичность). */
.promocode-message {
    font-size: 13px;
}

/* ==== A-4.2.b-2 -- СТАТУСЫ ГЛАВ (15.10.2026) ==== */
/* Для loadChapters() в admin.js. Заменяют динамический inline-цвет.
   .status-published — #00AA55 (как .status-active).
   .status-draft — #C4A35A (как .status-used).
   Причина: inline-цвет несовместим с CSP style-src без 'unsafe-inline'. */

.status-published {
    color: #00AA55;
}

.status-draft {
    color: #C4A35A;
}

/* ==== A-4.2.b-3 -- LEVELS: ОБЁРТКА ССЫЛКИ ВОССТАНОВЛЕНИЯ (15.10.2026) ==== */
/* Для levels.html (b-3). Заменяет inline style="text-align:center; margin-bottom:30px;".
   Причина: inline-стиль несовместим с CSP style-src без 'unsafe-inline'. */

.levels-recover-wrap {
    text-align: center;
    margin-bottom: 30px;
}

/* ==== A-4.2.b-2 -- ADMIN: DASHBOARD STATS (15.10.2026) ==== */
/* Архитектура «секции + метрики + конфиг» (Решение 140).
   Данные рендерятся из STATS_CONFIG в admin.js.
   Расширяемо: новые секции/метрики — через конфиг, без правок CSS.
   Изоляция: префикс .admin- (Решение 141). */

/* Секция (смысловая группа) */
.admin-stats__section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 16px;
}

/* Заголовок секции */
.admin-stats__section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #666;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Внутренняя сетка метрик (2 колонки) */
.admin-stats__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Значение метрики */
.admin-stats__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 400;
    color: #C4A35A; /* gold по умолчанию */
}

/* Модификаторы цвета значения */
.admin-stats__value--green {
    color: #00AA55;
}

.admin-stats__value--gold {
    color: #C4A35A;
}

/* Подпись метрики */
.admin-stats__label {
    font-size: 11px;
    color: #666;
}

/* Сводная строка внизу */
.admin-stats__summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 11px;
    color: #666;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Внешняя сетка секций (3 колонки) */
.admin-stats__sections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 16px;
}

/* Адаптивность внешней сетки секций */
@media (max-width: 768px) {
    .admin-stats__sections {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .admin-stats__sections {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .admin-stats__value {
        font-size: 16px;
    }
}