/* Экран сводки */
.summary-content {
    padding: 16px;
}

.summary-main-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.summary-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 12px;
    align-items: center;
}

.summary-left {
    min-width: 0;
}

.summary-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}

.summary-insights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.summary-assert {
    margin-top: 12px;
}

.summary-awareness {
    margin-top: 12px;
}

.summary-type {
    font-weight: 700;
    margin-top: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.summary-top {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.summary-chip {
    background: #FFF5F9;
    border: 1px solid #FFD1E6;
    border-radius: 10px;
    padding: 4px 8px;
    font-size: 12px;
    color: #C2185B;
    font-weight: 600;
}

.summary-awareness-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.summary-awareness-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
}

.summary-awareness-text {
    font-weight: 600;
    font-size: 13px;
}

.awareness-bubble.small {
    width: 120px;
    height: 120px;
    flex: 0 0 auto;
}

/* Сохраняем идеальную окружность в любых контейнерах */
.awareness-bubble,
.awareness-bubble.small {
    aspect-ratio: 1 / 1;
}

/* Основные переменные */
:root {
    --primary-color: #EE0979;
    --secondary-color: #FF6A95;
    --accent-gradient: linear-gradient(135deg, #EE0979 0%, #FF6A95 100%);
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --text-primary: #2D2D3A;
    --text-secondary: #434349;
    --background: #FAFBFD;
    --surface: #FFFFFF;
    --surface-light: #FFF5F9;
    --border: #F0E6EC;
    --hairline: #E5E5EA;
    /* iOS separator */
    --shadow: rgba(238, 9, 121, 0.08);
    --shadow-hover: rgba(238, 9, 121, 0.15);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Темная тема (для будущего) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #FFFFFF;
        --text-secondary: #8E8E93;
        --background: #000000;
        --surface: #1C1C1E;
        --border: #38383A;
        --shadow: rgba(255, 255, 255, 0.1);
    }
}

/* Поддержка Telegram WebApp цветов */
.telegram-theme {
    --background: var(--tg-theme-bg-color, #FFFFFF);
    --text-primary: var(--tg-theme-text-color, #1C1C1E);
    --primary-color: var(--tg-theme-button-color, #007AFF);
    --surface: var(--tg-theme-secondary-bg-color, #F2F2F7);
}

/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'SF Pro Text', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #FAFBFD;
    color: #2D2D3A;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Контейнер */
.container {
    min-height: 100svh;
    display: flex;
    align-items: center;
    /* вертикальная центровка */
    justify-content: center;
    padding: 20px;
}

/* Экраны */
.screen {
    width: 100%;
    max-width: 600px;
    opacity: 0;
    visibility: hidden;
    display: none;
    transition: var(--transition);
    transform: translateY(20px);
}

.screen.active {
    display: block;
    opacity: 1;
    visibility: visible;
    position: relative;
    transform: translateY(0);
}

/* Контент */
.content {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px 16px;
    animation: fadeIn 0.5s ease-out;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Уменьшаем нижние отступы на первом и вопросном экранах */
#startScreen .content {
    padding-bottom: 12px;
}

#quizScreen .content {
    padding-bottom: max(48px, env(safe-area-inset-bottom) + 24px);
}


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

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

/* Типография */
.title {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.5;
}

/* Фичи на стартовом экране */
.features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #F2F2F7;
    border-radius: 12px;
    transition: var(--transition);
    color: #2D2D3A;
}

.feature:hover {
    transform: translateX(5px);
}

.emoji {
    font-size: 24px;
}

/* Кнопки */
.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 10px 20px rgba(238, 9, 121, 0.18);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px var(--shadow-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #F2F2F7;
    color: #2D2D3A;
    border: 1px solid var(--border);
}

.btn-success {
    background: #34C759;
    color: #FFFFFF;
    box-shadow: 0 10px 20px rgba(52, 199, 89, 0.18);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.28);
    transform: translateY(-2px);
}

.btn-danger {
    background: #FF3B30;
    color: #FFFFFF;
    box-shadow: 0 10px 20px rgba(255, 59, 48, 0.18);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.28);
    transform: translateY(-2px);
}

.btn-warning {
    background: #FFD60A;
    color: #1C1C1E;
    border: 1px solid #F2E085;
}

.btn-warning:hover {
    filter: brightness(0.98);
}

.btn-muted {
    background: #C7C7CC;
    color: #1C1C1E;
    border: 1px solid #A1A1A8;
}

.btn-muted:hover {
    filter: brightness(0.98);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Прогресс-бар */
.progress-container {
    margin-bottom: 32px;
}

.progress-bar {
    height: 10px;
    background: #EDEDEF;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 5px;
    transition: width 0.5s ease-out;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Вопросы */
.question-container {
    margin-bottom: 5px;

    border-radius: 12px;
    padding: 12px;
}

.question-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.4;
}

.question-context {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Варианты ответов */
.options-container {
    display: block;
    margin-bottom: 32px;
    background: #FFFFFF;
    border-radius: 14px;
    overflow: visible;
    /* позволяет выбранной опции быть шире */

}

.option {
    padding: 14px 16px;
    background: #FFFFFF;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    color: #2D2D3A;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    border: 1px solid var(--hairline);
    border-radius: 12px;
}

.option+.option {
    margin-top: 8px;
}

.option:hover {
    background: #FAFAFB;
}

.option.selected {
    background: var(--accent-gradient);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(238, 9, 121, 0.22);
    /* визуально шире */
    width: calc(100% + 8px);
    margin-left: -4px;
    margin-right: -4px;
}

.option.selected .option-label {
    color: #FFFFFF;
}

/* Обеспечим читаемость иконок/чекбоксов на тёмном фоне */
.option.selected .option-label:before {
    border-color: #FFFFFF;
}

/* Стили для множественного выбора с выделением */
.option.selected .option-label {
    color: #2D2D3A;
}

.option-number {
    display: none;
}

/* Стили для множественного выбора */
.multiple-hint {
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 8px;
    font-style: italic;
}

.option-checkbox {
    display: none;
}

.option-label {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
    cursor: pointer;
    position: relative;
    padding-left: 32px;
}

.option-label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    background: #FFFFFF;
    transition: var(--transition);
}

.option-checkbox:checked+.option-label:before {
    background: var(--accent-gradient);
    border-color: transparent;
}

.option-checkbox:checked+.option-label:after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Навигация */
.navigation {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.navigation .btn {
    width: auto;
    flex: 1;
}

/* Обратная связь */
.feedback-container {
    margin-bottom: 32px;
}

.feedback-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.selected-answer {
    padding: 16px;
    background: #F2F2F7;
    border-radius: 12px;
    margin-bottom: 20px;
    font-style: italic;
    color: #2D2D3A;
}

.feedback-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #2D2D3A;
}

.recommendation {
    padding: 20px;
    background: var(--surface-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
}

/* Результаты */
.results-title {
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 32px;
}

.warning-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;

    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
}

.warning-icon {
    font-size: 20px;
    line-height: 1;
}

.warning-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.chart-container {
    position: relative;
}

.chart-center-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 45px;
    pointer-events: none;
}

/* Полная легенда по 5 типам */
.legend-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 12px 0 24px;
}

