/* Общие правки вёрстки (десктоп + мобильный) */

#mode-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.trainer-page h3,
.trainer-page h4,
.trainer-page .font-bold.text-white {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.trainer-page label.flex.items-center span.text-slate-200 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Кнопка «Следующая задача» — без раздувания панели и автопрокрутки страницы */
#next-puzzle-container {
    scroll-margin-top: 1rem;
    scroll-margin-bottom: 1rem;
}

.training-board-toolbar__btn {
    box-sizing: border-box;
}

.training-task-banner {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
}
.training-task-banner__title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.engine-thought-slot {
    width: 100%;
}

.training-task-banner__sub {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #c7d2fe;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Светлая тема: ответы ИИ в тренажёре */
html[data-theme="light"] .training-task-banner {
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
}
html[data-theme="light"] .training-task-banner__title {
    color: #1e293b !important;
}
html[data-theme="light"] .training-task-banner__sub {
    color: #475569 !important;
}
html[data-theme="light"] .training-coach-card {
    background: #ffffff !important;
    border-color: #c7d2fe !important;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.1) !important;
}
html[data-theme="light"] .training-coach-feedback,
html[data-theme="light"] #coach-feedback,
html[data-theme="light"] #coach-feedback p,
html[data-theme="light"] #coach-feedback .text-indigo-100,
html[data-theme="light"] #coach-feedback .text-indigo-200,
html[data-theme="light"] #coach-feedback .leading-relaxed {
    color: #334155 !important;
}
html[data-theme="light"] #plan-ai-result,
html[data-theme="light"] #conversion-ai-comment-loader,
html[data-theme="light"] #coach-feedback .bg-indigo-500\/10 {
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
    color: #1e293b !important;
}
html[data-theme="light"] .ai-bot-reply {
    background: #eef2ff !important;
    border-color: #c7d2fe !important;
    border-left-color: #4f46e5 !important;
}
html[data-theme="light"] .ai-bot-reply-label {
    color: #4338ca !important;
}
html[data-theme="light"] .ai-bot-reply-text,
html[data-theme="light"] .ai-bot-reply .text-indigo-100 {
    color: #1e293b !important;
}

/* Главная / тренажёр: на светлой теме — контурные кнопки (как «Кабинет тренера») */
html[data-theme="light"] .home-action-btn {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
html[data-theme="light"] .home-action-btn:hover {
    background: #f8fafc !important;
    border-color: #818cf8 !important;
    color: #4338ca !important;
}
html[data-theme="light"] .home-action-btn i {
    color: #4f46e5 !important;
}
html[data-theme="light"] .trainer-ai-plan-btn {
    background: #ffffff !important;
    border-color: #c7d2fe !important;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.08) !important;
}
html[data-theme="light"] .trainer-ai-plan-btn:hover {
    background: #f8fafc !important;
    border-color: #818cf8 !important;
}
html[data-theme="light"] .trainer-ai-plan-btn h4 {
    color: #1e293b !important;
}
html[data-theme="light"] .trainer-ai-plan-btn p {
    color: #475569 !important;
}
html[data-theme="light"] .trainer-ai-plan-btn > div:first-child {
    background: #eef2ff !important;
    color: #4f46e5 !important;
}

html[data-theme="light"] .profile-flash-ok {
    background: #ecfdf5 !important;
    border-color: #6ee7b7 !important;
}
html[data-theme="light"] .profile-flash-ok,
html[data-theme="light"] .profile-flash-ok p {
    color: #065f46 !important;
}
html[data-theme="light"] .profile-flash-ok i {
    color: #047857 !important;
}

/* Статистика: подсветка своей строки в топе без сдвига колонок (border-l раздувал таблицу) */
.stats-lb-table tr.stats-lb-row-me {
    box-shadow: inset 3px 0 0 #6366f1;
}

/* Сводка Lichess — только в профиле, не в упражнениях */
#training-session-root.is-plan-mode #mode-desc {
    display: none !important;
}
