/* --- style.css --- */
/* ============================================================
 * PRIDE RESEARCH — публичные стили
 * ============================================================ */
.pride-card,.pride-form,.pride-battery,.pride-consent,.pride-profile,.pride-results,.pride-intake{background:#fafafa;border-radius:10px;padding:1.4em 1.4em 1.6em;color:#222;margin-bottom:1.2em;border:1px solid #eee}
.pride-consent{background:#fff;border:1px solid #e6e6e6}
.pride-consent h2{margin-top:0;color:#5a1a3a}
.pride-consent-lead{font-size:1.05em;color:#444;background:#f7f2f5;border-left:4px solid #8e2a5c;padding:.8em 1em;border-radius:0 6px 6px 0}
.pride-consent-section{margin:1.2em 0}
.pride-consent-section h3{margin:0 0 .4em;color:#5a1a3a;font-size:1.05em}
.pride-consent-section p,.pride-consent-section li{line-height:1.5}
.pride-consent-check{display:flex;gap:.6em;align-items:flex-start;margin:.8em 0;padding:.7em .9em;background:#f7f2f5;border-radius:8px;line-height:1.4;cursor:pointer}
.pride-consent-check input{margin-top:.25em;accent-color:#8e2a5c;width:18px;height:18px}
.pride-consent-code{margin-bottom:1em}
.pride-done{background:#eef7ef;border:1px solid #c8e6c9;border-radius:10px;padding:1.4em;text-align:center}
.pride-scale-title{margin:.2em 0 .2em;font-size:1.25em}
.pride-scale-meta{color:#8e2a5c;font-size:.9em;margin:.1em 0 .6em}
.pride-scale-instruction{color:#555;margin:.2em 0 1.2em;line-height:1.45}
.pride-item{padding:1em 0;border-bottom:1px solid #ececec}
.pride-item:last-child{border-bottom:none}
.pride-item-text{margin:0 0 .6em;font-weight:600;line-height:1.4}
.pride-item-label{display:block;margin-bottom:.15em}
.pride-req{color:#8e2a5c}
.pride-note{font-size:.9em;color:#666;margin:.2em 0 .6em;line-height:1.35}
.pride-warning{background:#fff3cd;border:1px solid #ffe082;color:#6d4c00;padding:.8em 1em;border-radius:6px;margin-bottom:1em;font-size:.93em}
.pride-warning a{color:#8e2a5c}
.pride-form input[type=text],.pride-form input[type=email],.pride-form input[type=number],.pride-form input[type=password],.pride-form select,.pride-form textarea,.pride-textarea{width:100%;padding:.6em .7em;box-sizing:border-box;border:1px solid #d5d5d5;border-radius:6px;font-size:1em;background:#fff;margin-top:.2em}
.pride-form textarea,.pride-textarea{resize:vertical}
.pride-btn-row{display:flex;flex-wrap:wrap;gap:.6em;margin-top:1em;align-items:center}
.pride-actions{display:flex;flex-wrap:wrap;gap:.6em;margin-top:1em}
.pride-btn{display:inline-block;padding:.7em 1.4em;border-radius:8px;text-decoration:none;font-weight:600;background:#fff;color:#5a1a3a;border:1px solid #d9c4d1;cursor:pointer;font-size:1em;line-height:1.2;transition:background .15s,color .15s}
.pride-btn:hover{background:#f5eef2;color:#5a1a3a}
.pride-btn-primary{background:#8e2a5c;color:#fff;border-color:#8e2a5c}
.pride-btn-primary:hover{background:#6f2048;color:#fff;border-color:#6f2048}
.pride-btn-muted{background:#f3f3f3;color:#555;border-color:#ddd}
.pride-btn-muted:hover{background:#eaeaea;color:#333}
.pride-details{margin-top:1em;padding:.6em .8em;background:#f6f6f6;border-radius:8px}
.pride-details summary{cursor:pointer;font-weight:600;color:#5a1a3a}
.pride-nav{text-align:center;margin-top:1.5em;font-size:.9em;color:#888}
.pride-nav a{margin:0 .5em;color:#8e2a5c;text-decoration:none}
.pride-progress{margin:.4em 0 1.2em}
.pride-progress-label{font-size:.9em;margin-bottom:.35em;color:#444}
.pride-progress-track{height:8px;background:#e6e6e6;border-radius:4px;overflow:hidden}
.pride-progress-fill{height:100%;background:linear-gradient(90deg,#8e2a5c,#b8447c);transition:width .3s}

/* Верхний прогресс-бар с разделами */
.pride-steps{display:flex;flex-wrap:wrap;gap:.4em;margin:1em 0;padding:.7em;background:#fff;border:1px solid #eee;border-radius:10px}
.pride-step{display:flex;align-items:center;gap:.4em;padding:.35em .7em;border-radius:20px;background:#f6f6f6;text-decoration:none;color:#555;font-size:.8em;transition:background .15s}
.pride-step:hover{background:#f5eef2}
.pride-step-num{display:inline-flex;align-items:center;justify-content:center;width:1.6em;height:1.6em;border-radius:50%;background:#ddd;color:#666;font-weight:600;font-size:.85em}
.pride-step.done .pride-step-num{background:#3fae5a;color:#fff}
.pride-step.current{background:#8e2a5c;color:#fff}
.pride-step.current .pride-step-num{background:#fff;color:#8e2a5c}
.pride-step-label{white-space:nowrap;max-width:14em;overflow:hidden;text-overflow:ellipsis}

.pride-battery-layout{display:flex;gap:1.4em;align-items:flex-start}
.pride-battery-main{flex:1;min-width:0}
.pride-scales-menu{flex:0 0 260px;background:#fff;border:1px solid #eee;border-radius:8px;padding:.9em;position:sticky;top:1em}
.pride-scales-menu h3{margin:.1em 0 .7em;font-size:1em;color:#444}
.pride-scales-menu ul{list-style:none;margin:0;padding:0}
.pride-scales-menu li a{display:flex;align-items:center;gap:.5em;padding:.45em .55em;border-radius:6px;text-decoration:none;color:#333;font-size:.9em}
.pride-scales-menu li.current a{background:#f5eef2;color:#8e2a5c;font-weight:600}
.pride-scales-menu li.live a{background:#fff8e1;color:#8a6d00}
.pride-menu-num{display:inline-flex;align-items:center;justify-content:center;width:1.6em;height:1.6em;border-radius:50%;background:#eee;color:#666;font-size:.8em;flex:0 0 auto}
.pride-scales-menu li.current .pride-menu-num{background:#8e2a5c;color:#fff}
.pride-scales-menu li.live .pride-menu-num{background:#e0a800;color:#fff}
.pride-menu-title{flex:1 1 auto;line-height:1.2}
.pride-menu-time{font-size:.72em;color:#999;white-space:nowrap}
.pride-menu-status{color:#3fae5a;font-weight:700}
.pride-prev-link{margin:0 0 .6em;font-size:.88em}
.pride-prev-link a{color:#8e2a5c;text-decoration:none}

/* Likert pills */
.pride-pills{display:flex;flex-wrap:wrap;gap:.4em}
.pride-pill{display:inline-flex;align-items:center;gap:.35em;min-width:3em;height:2.6em;padding:0 .8em;border:1px solid #d5d5d5;border-radius:6px;background:#fff;cursor:pointer;font-weight:600;color:#444}
.pride-pill input{position:static;margin:0;width:14px;height:14px;cursor:pointer;accent-color:#8e2a5c}
.pride-pill:hover{border-color:#8e2a5c;color:#8e2a5c}
.pride-pill:has(input:checked),.pride-pill.is-checked{background:#8e2a5c;border-color:#8e2a5c;color:#fff}
.pride-pills-labels{display:flex;justify-content:space-between;font-size:.82em;color:#888;margin-top:.35em}
.pride-radio-inline{display:flex;flex-wrap:wrap;gap:.4em}
.pride-radio{display:inline-flex;align-items:center;gap:.45em;padding:.5em .9em;border:1px solid #d5d5d5;border-radius:20px;background:#fff;cursor:pointer;font-weight:400}
.pride-radio input{position:static;margin:0;width:16px;height:16px;cursor:pointer;accent-color:#8e2a5c}
.pride-radio:hover{border-color:#8e2a5c}
.pride-radio:has(input:checked),.pride-radio.is-checked{background:#f5eef2;border-color:#8e2a5c;color:#8e2a5c;font-weight:600}
.pride-tile{display:inline-flex;align-items:center;gap:.5em;padding:.55em .95em;border:1px solid #d5d5d5;border-radius:20px;background:#fff;cursor:pointer;font-weight:400}
.pride-tile input{position:static;margin:0;width:16px;height:16px;cursor:pointer;accent-color:#8e2a5c}
.pride-tile:has(input:checked),.pride-tile.is-checked{background:#8e2a5c;border-color:#8e2a5c;color:#fff}
.pride-bdi{display:flex;flex-direction:column;gap:.4em}
.pride-bdi-option{display:flex;align-items:flex-start;gap:.6em;padding:.65em .85em;border:1px solid #e2e2e2;border-radius:8px;background:#fff;cursor:pointer;line-height:1.35}
.pride-bdi-option input{position:static;margin:.2em 0 0 0;width:16px;height:16px;cursor:pointer;accent-color:#8e2a5c}
.pride-bdi-option:hover{border-color:#8e2a5c}
.pride-bdi-option:has(input:checked),.pride-bdi-option.is-checked{background:#f5eef2;border-color:#8e2a5c;font-weight:600}
.pride-monthyear{display:flex;gap:.6em;margin-top:.2em}
.pride-monthyear select{flex:1}
.pride-preview-badge{background:#fff8e1;border:1px solid #ffe082;padding:.7em 1em;border-radius:6px;margin-bottom:1em;font-size:.92em}
.pride-code-badge{font-size:1.05em;background:#8e2a5c;color:#fff;padding:.25em .7em;border-radius:6px;font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.5px}
.pride-situation{background:#f0eef5;border-left:4px solid #8e2a5c;padding:1em 1.2em;margin:1.5em 0 1em;border-radius:0 8px 8px 0}
.pride-situation h4{margin:0 0 .4em;color:#5a1a3a;font-size:1.05em}
.pride-situation p{margin:0;line-height:1.5;color:#333}
.pride-results-intro{background:#fff;border:1px solid #e6e6e6}
.pride-results-intro h2{margin-top:0;color:#5a1a3a}
.pride-result-card{background:#fff;border:1px solid #e6e6e6;border-radius:10px;padding:1em 1.2em;margin:1em 0}
.pride-result-card h3{margin:.1em 0 .4em;color:#5a1a3a;font-size:1.1em}
.pride-result-what{margin:.2em 0 .7em;color:#555;line-height:1.45;font-size:.95em}
.pride-result-headline{margin:.3em 0;font-size:1.02em}
.pride-result-meaning{margin:.3em 0;color:#5a1a3a;line-height:1.45}
.pride-result-note{margin:.4em 0 0;color:#777}
.pride-result-list{margin:.3em 0 .6em 1.2em;padding:0}
.pride-result-list li{margin:.2em 0;line-height:1.4}
.pride-result-label{display:inline-block;min-width:180px;color:#444}
.pride-result-bar{font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:2px;color:#8e2a5c}
.pride-results-help{background:#f7f2f5;border:1px solid #e6d5de}
.pride-results-help h3{margin-top:0;color:#5a1a3a}
.pride-disclaimer{color:#888;font-size:.9em}

/* Автосохранение */
.pride-autosave-indicator{font-size:.82em;color:#888;margin-left:.6em}
.pride-autosave-indicator.saving{color:#e0a800}
.pride-autosave-indicator.saved{color:#3fae5a}
.pride-autosave-indicator.error{color:#c24a4a}

/* Вход по коду */
.pride-form-login{max-width:420px}
.pride-code-input-wrap{margin:.4em 0 .2em}
.pride-form .pride-code-input,
.pride-code-input{
    display:block!important;width:100%!important;min-width:220px!important;
    height:auto!important;min-height:52px!important;padding:14px 16px!important;
    box-sizing:border-box!important;font-size:22px!important;line-height:1.2!important;
    letter-spacing:3px!important;text-align:center!important;text-transform:uppercase!important;
    font-family:ui-monospace,Menlo,Consolas,monospace!important;
    background:#fff!important;color:#222!important;border:2px solid #d9c4d1!important;
    border-radius:10px!important;box-shadow:none!important;outline:none!important;
    -webkit-appearance:none!important;appearance:none!important;
    visibility:visible!important;opacity:1!important;position:static!important;
}
.pride-form .pride-code-input:focus,
.pride-code-input:focus{border-color:#8e2a5c!important;box-shadow:0 0 0 3px rgba(142,42,92,.15)!important}
.pride-form .pride-code-input::placeholder,
.pride-code-input::placeholder{color:#b9a3af!important;letter-spacing:2px!important;font-size:18px!important;opacity:1!important}

/* Языковой переключатель */
.pride-lang-switcher{display:flex;gap:.4em;justify-content:flex-end;margin-bottom:.6em}
.pride-lang-link{padding:.25em .7em;border-radius:14px;text-decoration:none;color:#8e2a5c;background:#f5eef2;font-size:.82em}
.pride-lang-link.active{background:#8e2a5c;color:#fff}

/* Публичные результаты */
.pride-public{margin:0 auto}
.pride-public-head{background:#fff;border:1px solid #e6e6e6}
.pride-public-lead{color:#555;line-height:1.5}
.pride-public-n{font-size:1.05em}
.pride-public-list{list-style:none;padding:0;margin:.5em 0}
.pride-public-list li{display:flex;justify-content:space-between;padding:.35em 0;border-bottom:1px solid #f0f0f0}
.pride-public-label{color:#333}
.pride-public-value{font-family:ui-monospace,Menlo,Consolas,monospace;color:#8e2a5c;font-weight:600}
.pride-public-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.92em;background:#fff;border:1px solid #dcdcde;border-radius:8px;overflow:hidden}
.pride-public-table th{background:#f5eef2;color:#5a1a3a;padding:.55em .7em;text-align:left;font-weight:600;font-size:.85em}
.pride-public-table td{padding:.5em .7em;border-bottom:1px solid #eee}
.pride-public-table tr:last-child td{border-bottom:none}
.pride-live-hint{background:#fff8e1;border:1px solid #ffe082;padding:.5em .8em;border-radius:6px;font-size:.9em;color:#6d4c00}

/* Приветственный текст на странице регистрации */
.pride-reg-intro{margin:0 auto 1.5em;color:#222}
.pride-reg-lead{font-size:1.08em;color:#444;background:#f7f2f5;border-left:4px solid #8e2a5c;padding:.9em 1.1em;border-radius:0 8px 8px 0;line-height:1.5}
.pride-reg-section{margin:1.4em 0}
.pride-reg-section h3{margin:0 0 .5em;color:#5a1a3a;font-size:1.1em}
.pride-reg-section p,.pride-reg-section li{line-height:1.55}
.pride-reg-section ul,.pride-reg-section ol{margin:.3em 0 .8em 1.3em;padding:0}
.pride-reg-cta{color:#5a1a3a;font-size:1.05em}

/* Ссылки на публичные результаты и PDF */
.pride-public-link{margin-top:1em;font-size:.9em;color:#666;text-align:center}
.pride-public-link a{color:#8e2a5c;text-decoration:none;font-weight:600}
.pride-public-link a:hover{text-decoration:underline}
.pride-profile-links{margin-top:1.2em;padding-top:1em;border-top:1px solid #eee}
.pride-profile-links p{margin:.4em 0}
.pride-profile-links a{color:#8e2a5c;text-decoration:none;font-weight:600}
.pride-profile-links a:hover{text-decoration:underline}
.pride-print-row{margin:1em 0;text-align:center}
.pride-print-btn{cursor:pointer}

/* Mobile */
@media(max-width:780px){
    .pride-battery-layout{flex-direction:column}
    .pride-scales-menu{flex:1 1 auto;width:100%;position:static}
    .pride-steps{overflow-x:auto;flex-wrap:nowrap}
    .pride-step-label{max-width:8em}
    .pride-pill{min-width:2.6em;height:2.4em;padding:0 .6em;font-size:.95em}
    .pride-pill input{width:12px;height:12px}
    .pride-radio,.pride-tile{font-size:.9em;padding:.45em .75em}
    .pride-btn{padding:.65em 1.1em;font-size:.95em}
    .pride-battery,.pride-intake,.pride-consent{padding:1em}
    .pride-form input,.pride-form select,.pride-form textarea{font-size:16px}
    .pride-consent-check{font-size:.92em}
    .pride-result-label{min-width:auto;display:block}
    .pride-public-list li{flex-direction:column;gap:.2em}
    .pride-reg-intro{padding:0 .3em}
    .pride-reg-lead{font-size:1em}
}

/* ============================================================
 * ПЕЧАТЬ РЕЗУЛЬТАТОВ
 * ============================================================ */
@media print {
    /* 1. Скрываем всё лишнее внутри наших блоков */
    .pride-nav,
    .pride-lang-switcher,
    .pride-actions,
    .pride-print-row,
    .pride-print-btn,
    .pride-btn,
    .pride-btn-row,
    .pride-profile-links,
    .pride-autosave-indicator,
    .pride-prev-link,
    .pride-preview-badge {
        display: none !important;
    }

    /* 2. Скрываем шапку, меню, футер и cookie-баннер темы */
    header, footer, nav,
    .site-header, .site-footer,
    .entry-header, .entry-footer,
    .wp-block-navigation,
    .cookie-banner,
    [class*="cookie"],
    [class*="gdpr"],
    [class*="consent-banner"],
    [id*="cookie"],
    [id*="gdpr"],
    .cky-consent-container,
    .cmplz-cookiebanner,
    #onetrust-consent-sdk {
        display: none !important;
    }

    /* 3. Показываем контент статьи */
    html, body {
        background: #fff !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12pt !important;
        font-family: Georgia, "Times New Roman", serif !important;
    }

    .entry-content,
    .wp-block-post-content,
    article, main, .site-main, .site-content {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* 4. Наши карточки — чёрным по белому, с рамкой */
    .pride-card,
    .pride-result-card,
    .pride-results-intro,
    .pride-results {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #999 !important;
        box-shadow: none !important;
        border-radius: 4px !important;
        padding: .8em 1em !important;
        margin: .6em 0 !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* 5. Убираем цветные подложки у карточек результатов */
    .pride-result-card[style] {
        background: #fff !important;
        border-left-width: 3px !important;
    }

    /* 6. Заголовки — чёрные, не разрываются */
    .pride-result-card h3,
    .pride-results-intro h2,
    .pride-card h2,
    .pride-card h3 {
        color: #000 !important;
        page-break-after: avoid;
        break-after: avoid;
    }

    /* 7. Текст */
    .pride-result-what,
    .pride-result-meaning,
    .pride-result-headline,
    .pride-result-note,
    .pride-result-list li {
        color: #000 !important;
    }

    /* 8. Код участника — простой серый */
    .pride-code-badge {
        background: #eee !important;
        color: #000 !important;
        border: 1px solid #999 !important;
        padding: .15em .5em !important;
    }

    /* 9. Ссылки — чёрные без подчёркивания */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* 10. Прогресс-бар — не нужен на печати */
    .pride-progress { display: none !important; }

    /* 11. Дисклеймер внизу */
    .pride-disclaimer {
        color: #000 !important;
        font-size: 10pt !important;
        border-top: 1px solid #999 !important;
        padding-top: .8em !important;
        margin-top: 1.5em !important;
    }

    /* 12. Никаких теней и градиентов */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
        background-image: none !important;
    }

    /* 13. Отступы страницы */
    @page {
        margin: 1.5cm;
    }
}
.pride-results-locked{background:#fff8e1;border:1px solid #ffe082;text-align:center;padding:1.6em 1.4em}
.pride-results-locked h2{margin-top:0;color:#6d4c00}
.pride-results-locked .pride-actions{justify-content:center}
/* --- encyclopedia.css --- */
/* --- Список терминов --- */
.glossary-list { display: flex; flex-direction: column; gap: 20px; margin: 30px 0; }
.glossary-item { border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.glossary-item h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.glossary-item h3 a { text-decoration: none; color: var(--text); }
.glossary-item h3 a:hover { color: var(--primary); }
.glossary-excerpt { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* --- Алфавитный фильтр --- */
.ency-az-wrapper { margin: 20px 0; padding: 15px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.ency-az-title { font-family: var(--font-display); font-weight: 700; margin-bottom: 12px; font-size: 14px; color: var(--text); }
.ency-az-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ency-az-list a { display: inline-block; padding: 6px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 30px; font-size: 13px; text-decoration: none; color: var(--muted); transition: all 0.2s; }
.ency-az-list a:hover, .ency-az-list a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Аннотации в контенте --- */
.psy-term { position: relative; border-bottom: 1px dashed color-mix(in oklab, var(--primary) 45%, transparent); cursor: help; display: inline; }
.psy-term-link { color: inherit; text-decoration: none; }
.psy-term-link:hover { color: var(--primary); }

.psy-term-tip {
    position: absolute;
    left: 50%;
    bottom: 130%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--card);
    padding: 12px;
    border-radius: 8px;
    width: 300px;
    max-width: 80vw;
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: normal;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.psy-term:hover .psy-term-tip { opacity: 1; pointer-events: auto; }

.psy-term-tip::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--text) transparent transparent transparent;
}
/* --- encyclopedia.css --- */
/* --- Список терминов --- */
.glossary-list { display: flex; flex-direction: column; gap: 20px; margin: 30px 0; }
.glossary-item { border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.glossary-item h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.glossary-item h3 a { text-decoration: none; color: var(--text); }
.glossary-item h3 a:hover { color: var(--primary); }
.glossary-excerpt { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* --- Алфавитный фильтр --- */
.ency-az-wrapper { margin: 20px 0; padding: 15px; background: var(--surface); border-radius: 12px; border: 1px solid var(--line); }
.ency-az-title { font-family: var(--font-display); font-weight: 700; margin-bottom: 12px; font-size: 14px; color: var(--text); }
.ency-az-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ency-az-list a { display: inline-block; padding: 6px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 30px; font-size: 13px; text-decoration: none; color: var(--muted); transition: all 0.2s; }
.ency-az-list a:hover, .ency-az-list a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Аннотации в контенте --- */
.psy-term { position: relative; border-bottom: 1px dashed color-mix(in oklab, var(--primary) 45%, transparent); cursor: help; display: inline; }
.psy-term-link { color: inherit; text-decoration: none; }
.psy-term-link:hover { color: var(--primary); }

.psy-term-tip {
    position: absolute;
    left: 50%;
    bottom: 130%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--card);
    padding: 12px;
    border-radius: 8px;
    width: 300px;
    max-width: 80vw;
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: normal;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.psy-term:hover .psy-term-tip { opacity: 1; pointer-events: auto; }

.psy-term-tip::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: var(--text) transparent transparent transparent;
}
/* --- side-notes.css --- */
/* =====================================================
   Стили для заметок (WP Side Notes)
   - Подсветка в тексте (inline, без переноса строки)
   - Карточки заметок (сайдбар или под текстом на мобилках)
   - Счётчик ответов, лайки, кнопки, модальное окно
   ===================================================== */

/* Контейнер контента должен быть относительным для позиционирования карточек */
.entry-content, .post-content, .content {
    position: relative;
}

/* Карточка заметки (на десктопе справа от текста) */
.side-note {
    position: absolute;
    right: -320px;
    top: 0;
    width: 280px;
    background: var(--card, #fff);
    border-left: 4px solid;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 12px;
    font-size: 14px;
    z-index: 10;
    transition: 0.2s;
}

/* На мобильных устройствах карточка под текстом */
@media (max-width: 1100px) {
    .side-note {
        position: relative;
        right: auto;
        width: 100%;
        margin: 10px 0;
    }
}

/* Цвета левой рамки в зависимости от типа заметки */
.note-opinion {
    border-left-color: #3498db;
}
.note-question {
    border-left-color: #f1c40f;
}
.note-error {
    border-left-color: #e74c3c;
}
.note-forum {
    border-left-color: #2ecc71;
}

/* Мета-информация (автор, дата) */
.note-meta {
    font-size: 12px;
    color: var(--muted, #666);
    margin-bottom: 8px;
}
.main-text {
    margin-bottom: 8px;
}
.reply-btn, .forum-btn {
    display: inline-block;
    font-size: 12px;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 6px;
}
.reply-item {
    background: #f9f9f9;
    padding: 8px;
    margin: 8px 0;
    border-radius: 4px;
}
.note-like {
    cursor: pointer;
    margin-top: 8px;
    font-size: 13px;
}
.note-like:hover {
    opacity: 0.8;
}
.delete-note, .delete-reply {
    cursor: pointer;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
}
/* ---- ПОДСВЕТКА ЦИТАТЫ (ГЛАВНЫЙ МОМЕНТ – БЕЗ ПЕРЕНОСА СТРОКИ) ---- */
.note-highlight {
    cursor: pointer;
    border-radius: 3px;
    padding: 0 2px;
    display: inline !important;        /* КЛЮЧЕВОЙ: не позволяет элементу стать блочным */
    position: relative;
    background-color: transparent;      /* перебивается через конкретные классы */
}
.note-highlight,
.note-highlight * {
    display: inline !important;
    white-space: normal !important;
}
.note-highlight.note-opinion {
    background-color: rgba(52, 152, 219, 0.2) !important;
    border-bottom: 1px solid rgba(52, 152, 219, 0.5);
}
.note-highlight.note-question {
    background-color: rgba(241, 196, 15, 0.3) !important;
    border-bottom: 1px solid rgba(241, 196, 15, 0.6);
}
.note-highlight.note-error {
    background-color: rgba(231, 76, 60, 0.2) !important;
    border-bottom: 1px solid rgba(231, 76, 60, 0.5);
}
.note-highlight.note-forum {
    background-color: rgba(46, 204, 113, 0.2) !important;
    border-bottom: 1px solid rgba(46, 204, 113, 0.5);
}
/* Счётчик ответов в виде верхнего индекса */
.note-highlight sup {
    display: inline-block !important;
    vertical-align: super !important;
    background: #ff9800;
    color: white;
    font-size: 10px;
    border-radius: 20px;
    padding: 1px 5px;
    margin-left: 4px;
    font-weight: bold;
    line-height: 1;
    position: relative;
    top: -0.2em;
}
/* ---- Панель инструментов при выделении текста ---- */
#note-toolbar {
    position: absolute;
    background: white;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: none;
    z-index: 100;
}
#note-toolbar button {
    background: none;
    border: none;
    font-size: 20px;
    padding: 6px 12px;
    cursor: pointer;
}
#note-toolbar button:hover {
    background: #f0f0f0;
}
/* ---- Модальное окно ---- */
#note-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
#note-modal-overlay.active {
    display: flex;
}
#note-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 20px;
}
#note-text-input, #note-url-input {
    width: 100%;
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.btn-send {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}
.btn-cancel {
    background: #e0e0e0;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}
/* ---- SVG-линии между подсветкой и карточкой ---- */
#note-svg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}
.note-path {
    fill: none;
    stroke-width: 1.5;
    stroke-dasharray: 3;
    opacity: 0.6;
}
