:root {
    --color-primary: #667eea;
    --color-primary-dark: #5568d3;
    --color-focus: #3b4890;
    --color-text: #1d1d1f;
    --color-text-muted: #86868b;
    --color-bg: #f5f5f7;
    --color-danger: #e74c3c;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --radius: 10px;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.1);
    --fs-sm: 12px;
    --fs-base: 14px;
    --fs-lg: 17px;
    --fs-xl: 22px;
    --fs-2xl: 32px;
}

/* ============================================================
   P9: живой предпросмотр — двухколоночный лэйаут, лист A4,
   мобильный оверлей и плавающая кнопка
   ============================================================ */

.editor-layout {
    position: relative;
}

.preview-pane {
    display: none; /* мобайл: пейн виден только как оверлей по кнопке */
}

.preview-sticky {
    position: relative;
}

.preview-sheet {
    position: relative;
    width: 100%;
    aspect-ratio: 210 / 297; /* пропорции листа A4 */
    background: #ffffff;
    border: 1px solid #e0e4ea;
    border-radius: 6px;
    box-shadow: 0 12px 32px rgba(44, 62, 80, 0.18);
    overflow: hidden;
}

.preview-sheet iframe {
    display: block;
    width: 794px;   /* 210 мм при 96 dpi */
    height: 1123px; /* 297 мм при 96 dpi */
    border: 0;
    background: #ffffff;
    transform-origin: 0 0; /* масштаб ставит js/preview.js: scale(ширина контейнера / 794) */
}

.preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: #95a5a6;
    font-size: 1.05em;
    background: #ffffff;
}

.preview-close {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(44, 62, 80, 0.8);
    color: #ffffff;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.preview-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 1.05em;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.45);
    cursor: pointer;
}

/* Десктоп: форма слева, sticky-предпросмотр справа */
@media (min-width: 1100px) {
    #resume-form {
        max-width: 1500px; /* id-селектор перекрывает .container (1200px) */
    }

    .editor-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 440px;
        gap: 30px;
        align-items: start;
    }

    .preview-pane {
        display: block;
        min-width: 0;
        /* растягиваем колонку на всю высоту формы — иначе sticky-листу
           некуда «ехать» и он остаётся вверху (баг: превью не следует за скроллом) */
        align-self: stretch;
    }

    .preview-sticky {
        position: sticky;
        top: 72px; /* ниже залипающего навбара (52px) с запасом */
    }

    .preview-fab {
        display: none;
    }
}

/* Мобайл/планшет: полноэкранный оверлей по кнопке «Koʻrish» */
@media (max-width: 1099px) {
    .preview-pane.open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: rgba(30, 39, 56, 0.93);
        padding: 56px 16px 24px;
        overflow-y: auto;
    }

    .preview-pane.open .preview-sheet {
        /* лист целиком влезает в экран и сохраняет пропорции A4 */
        width: min(100%, calc((100vh - 96px) * 210 / 297));
        margin: 0 auto;
    }

    .preview-pane.open .preview-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        right: 12px;
    }

    body.preview-open {
        overflow: hidden;
    }
}

/* ============================================================
   P14: модалка «PDF tayyor» — сохранение/шаринг на мобильных
   ============================================================ */

.pdfready-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* display:flex перекрывает UA-правило для [hidden] — возвращаем скрытие явно */
.pdfready-overlay[hidden] {
    display: none;
}

.pdfready-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.pdfready-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}

.pdfready-icon {
    font-size: 44px;
    margin-bottom: 8px;
}

.pdfready-modal h3 {
    margin: 0 0 6px;
    color: #2c3e50;
    font-size: 1.3em;
}

.pdfready-hint {
    color: #7f8c8d;
    font-size: 14px;
    margin: 0 0 18px;
}

.pdfready-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pdfready-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.pdfready-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.pdfready-btn[hidden] {
    display: none;
}

.pdfready-btn-share {
    background: #667eea;
    color: #fff;
}

.pdfready-btn-download {
    background: #f1f2f6;
    color: #2c3e50;
}

.pdfready-btn-telegram {
    background: #229ed9;
    color: #fff;
}

.pdfready-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pdfready-spin 0.8s linear infinite;
}

.pdfready-spinner[hidden] {
    display: none;
}

@keyframes pdfready-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==== P12: styles extracted from index.php inline <style> ==== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', Helvetica, Arial, sans-serif;
    line-height: 1.47059;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* P12: sticky header with blur; logo left, lang + auth right */