.legend-full .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Разделитель секций */
.section-divider {
    height: 1px;
    width: 70%;
    margin: 16px auto 16px;
    background: #E5E5EA;
    border-radius: 1px;
}

/* Инсайты по типу: грид карточек */
.insights-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 24px;
}

.insight-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.insight-card#strengthsCard {
    background: rgb(235, 252, 244);
    border-color: rgb(195, 247, 221);
}

.insight-card#risksCard {
    background: rgb(254, 251, 234);
    border-color: rgb(254, 241, 187);
}

.insight-card#growthCard {
    background: rgb(239, 248, 255);
    border-color: rgb(207, 237, 252);
}

.insight-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 10px;
}

.insight-emoji {
    font-size: 18px;
}

.insight-list {
    list-style: disc inside;
    color: #2D2D3A;
}

.insight-list li {
    margin: 6px 0;
}

/* Секция шкалы ассертивности */
.assert-section {
    margin: 50px 0 50px;
}

.assert-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
}

.assert-bar {
    margin: 8px 0 8px;
}

.assert-bar-track {
    position: relative;
    height: 12px;
    background: #EFEFF2;
    border-radius: 6px;
}

.assert-bar-track::before,
.assert-bar-track::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
}

.assert-bar-track::before {
    left: 0;
    background: linear-gradient(90deg, rgba(255, 59, 48, 0.25), rgba(255, 59, 48, 0.05));
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.assert-bar-track::after {
    right: 0;
    background: linear-gradient(90deg, rgba(52, 199, 89, 0.05), rgba(52, 199, 89, 0.25));
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.assert-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8E8E93;
    box-shadow: 0 4px 12px var(--shadow);
}

.assert-marker.negative {
    background: var(--danger-color);
}

.assert-marker.positive {
    background: var(--success-color);
}

.assert-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.assert-ticks span {
    width: 32px;
    text-align: center;
}

.assert-ticks span:nth-child(3) {
    font-weight: 700;
    color: #000;
}

.assert-category {
    margin-top: 8px;
    font-weight: 600;
}

.assert-category.negative {
    color: var(--danger-color);
}

.assert-category.positive {
    color: var(--success-color);
}

.assert-category small {
    display: block;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Оценка результата */
.rating-section {
    margin: 20px 0 24px;
}

.rating-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.rating-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Категория RAS по центру и выделена */
.assert-category {
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
}

.assert-category small {
    color: var(--text-secondary);
    font-weight: 400;
}

/* Поясняющий блок про стиль конфликта */
.conflict-explainer {
    background: #F7F7FA;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 16px;
    margin: 40px 0 24px;
    color: #2D2D3A;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

/* Блок под процентами с кнопкой подробнее */
.strategy-info {
    font-size: 14px;
    color: #2D2D3A;
    margin: 12px 0 20px;
    text-align: center;
}

.link-button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.strategy-details {
    margin-top: 8px;
    background: #F7F7FA;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    padding: 12px;
}

/* Резюме стратегии */
.strategy-summary {
    text-align: center;
    margin: 16px 0 24px;
}

.strategy-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.strategy-emoji {
    font-size: 36px;
    margin-bottom: 6px;
}

.strategy-name {
    font-size: 18px;
    font-weight: 600;
}

/* Секция осознанности */
.awareness-section {
    text-align: center;
    margin: 16px 0 24px;
}

.awareness-title {
    font-size: 18px;
    margin-bottom: 12px;
}

.awareness-title-score {
    color: var(--primary-color);
    font-weight: 700;
}

.awareness-bubble {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: radial-gradient(120px 120px at 50% 50%, #FFC1DC, #FF6A95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    box-shadow: 0 12px 30px rgba(238, 9, 121, 0.25);
}

.awareness-score {
    font-size: 64px;
    font-weight: 700;
}

.awareness-text {
    font-size: 15px;
    color: #2D2D3A;
    line-height: 1.7;
    text-align: center;
    margin-top: 40px;
}

.results-title {
    letter-spacing: -0.2px;
}

.result-card {
    border-radius: var(--border-radius);

    margin-bottom: 24px;
    color: #2D2D3A;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 12px 0 24px;
}

.metric-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.result-type {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 16px;
    text-align: center;
}

.result-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
    text-align: center;
}

.traits-container {
    margin-bottom: 24px;
}

.traits-container h4 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}

.traits-list {
    list-style: none;
    padding-left: 0;
}

.traits-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.traits-list li:before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
}

.recommendations-container {
    margin-top: 32px;
}

.recommendations-container h4 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
}