.nav-bar {
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.nav-actions .nav-avatar,
.nav-actions img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.nav-logo {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
}

.hero h1 {
    font-size: 56px;
    line-height: 1.07143;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 20px;
    letter-spacing: -0.003em;
}

.hero p {
    font-size: 28px;
    line-height: 1.14286;
    font-weight: 400;
    color: #1d1d1f;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: var(--radius);
    padding: var(--space-7);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--space-6);
    border: 1px solid rgba(0,0,0,0.04);
}

.template-preview-section {
    text-align: center;
    margin-bottom: 60px;
}

.template-preview-section h2 {
    color: var(--color-text);
    margin-bottom: var(--space-5);
    font-size: var(--fs-2xl);
    font-weight: 600;
    letter-spacing: -0.003em;
}

.current-template {
    display: inline-block;
    background: #f5f5f7;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    padding: var(--space-5);
    width: 320px;
    margin-bottom: var(--space-5);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.current-template:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.template-preview {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
}

.template-3 .preview-minimal-header {
    height: 30px;
    border-bottom: 2px solid #3498db;
    margin: 15px;
}

.template-3 .preview-minimal-content {
    padding: 15px;
}

.template-3 .preview-minimal-content::before {
    content: '';
    display: block;
    height: 8px;
    background: #e9ecef;
    margin-bottom: 8px;
    border-radius: 2px;
}

.template-3 .preview-minimal-content::after {
    content: '';
    display: block;
    height: 6px;
    background: #dee2e6;
    width: 70%;
    border-radius: 2px;
}

.change-template-btn {
    margin-top: var(--space-4);
}

.template-selector {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.template-modal {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.template-option {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: var(--space-4);
    cursor: pointer;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.template-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-option:hover::before,
.template-option.selected::before {
    opacity: 1;
}

.template-option:hover,
.template-option.selected {
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(102, 126, 234, 0.25);
}

.form-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    color: #2c3e50;
}

.form-grid {
    max-width: 900px;
    margin: 0 auto;
}

.form-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--space-6) 0 var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 3px solid #e9ecef;
    background: linear-gradient(90deg, #f8f9fa 0%, transparent 100%);
    border-radius: var(--radius);
    padding-left: var(--space-4);
}

.form-section-title h3 {
    color: #1a1a1a;
    font-size: 1.4em;
    font-weight: 600;
}

.form-section-title .section-icon {
    font-size: 1.5em;
    color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.form-row.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}


/* ==== P12: unified inputs ==== */
.input,
.form-group input,
.form-group textarea,
.form-group select {
    padding: var(--space-3) var(--space-4);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: var(--radius);
    font-size: var(--fs-lg);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    background: white;
    font-weight: 400;
    color: var(--color-text);
}

.input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.18);
}

.input:focus-visible,
.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 1px;
}

.input.input-error,
.form-group input.input-error,
.form-group textarea.input-error,
.form-group select.input-error {
    border-color: var(--color-danger);
    background: #fdf2f2;
}

.input-error-text {
    color: var(--color-danger);
    font-size: var(--fs-sm);
    margin-top: var(--space-1);
}

.form-group label {
    margin-bottom: var(--space-2);
    color: var(--color-text);
    font-weight: 600;
    font-size: var(--fs-lg);
}

.form-group label .label-hint {
    font-weight: 400;
    font-size: 12px;
    color: #86868b;
}

/* Apple-style Dynamic Form Items */
.experience-item,
.education-item,
.language-item,
.project-item,
.certification-item {
    background: white;
    padding: var(--space-5);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.experience-item:hover,
.education-item:hover,
.language-item:hover,
.project-item:hover,
.certification-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Apple-style Remove Button */
.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff3b30;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.remove-btn:hover {
    background: #d70015;
    transform: scale(1.05);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin: 50px auto 0;
    gap: 12px;
    /* выровнено с шириной полей формы (.form-grid = 900px), чтобы кнопки и
       чекбокс согласия не выходили за пределы выравнивания */
    max-width: 900px;
}

.consent-row {
    margin: 50px auto 0;
    max-width: 900px;
}

.consent-row + .form-actions {
    margin-top: 16px;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #1d1d1f;
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: #667eea;
    cursor: pointer;
}

.consent-label a {
    color: #667eea;
    text-decoration: underline;
}

.btn-primary:disabled,
.btn-primary:disabled:hover {
    background: var(--color-primary);
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* ==== P12: unified buttons ==== */
.btn,
.btn-primary,
.btn-secondary,
.add-btn,
.cta-button,
.change-template-btn,
.close-modal {
    display: inline-block;
    padding: var(--space-3) var(--space-5);
    border: none;
    border-radius: 980px;
    font-size: var(--fs-lg);
    font-weight: 500;
    line-height: 1.2;
    min-width: 120px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary,
.add-btn,
.cta-button,
.change-template-btn {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover,
.add-btn:hover,
.cta-button:hover,
.change-template-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-primary:active,
.add-btn:active,
.cta-button:active,
.change-template-btn:active {
    background: var(--color-primary-dark);
    transform: translateY(0);
}

.btn-secondary,
.close-modal {
    background: #fff;
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

.btn-secondary:hover,
.close-modal:hover {
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-1px);
}

.btn-secondary:active,
.close-modal:active {
    background: rgba(102, 126, 234, 0.16);
    transform: translateY(0);
}

.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.add-btn:focus-visible,
.cta-button:focus-visible,
.change-template-btn:focus-visible,
.close-modal:focus-visible,
.remove-btn:focus-visible,
.profession-btn:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    margin-top: 25px;
    font-size: 1.3em;
    text-align: center;
}

.notification {
    position: fixed;
    top: var(--space-4);
    right: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius);
    color: white;
    font-weight: 600;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.notification.show {
    transform: translateX(0);
}

/* Apple-style Notifications */
.notification.success {
    background: #30d158;
}

.notification.error {
    background: #ff3b30;
}

.notification.warning {
    background: #ff9500;
}

.notification {
    border-radius: 12px;
    font-weight: 400;
    font-size: 14px;
}

/* Responsive Design for Apple-style Layout */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 21px;
    }

    .hero {
        padding: 60px 0 40px;
    }

    .form-row,
    .form-row.three-cols {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .main-content {
        padding: 30px 20px;
        margin: 10px;
        border-radius: 18px;
    }

    .container {
        padding: 0 16px;
    }

    .nav-content {
        padding: 0 16px;
    }

    .template-modal {
        padding: 24px;
        width: 95%;
        margin: 20px;
    }

    .templates-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8em;
    }

    header p {
        font-size: 1.1em;
    }

    .main-content {
        padding: 20px;
    }

    .form-section h2 {
        font-size: 1.6em;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        font-size: 1em;
    }
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

/* Apple-style Skill Tags */
.skill-tag {
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 980px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.skill-tag .remove-skill {
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.close-modal {
    margin-top: var(--space-4);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 52px;
    left: 0;
    height: 2px;
    background: var(--color-primary);
    z-index: 999;
    transition: width 0.3s ease;
}

/* Profession-specific fields section */
.profession-fields-section {
    background: #f5f5f7;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 12px 12px 0;
    padding: 20px 24px;
    margin-top: 8px;
    margin-bottom: 20px;
}

.profession-fields-label {
    font-size: 14px;
    font-weight: 600;
    color: #6e6e73;
    margin-bottom: 4px;
}

.profession-fields-hint {
    font-size: 12px;
    color: #a1a1a6;
    margin-bottom: 12px;
    font-weight: 400;
}

.profession-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.profession-btn {
    padding: 8px 18px;
    border-radius: 980px;
    border: 1.5px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profession-btn:hover {
    background: rgba(102, 126, 234, 0.06);
}

.profession-btn.active {
    background: var(--color-primary);
    color: #fff;
}

.profession-group {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.06);
    animation: fadeSlide 0.3s ease;
}

.profession-group .profession-group-label {
    font-size: 12px;
    font-weight: 600;
    color: #86868b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* Template selection checkmark badge */
.template-option .template-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: #30d158;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 2;
    color: white;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(48, 209, 88, 0.4);
}

.template-option.selected .template-check {
    opacity: 1;
    transform: scale(1);
}

/* Apple-style Footer */
.site-footer {
    background: #1d1d1f;
    color: #d2d2d7;
    padding: 60px 0 0;
    margin-top: 60px;
    font-size: 14px;
    line-height: 1.47059;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand h3 {
    color: #f5f5f7;
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-brand .footer-tagline {
    color: #a1a1a6;
    font-size: 14px;
    line-height: 1.6;
    max-width: 280px;
}

.footer-section h4 {
    color: #f5f5f7;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #a1a1a6;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: #f5f5f7;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #a1a1a6;
    font-size: 14px;
}

.footer-contact-item a {
    color: #a1a1a6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-item a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    color: #6e6e73;
    font-size: 12px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ==== Главная: SEO-блок (вынесено из инлайн-стилей index.php, привязано к токенам) ==== */
.seo-section {
    background: #f5f5f7;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius);
    padding: var(--space-7);
    margin-top: var(--space-7);
}

.seo-section-title {
    color: var(--color-text);
    text-align: center;
    font-size: var(--fs-2xl);
    font-weight: 600;
    letter-spacing: -0.003em;
    margin-bottom: var(--space-6);
}

.seo-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.seo-feature {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius);
    padding: var(--space-5) var(--space-4);
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.seo-feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.seo-feature h3 {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.seo-feature p {
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--color-text-muted);
}

.seo-tips {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius);
    padding: var(--space-5);
    margin-top: var(--space-4);
}

.seo-tips h3 {
    color: var(--color-text);
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.seo-tips ul {
    line-height: 1.8;
    padding-left: var(--space-5);
    color: var(--color-text);
}

.seo-tips ul li {
    margin-bottom: var(--space-1);
    font-size: var(--fs-base);
}

.seo-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: var(--space-6);
    margin-top: var(--space-4);
    text-align: center;
}

.seo-cta h3 {
    font-size: var(--fs-xl);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.seo-cta p {
    font-size: var(--fs-lg);
    line-height: 1.6;
    max-width: 640px;
    margin: 0 auto;
    opacity: 0.95;
}

/* ==== AI-кнопки помощника (вынесено из инлайн-стилей js/main.js) ==== */
.ai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.ai-btn,
.ai-undo-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.ai-btn:hover {
    background: rgba(102, 126, 234, 0.08);
}

.ai-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.ai-undo-btn {
    border-color: #c7c7cc;
    color: #6e6e73;
}

.ai-undo-btn:hover {
    background: #f0f0f3;
}

/* «Вау»-анимация генерации ИИ (Tier 1) */
@keyframes ai-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}
@keyframes ai-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
    50% { box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18); }
}
.ai-btn.ai-busy {
    animation: ai-pulse 1s ease-in-out infinite;
    cursor: default;
    border-color: var(--color-primary);
}
textarea.ai-thinking {
    border-color: var(--color-primary) !important;
    animation: ai-glow 1.1s ease-in-out infinite;
}
textarea.ai-revealing {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.12);
}
@media (prefers-reduced-motion: reduce) {
    .ai-btn.ai-busy,
    textarea.ai-thinking { animation: none; }
}

/* Мост в «Чет элга» после перевода на английский (P4) */
.ai-bridge {
    margin-top: 8px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.10), rgba(118, 75, 162, 0.10));
    border: 1px solid rgba(102, 126, 234, 0.28);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
}
.ai-bridge a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
    white-space: nowrap;
}
.ai-bridge a:hover { text-decoration: underline; }