.recommendations-text {
    font-size: 16px;
    line-height: 1.6;
}

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

/* Пост-текст и видео */
.post-video-section {
    margin: 16px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.post-video-text {
    font-size: 15px;
    line-height: 1.7;
    color: #2D2D3A;
    text-align: center;
}

.post-video-text p+p {
    margin-top: 8px;
}

/* Видео-контейнер */
.video-container {
    margin: 16px 0;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

.video-save-btn {
    margin-top: 16px;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.video-placeholder {
    width: 100%;
    height: 180px;
    background: #F7F7FA;
    border: 1px dashed var(--hairline);
    border-radius: 12px;
}

/* Альтернативный экран результатов с видео (A/B тест) */
.video-results-container {
    text-align: center;
}

.video-intro-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.native-video-container {
    width: 100%;
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.native-video-player {
    width: 100%;
    max-height: 400px;
    border-radius: 12px;
    display: block;
}

.video-watch-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #FFF5F9;
    border-radius: 10px;
    margin: 16px 0;
    color: var(--primary-color);
    font-size: 14px;
}

.video-watch-progress.completed {
    background: #E8FFF3;
    color: var(--success-color);
}

.video-watch-progress .watch-icon {
    font-size: 18px;
}

.video-continue-btn {
    margin-top: 16px;
    animation: fadeInUp 0.5s ease-out;
}

/* Диаграмма */
.chart-container {
    max-width: 360px;
    margin: 0 auto 0px;
    padding: 20px;
    background: #FFFFFF;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px var(--shadow);
}

@media (max-width: 360px) {
    .chart-container {
        max-width: 250px;
        padding: 15px;
    }
}

/* Сетка процентов */
.percentages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.percentage-item {
    padding: 14px;
    background: #FFF5F9;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #FFD1E6;
}

/* Если последняя карточка переносится на новую строку одна — центрируем её */
.percentages-grid .percentage-item:last-child {
    grid-column: 1 / -1;
    /* растягиваем на ширину всех колонок */
    justify-self: stretch;
}

/* все карточки теперь в акцентном розовом стиле */

.percentage-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.percentage-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.percentage-label {
    font-size: 13px;
    color: var(--primary-color);
    word-wrap: break-word;
}

/* Адаптивность */
@media (max-width: 480px) {
    .content {
        padding: 24px 16px;
    }

    .title {
        font-size: 20px;
    }

    .subtitle {
        font-size: 16px;
    }

    .question-title {
        font-size: 15px;
    }

    .option {
        font-size: 14px;
        padding: 14px 16px;
    }

    .btn {
        font-size: 15px;
        padding: 14px 24px;
    }

    .summary-row {
        grid-template-columns: 1fr;
    }

    /* Центрируем диаграмму и эмодзи в блоке "Ваш общий профиль" */
    .summary-left {
        display: block;
    }

    .summary-left .chart-container {
        margin-left: auto;
        margin-right: auto;
        width: min(100%, 200px);
        position: relative;
    }

    .summary-left .chart-center-emoji {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

.option {
    animation: slideIn 0.3s ease-out forwards;
}

.option:nth-child(1) {
    animation-delay: 0.1s;
}

.option:nth-child(2) {
    animation-delay: 0.2s;
}

.option:nth-child(3) {
    animation-delay: 0.3s;
}

.option:nth-child(4) {
    animation-delay: 0.4s;
}

.option:nth-child(5) {
    animation-delay: 0.5s;
}

/* Плавные переходы между экранами */
.screen-transition-enter {
    opacity: 0;
    transform: translateX(20px);
}

/* Экран инструкций */
.instruction-list {
    list-style: none;
    margin: 12px 0 24px;
    padding-left: 0;
}

/* Текст инструкции */
.instruction-text {
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;


    border-radius: 12px;
    padding: 16px;
    margin: 12px 0 0px;
}

/* Блок изображения на экране инструкций */
.instruction-image-block {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 12px auto 0;
    display: flex;
    justify-content: center;
    /* отступ сверху после текста */
    margin-top: 12px;
}

.instruction-image {
    width: min(90%, 520px, 50vh);
    aspect-ratio: 1 / 1;
    /* квадрат */
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Делаем контент на экране инструкций колонкой на всю высоту */
#instructionScreen .content {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px);
    /* минус паддинги контейнера */
}

/* Отступ между изображением и кнопкой на экране инструкций */
.instruction-image-block+.btn {
    margin-top: 12px;
}

.instruction-item {
    padding: 10px 12px;
    background: #F7F7FA;
    border: 1px solid var(--hairline);
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Экран анализа */
.analysis-content {
    text-align: center;
    padding: 40px 24px;
}

.analysis-title {
    font-size: 22px;
    font-weight: 600;
    margin-top: 16px;
}

.analysis-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

.analysis-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 20px;
    text-align: center;
}

.analysis-spinner {
    width: 56px;
    height: 56px;
    margin: 8px auto 0;
    border: 4px solid #EEE;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Мягкая стилизация для элементов с цитатами */
.has-quote {
    font-style: italic;
}

/* Мини‑карточка цитаты внутри ответа */
.quote-card {
    display: block;
    width: 100%;
    flex-basis: 100%;
    background: #FFF5F9;
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 6px 0;
}

/* Ряд согласия с условиями на стартовом экране */
.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 12px;
}

.terms-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.terms-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.terms-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Неактивная кнопка */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.quote-card q {
    quotes: "«" "»" "‹" "›";
    font-style: italic;
    font-size: 0.95em;
}

/* Для длинных цитат переносы без ломки макета */
.quote-card,
.quote-card q {
    white-space: normal;
    word-break: break-word;
}

/* Стили для встроенных цитат */
q {
    quotes: "«" "»" "‹" "›";
    font-style: italic;
}

q:before {
    content: open-quote;
    color: var(--primary-color);
    font-weight: 400;
}

q:after {
    content: close-quote;
    color: var(--primary-color);
    font-weight: 400;
}

/* Цитаты в вопросах как мини‑карточки */
.question-title q,
.question-context q {
    display: block;
    background: #FFF5F9;
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px 10px;
    font-style: italic;
    margin: 6px 0;
    font-size: 0.8em;
    font-weight: 400;
    /* не жирный текст в цитате */
}

.screen-transition-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: var(--transition);
}

.screen-transition-exit {
    opacity: 1;
    transform: translateX(0);
}

.screen-transition-exit-active {
    opacity: 0;
    transform: translateX(-20px);
    transition: var(--transition);
}

/* Дополнительные стили для мобильных устройств */
@media (max-width: 768px) {
    body {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        touch-action: pan-y;
    }

    .option {
        -webkit-tap-highlight-color: transparent;
    }

    .btn {
        -webkit-tap-highlight-color: transparent;
    }


}

/* Предотвращение выделения текста на мобильных */
.option,
.btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Оптимизация для Telegram WebApp */
@supports (padding: max(0px)) {
    .container {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* удалены ограничения прокрутки */

/* Улучшенная читаемость на маленьких экранах */
@media (max-width: 360px) {
    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .question-title {
        font-size: 15px;
    }

    .option {
        font-size: 14px;
        padding: 12px 14px;
    }

    .percentage-item {
        padding: 12px;
    }

    .percentage-label {
        font-size: 12px;
    }

    .result-card {
        padding: 5px;
    }

    .option-label:before {
        width: 18px;
        height: 18px;
    }

    .option-label {
        padding-left: 28px;
    }

    .option-checkbox:checked+.option-label:after {
        left: 4px;
        font-size: 12px;
    }
}

.profile-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: rgb(102, 49, 215);
    text-align: center;
}

.type-long-desc {
    font-size: 15px;
    line-height: 1.6;
    color: #2D2D3A;
    margin: 8px 0 12px;
}

/* Цвета карточек по требованию */
#strengthsCard {
    background: rgb(235, 252, 244);
    border-color: rgb(198, 246, 223);
}

#risksCard {
    background: rgb(254, 251, 234);
    border-color: rgb(254, 241, 189);
}

#growthCard {
    background: rgb(239, 248, 255);
    border-color: rgb(222, 241, 254);
}