/* Проактивная подсветка чипа «написать обязанности» (P1c) */
@keyframes ai-hint-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
    50% { box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.22); }
}
.ai-btn.ai-hint { animation: ai-hint-pulse 0.8s ease-in-out 3; }
@media (prefers-reduced-motion: reduce) { .ai-btn.ai-hint { animation: none; } }

/* Живое демо ИИ на лендинге (P1) */
.ai-demo-band {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.07), rgba(118, 75, 162, 0.07));
    border-top: 1px solid rgba(102, 126, 234, 0.12);
    border-bottom: 1px solid rgba(102, 126, 234, 0.12);
    padding: 32px 0;
    text-align: center;
}
.ai-demo-band h2 { margin: 0 0 6px; font-size: 24px; }
.ai-demo-sub { margin: 0 auto 18px; max-width: 560px; color: var(--color-text-muted); }
.ai-demo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 620px;
    margin: 0 auto;
}
.ai-demo-row #aiDemoInput {
    flex: 1 1 260px;
    min-width: 0;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #c7c7cc;
    border-radius: 10px;
}
.ai-demo-row .cta-button { flex: 0 0 auto; }
.ai-demo-out {
    max-width: 620px;
    margin: 18px auto 0;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid rgba(102, 126, 234, 0.22);
    border-radius: 16px;
    box-shadow: 0 10px 34px rgba(102, 126, 234, 0.14);
    text-align: left;
}
.ai-demo-out-head {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
    font-size: 15px;
}
.ai-demo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
}
.ai-demo-li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(7px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.ai-demo-li.in { opacity: 1; transform: none; }
.ai-demo-check {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
@media (prefers-reduced-motion: reduce) {
    .ai-demo-li { transition: none; }
}
/* Подсветка записи опыта, заполненной из демо (P1: демо → fora) */
@keyframes ai-prefill-flash {
    0% { background: rgba(102, 126, 234, 0.16); }
    100% { background: transparent; }
}
.experience-item.ai-prefilled { animation: ai-prefill-flash 2.2s ease; border-radius: 12px; }
.ai-demo-cta {
    display: inline-block;
    margin-top: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}
.ai-demo-cta:hover { text-decoration: underline; }
/* атрибут hidden должен побеждать display выше (специфичность ID/класса) */
#aiDemoOut[hidden],
.ai-demo-cta[hidden] { display: none; }

/* Предложение заполнить форму из master-профиля (для вошедших пользователей) */
.profile-prefill-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    background: #eef0ff;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--radius);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-5);
    font-size: var(--fs-base);
}

.profile-prefill-bar[hidden] { display: none; }

.profile-prefill-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.profile-prefill-dismiss {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0 4px;
}

/* ==== Модальный диалог (современная замена нативным confirm/prompt) ==== */
.ui-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.ui-dialog-overlay[hidden] { display: none; }

.ui-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.2s ease;
}

.ui-dialog-title {
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.ui-dialog-title[hidden] { display: none; }

.ui-dialog-msg {
    color: var(--color-text);
    font-size: var(--fs-base);
    line-height: 1.5;
    margin-bottom: var(--space-4);
}

.ui-dialog-msg[hidden] { display: none; }

.ui-dialog-input { margin-bottom: var(--space-4); }
.ui-dialog-input[hidden] { display: none; }
.ui-dialog-input input { width: 100%; }

.ui-dialog-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}

.ui-dialog-actions .btn-primary,
.ui-dialog-actions .btn-secondary {
    min-width: 96px;
}

.ui-dialog-ok.ui-dialog-danger { background: var(--color-danger); }
.ui-dialog-ok.ui-dialog-danger:hover { background: #d62c1a; }

@media (max-width: 480px) {
    .ui-dialog-actions { flex-direction: column-reverse; }
    .ui-dialog-actions .btn-primary,
    .ui-dialog-actions .btn-secondary { width: 100%; }
}

/* Photo upload */
.photo-upload-area {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f5f5f7;
    border: 2px dashed rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color 0.18s ease;
}

.photo-preview:hover {
    border-color: var(--color-primary);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview .photo-placeholder {
    font-size: 28px;
    color: #a1a1a6;
}

.photo-upload-info {
    flex: 1;
}

.photo-upload-info label {
    display: inline-block;
    background: #f5f5f7;
    color: #1d1d1f;
    padding: 8px 16px;
    border-radius: 980px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    transition: background-color 0.18s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.photo-upload-info label:hover {
    background: #e8e8ed;
}

.photo-upload-info p {
    font-size: 11px;
    color: #a1a1a6;
    margin-top: 6px;
}

.photo-upload-info input[type="file"] {
    display: none;
}

/* Auth: nav button, user menu, login modal */
.nav-auth {
    display: flex;
    align-items: center;
}

.nav-login-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 980px;
    padding: 7px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.nav-login-btn:hover {
    background: var(--color-primary-dark);
}

.nav-user {
    position: relative;
}

.nav-user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #1d1d1f;
    padding: 4px;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.nav-user-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 160px;
    padding: 6px;
    z-index: 1001;
}

.nav-user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #1d1d1f;
    text-decoration: none;
    cursor: pointer;
}

.nav-user-menu-item:hover {
    background: #f5f5f7;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* display:flex перекрывает UA-правило для [hidden] — возвращаем скрытие явно */
.auth-overlay[hidden] {
    display: none;
}

.auth-modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.auth-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}

.auth-modal h3 {
    margin: 0 0 18px;
    color: #2c3e50;
    font-size: 1.4em;
    text-align: center;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.auth-tab {
    flex: 1;
    padding: 9px;
    border: none;
    border-radius: 8px;
    background: #f5f5f7;
    color: #555;
    font-size: 14px;
    cursor: pointer;
}

.auth-tab.active {
    background: #667eea;
    color: #fff;
}

.auth-error {
    background: #fdecea;
    color: #c0392b;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 14px;
}

.auth-notice {
    background: #eafaf1;
    color: #1e8449;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    margin-bottom: 14px;
}

.auth-forgot-link {
    display: block;
    width: 100%;
    margin: 10px 0 0;
    background: none;
    border: none;
    color: #667eea;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}

.auth-forgot-link:hover {
    text-decoration: underline;
}

.auth-field {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
}

.auth-field label {
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.auth-field input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
}

.auth-field input:focus {
    outline: none;
    border-color: #667eea;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
}

.auth-submit {
    width: 100%;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.auth-submit:hover {
    background: #5a6fd8;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #999;
    font-size: 13px;
    margin: 18px 0 14px;
}

.auth-divider[hidden] {
    display: none;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.auth-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

/* Единый каркас соцкнопок: Google и Telegram — визуальные «братья»
   (одинаковые габариты/форма/типографика), различаются только брендовым цветом. */
.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-social-btn[hidden] {
    display: none;
}

.auth-social-btn:hover {
    transform: translateY(-1px);
}

.auth-social-icon {
    flex-shrink: 0;
}

/* Google — белая по фирменным гайдлайнам */
.auth-google-btn {
    background: #fff;
    border-color: #dadce0;
    color: #3c4043;
}

.auth-google-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 4px rgba(60, 64, 67, 0.2);
}

/* Telegram — фирменный синий, габариты идентичны Google */
.auth-tg-btn {
    background: linear-gradient(180deg, #2aabee 0%, #229ed9 100%);
    color: #fff;
}

.auth-tg-btn:hover {
    background: linear-gradient(180deg, #2db1f5 0%, #1f97cf 100%);
    box-shadow: 0 6px 16px rgba(34, 158, 217, 0.35);
}

/* Language switcher */
.lang-switch {
    display: flex;
    gap: 2px;
    margin-right: 12px;
}

.lang-switch button {
    background: none;
    border: none;
    color: #6e6e73;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 7px;
    border-radius: 6px;
    cursor: pointer;
}

.lang-switch button:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.lang-switch button.active {
    background: #667eea;
    color: #fff;
}

/* P8: карточки шаблонов с PNG-превью (старые .template-preview стили остаются без использования до пакета косметики) */
.template-option { display: block; position: relative; cursor: pointer; }
.template-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.template-thumb {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    object-position: top center;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #ffffff;
    margin-bottom: 8px;
}
.current-template-img {
    display: block;
    width: 180px;
    max-width: 100%;
    margin: 0 auto 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* ==== P12: mobile layout ==== */
@media (max-width: 768px) {
    :root {
        --space-5: 16px;
        --space-6: 24px;
        --space-7: 32px;
        --space-8: 40px;
    }

    .main-content {
        padding: var(--space-5) var(--space-4);
        margin: var(--space-2);
        border-radius: var(--radius);
    }

    .form-grid {
        max-width: 100%;
    }

    /* кнопки генерации и предпросмотра всегда достижимы */
    .form-actions {
        position: sticky;
        bottom: 0;
        z-index: 100;
        background: rgba(255, 255, 255, 0.92);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        margin: var(--space-5) calc(-1 * var(--space-4)) 0;
        padding: var(--space-3) var(--space-4);
        padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    /* Компактные кнопки: мелкий шрифт + nowrap, чтобы длинный текст не делал их
       высокими. Не влезающие в ряд переносятся на вторую строку, а не растягиваются. */
    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions .preview-fab {
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
        font-size: 13px;
        padding: 9px 12px;
        font-weight: 500;
    }

    /* кнопка предпросмотра (P9, плавающая) встраивается в sticky-панель */
    .form-actions .preview-fab {
        position: static;
        border-radius: 980px;
        box-shadow: none;
    }

    /* карточки шаблонов — горизонтальная лента */
    .templates-grid {
        display: flex;
        grid-template-columns: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: var(--space-3);
        padding-bottom: var(--space-2);
    }

    .templates-grid .template-option {
        flex: 0 0 240px;
        scroll-snap-align: center;
    }
}

/* ==== P12: micro-animations ==== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* анимация перезапускается при каждом переключении display:none -> flex */
.template-selector,
.loading-overlay,
.preview-overlay,
.preview-pane.open,
.pdfready-overlay {
    animation: fadeIn 0.2s ease;
}

.template-modal,
.pdfready-modal {
    animation: modalIn 0.2s ease;
}

@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;
    }
}

/* Подсветка чекбокса согласия при попытке генерации без отметки */
.consent-attention {
    animation: consent-pulse 1.1s ease;
    border-radius: var(--radius, 10px);
}

@keyframes consent-pulse {
    0% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); transform: translateX(0); }
    15% { box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.45); }
    30% { transform: translateX(-5px); }
    45% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    75% { transform: translateX(3px); box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .consent-attention {
        animation: none;
        box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.45);
    }
}
