/* =================================================================
   Grammar Builder — Design System
   Дизайн по макетам deutsch-mit-maria.ru
   ================================================================= */


:root {
    --bg: #F8F9FA;
    --primary: #1a1a1a;
    --accent: #3b82f6;
    --accent-soft: #dbeafe;
    --success: #4ADE80;
    --success-bg: #F0FDF4;
    --error: #F87171;
    --error-bg: #FEF2F2;
    --card-bg: #F8F9FA;
    --card-border: #d6dce4;
    --hint-bg: #fef9e7;
    --hint-border: #f0e4b0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.25s ease;
}

h1,
h2,
h3,
h4,
h5,
h6,
.oeb-catalog-title,
.oeb-catalog-section-name,
.oeb-page-title,
.oeb-rule-title,
.oeb-extra-title,
.oeb-exercises-heading {
    font-family: var(--font-heading);
}

/* =================================================================
   1. КНОПКА «Mein Lernbereich» (fixed)
   ================================================================= */

.oeb-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 24px 0;
}

.oeb-dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #F98716;
    /* Оранжевый */
    color: #ffffff !important;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.oeb-dashboard-btn:hover {
    background: #e07914;
    /* Слегка темнеет */
    color: #ffffff !important;
    text-decoration: none;
    transform: translateY(-2px);
}

/* =================================================================
   2. ХЛЕБНЫЕ КРОШКИ
   ================================================================= */

.oeb-breadcrumbs {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.oeb-breadcrumbs a {
    color: #F98716;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.oeb-breadcrumbs a:hover {
    color: #e07914 !important;
    text-decoration: underline;
}

.oeb-breadcrumbs .separator {
    margin: 0 8px;
    color: #9ca3af;
}

.oeb-breadcrumbs .current {
    color: #23272E;
    font-weight: 600;
}

/* =================================================================
   3. ШАПКА (header)
   ================================================================= */

.oeb-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 60px;
    /* Убрал боковые паддинги, чтобы вставало четко по ширине */
    font-family: var(--font-main);
    color: var(--primary);
}

.oeb-header {
    text-align: center;
    padding: 16px 0 16px;
    background: #F8F9FA !important;
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 24px;
}

.oeb-section-label {
    font-size: 12px !important;
    font-weight: 400;
    letter-spacing: 0.1em !important;
    text-transform: uppercase;
    color: #23272E;
    margin-bottom: 6px;
    display: block;
}

.oeb-page-title {
    font-size: 24px !important;
    font-weight: 900;
    color: #23272E;
    margin: 0;
    line-height: 1.15;
    font-family: var(--font-heading);
}

/* =================================================================
   4. БЛОК ПРАВИЛА (rule box)
   ================================================================= */

.oeb-rule-box {
    background: var(--card-bg);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius);
    padding: 24px 40px 24px;
    margin-bottom: 48px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: visible;
}

.oeb-rule-title {
    font-size: 20px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px;
    color: #23272E;
    font-family: var(--font-heading);
}

.oeb-rule-description {
    font-size: 16px;
    line-height: 1.7;
    color: #23272E;
    font-family: var(--font-heading);
}



.oeb-rule-description p {
    margin: 0 0 12px;
}

.oeb-rule-description strong {
    font-weight: 700;
}

.oeb-rule-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.oeb-rule-description table th,
.oeb-rule-description table td {
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    text-align: left;
    font-size: 0.95rem;
}

.oeb-rule-description table th {
    background: #f9fafb;
    font-weight: 700;
}

/* =================================================================
   5. ЖЁЛТАЯ ПЛАШКА (hint box)
   ================================================================= */

.oeb-hint-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #FFF7ED;
    border: none;
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin-top: 24px;
}

.oeb-hint-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.oeb-hint-icon svg {
    width: 28px;
    height: 28px;
}

.oeb-hint-text {
    font-size: 15px;
    font-weight: 700;
    color: #F98716;
    line-height: 1.5;
    font-family: var(--font-main);
}






.oeb-hint-text strong,
.oeb-hint-text b {
    font-weight: 700;
}

/* =================================================================
   5.5 ЗАПОМИНАЛКА (Eselsbrücke)
   ================================================================= */

.oeb-eselsbruecke {
    position: absolute;
    top: -24px;
    right: 24px;
    background: #F8F9FA;
    border: none;
    border-left: 4px solid #F98716;
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 260px;
    z-index: 10;
    line-height: 1.6;
}

.oeb-eselsbruecke-icon {
    display: inline;
    font-size: 1.2rem;
    margin-right: 5px;
    vertical-align: middle;
}

.oeb-eselsbruecke-text {
    display: inline;
    font-size: 14px;
    font-weight: 400;
    color: #23272E;
    word-break: break-word;
    overflow-wrap: break-word;
    font-family: var(--font-main);
}

.oeb-eselsbruecke-text strong,
.oeb-eselsbruecke-text b {
    font-weight: 700;
}

.oeb-eselsbruecke-text p {
    display: inline;
    margin: 0;
}

/* =================================================================
   5.6 МЕЖСЕКЦИОННОЕ ИЗОБРАЖЕНИЕ
   ================================================================= */

.oeb-middle-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
}

.oeb-middle-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1.5px solid var(--card-border);
}

/* =================================================================
   6. ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ (extra info block)
   ================================================================= */

.oeb-extra-block {
    margin-bottom: 40px;
}

.oeb-extra-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.oeb-extra-title::after {
    content: "";
    flex-grow: 1;
    height: 2px;
    background: #e5e7eb;
}

.oeb-extra-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 24px;
}

.oeb-extra-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 12px 0;
}

.oeb-extra-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.oeb-extra-content table th,
.oeb-extra-content table td {
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    text-align: left;
}

.oeb-extra-content table th {
    background: #f9fafb;
    font-weight: 700;
}

/* Info cards grid -> flex for smart stretching */
.oeb-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.oeb-info-card {
    flex: 1 1 calc(50% - 20px);
    /* 2 в ряд по умолчанию */
    min-width: 260px;
    /* защита для телефонов */
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--transition);
}

.oeb-info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.oeb-info-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #F98716;
    font-family: var(--font-heading);
}

.oeb-info-card-desc {
    font-size: 16px;
    color: #23272E;
    font-weight: 400;
    line-height: 1.5;
    font-family: var(--font-main);
}

.oeb-info-card-example {
    font-size: 14px;
    font-style: italic;
    background: #ffffff;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid #E2E8F0;
    border-left: 4px solid #F98716;
    color: #23272E;
    font-family: var(--font-main);
}

.oeb-info-card-list {
    margin: 0;
    padding: 0 0 0 20px;
    list-style-type: disc;
}

.oeb-info-card-list li {
    margin-bottom: 16px;
}

.oeb-info-card-list li:last-child {
    margin-bottom: 0;
}

.oeb-info-card-list li .oeb-info-card-desc {
    margin-bottom: 6px;
}

.oeb-info-card-list li .oeb-info-card-example {
    margin-top: 6px;
}

/* =================================================================
   6.5. ОПЦИОНАЛЬНАЯ ТАБЛИЦА (Custom Table)
   ================================================================= */

.oeb-custom-table-wrapper {
    margin: 32px 0;
    overflow-x: auto;
}

.oeb-custom-table-wrapper table,
.oeb-custom-table-wrapper .tablepress {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden !important;
    font-family: var(--font-main) !important;
    background: #ffffff !important;
    margin: 0 !important;
}

.oeb-custom-table-wrapper table th,
.oeb-custom-table-wrapper table td,
.oeb-custom-table-wrapper .tablepress th,
.oeb-custom-table-wrapper .tablepress td {
    padding: 18px 24px !important;
    /* Просторные отступы как на скрине */
    text-align: left !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.oeb-custom-table-wrapper table tr:last-child th,
.oeb-custom-table-wrapper table tr:last-child td,
.oeb-custom-table-wrapper .tablepress tr:last-child th,
.oeb-custom-table-wrapper .tablepress tr:last-child td {
    border-bottom: none !important;
    /* Убираем нижнюю линию у последней строки */
}

.oeb-custom-table-wrapper table th,
.oeb-custom-table-wrapper table thead td,
.oeb-custom-table-wrapper .tablepress thead th,
.oeb-custom-table-wrapper .tablepress thead td {
    background: #f8fafc !important;
    /* Светло-серый фон для заголовков */
    font-weight: 700 !important;
    color: #111827 !important;
}

.oeb-custom-table-wrapper table td,
.oeb-custom-table-wrapper .tablepress tbody td {
    color: #374151 !important;
    background: transparent !important;
}

.oeb-custom-table-wrapper table td strong,
.oeb-custom-table-wrapper table th strong,
.oeb-custom-table-wrapper .tablepress td strong,
.oeb-custom-table-wrapper .tablepress th strong {
    font-weight: 700 !important;
}

/* =================================================================
   7. УПРАЖНЕНИЯ — ОБЩИЕ СТИЛИ
   ================================================================= */

.oeb-exercises-section {
    margin-top: 50px;
}

.oeb-exercises-heading {
    font-size: 20px !important;
    font-weight: 700;
    color: #23272E;
    margin-bottom: 16px !important;
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: var(--font-heading);
}

.oeb-exercises-heading::after {
    display: none;
}

/* Отдельный блок упражнения */
.oeb-exercise-block {
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px !important;
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

.oeb-exercise-block-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin-bottom: 8px !important;
    padding-bottom: 4px !important;
    display: inline-block !important;
    font-family: var(--font-heading);
    position: relative !important;
    border-bottom: none !important;
}

.oeb-exercise-block-title::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100px !important;
    height: 2px !important;
    background-color: #ee820d !important;
    border-radius: 50px !important;
}

.oeb-exercise-instruction {
    font-size: 13px !important;
    font-style: italic !important;
    color: #6b7280 !important;
    margin-bottom: 12px !important;
    display: block;
}

/* Единичное задание внутри блока */
.oeb-exercise-item {
    margin-bottom: 11px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.oeb-exercise-item:last-child {
    margin-bottom: 0 !important;
}

.oeb-exercise-question {
    font-weight: 400 !important;
    font-size: 16px !important;
    color: #23272E;
    margin-bottom: 6px !important;
    line-height: 1.4 !important;
    font-family: var(--font-main);
}

/* =================================================================
   7.1 AUSWAHL / SYNONYME — кнопки-варианты
   ================================================================= */

.oeb-auswahl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .oeb-auswahl-grid {
        grid-template-columns: 1fr;
    }
}

.oeb-options-group {
    display: flex;
    gap: 8px !important;
    flex-wrap: wrap;
    margin-top: 0 !important;
}

.oeb-option-btn {
    padding: 6px 14px !important;
    border: 2px solid #9CA3AF !important;
    background: white !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-family: var(--font-main) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: var(--transition);
    position: relative;
    color: #23272E !important;
}

.oeb-option-btn:hover {
    background: #f3f4f6 !important;
    border-color: #6B7280 !important;
    color: #6B7280 !important;
}

.oeb-option-btn.selected {
    background: #FFF7ED !important;
    color: #F98716 !important;
    border-color: #F98716 !important;
}

.oeb-option-btn.correct {
    background: #F0FDF4 !important;
    border-color: #4ADE80 !important;
    border-width: 2px !important;
    color: #166534 !important;
}

.oeb-option-btn.wrong {
    background: #FEF2F2 !important;
    border-color: #F87171 !important;
    border-width: 2px !important;
    color: #991B1B !important;
}

/* =================================================================
   7.2 LÜCKENTEXT / TRANSFORMATION / SATZANFANG — поля ввода
   ================================================================= */

.oeb-input-blank {
    border: none !important;
    border-bottom: 2.5px solid #d1d5db !important;
    border-radius: 0 !important;
    font-family: var(--font-main) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    min-width: 40px !important;
    max-width: 100% !important;
    width: 5ch;
    text-align: center !important;
    outline: none !important;
    background: transparent !important;
    padding: 2px 4px !important;
    margin: 0 4px !important;
    transition: var(--transition) !important;
    box-shadow: none !important;
    height: auto !important;
}

.oeb-input-blank:focus {
    border-bottom-color: #ee820d !important;
}

.oeb-input-blank.correct {
    background: transparent !important;
    border-bottom-color: var(--success) !important;
    color: #065f46 !important;
}

.oeb-input-blank.wrong {
    background: transparent !important;
    border-bottom-color: var(--error) !important;
    color: #991b1b !important;
}

.oeb-input-blank::placeholder {
    color: transparent !important;
}

.oeb-text-input {
    width: 100% !important;
    padding: 7px 18px !important;
    border: 2px solid var(--card-border) !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-main) !important;
    font-size: 1rem !important;
    outline: none !important;
    transition: var(--transition);
    background: #fcfcfc !important;
}

.oeb-text-input:focus {
    border-color: #CBD5E1 !important;
    box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.4) !important;
}

.oeb-text-input.correct {
    background: var(--success-bg) !important;
    border-color: var(--success) !important;
}

.oeb-text-input.wrong {
    background: var(--error-bg) !important;
    border-color: var(--error) !important;
}

.oeb-text-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Блок с подсказкой, появляющийся при вводе (например, Satzanfang) */
.oeb-input-hint-box {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #4b5563;
    font-style: italic;
    background: #fdfdf9;
    border-left: 3px solid #fef08a;
    padding: 8px 12px;
    border-radius: 4px;
    display: none;
}

.oeb-input-hint-box.show {
    display: block;
    animation: oeb-fade-in 0.3s ease-in-out;
}

@keyframes oeb-fade-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   7.3 SATZBAU — слова в скобках + поле ввода
   ================================================================= */

.oeb-satzbau-words {
    font-size: 0.95rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 8px !important;
}

/* =================================================================
   7.3.5 ZWEISPALTIG — две колонки ввода
   ================================================================= */

.oeb-zweispaltig-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.oeb-zweispaltig-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0 !important;
}

.oeb-zweispaltig-left {
    flex: 0 0 auto;
    min-width: 80px;
    font-size: 16px;
    color: #23272E;
    font-weight: 400;
}

.oeb-zweispaltig-right {
    flex: 1;
}

.oeb-zweispaltig-input {
    width: 100% !important;
}

@media (max-width: 900px) {
    .oeb-zweispaltig-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .oeb-zweispaltig-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .oeb-zweispaltig-left,
    .oeb-zweispaltig-right {
        flex: none;
        width: 100%;
    }
}

/* =================================================================
   7.4 ZUORDNUNG — drag & drop / select
   ================================================================= */

.oeb-zuordnung-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 12px 8px !important;
}

.oeb-zuordnung-table td {
    font-size: 16px !important;
    font-weight: 400;
}

.oeb-zuordnung-left {
    background: #fcfcfc !important;
    border-radius: var(--radius-sm) !important;
    border: 2px solid var(--card-border) !important;
    width: 50%;
    padding: 8px 12px !important;
    vertical-align: middle;
    height: 36px !important;
}

.oeb-zuordnung-right {
    width: 50%;
    padding: 0 !important;
    vertical-align: middle;
}

.oeb-zuordnung-right select {
    width: 100%;
    height: 36px !important;
    min-height: 36px !important;
    padding: 8px 12px !important;
    border: 2px solid var(--card-border) !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-main) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    outline: none !important;
    cursor: pointer !important;
    background: white !important;
    transition: var(--transition);
    box-sizing: border-box;
    accent-color: #F98716;
}

.oeb-zuordnung-right select:focus {
    border-color: #CBD5E1 !important;
    box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.4);
}

.oeb-zuordnung-right select option:checked,
.oeb-zuordnung-right select option:hover,
.oeb-zuordnung-right select option:focus,
.oeb-zuordnung-right select option:active {
    background: #F98716 !important;
    color: #ffffff !important;
}

.oeb-zuordnung-right select.correct {
    background: var(--success-bg) !important;
    border-color: var(--success) !important;
}

.oeb-zuordnung-right select.wrong {
    background: var(--error-bg) !important;
    border-color: var(--error) !important;
}

/* =================================================================
   7.5 FEHLERSUCHE — кликабельные слова
   ================================================================= */

.oeb-fehlersuche-sentence {
    font-size: 16px !important;
    line-height: var(--line-height) !important;
    margin-bottom: 12px !important;
}

.oeb-fehlersuche-word {
    cursor: pointer;
    padding: 0px 2px;
    border-radius: 4px;
    transition: var(--transition);
}

.oeb-fehlersuche-word:hover {
    background: #e5e7eb;
}

.oeb-fehlersuche-word.selected {
    background: #FFF7ED !important;
    color: #F98716 !important;
    border-radius: 4px;
    font-weight: 700;
}

.oeb-fehlersuche-word.correct-found {
    background: var(--success-bg);
    color: #065f46;
    text-decoration: line-through;
}

.oeb-fehlersuche-word.wrong-found {
    background: var(--error-bg);
    color: #991b1b;
}

.oeb-fehlersuche-correction {
    margin-top: 8px;
}

.oeb-fehlersuche-correction input {
    border: 1.5px solid #d1d5db !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    min-width: 60px;
    max-width: 100%;
    width: 6ch;
    text-align: center;
    outline: none;
    background: #ffffff;
    padding: 8px 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.oeb-fehlersuche-correction input:focus {
    border-color: #CBD5E1 !important;
    box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.4) !important;
}

.oeb-fehlersuche-correction input.correct {
    border-color: var(--success) !important;
}

.oeb-fehlersuche-correction input.wrong {
    border-color: var(--error) !important;
}

/* --- Fehlersuche Full-Text Mode --- */
.oeb-fehlersuche-fulltext {
    grid-column: 1 / -1;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.oeb-fs-inline-correction {
    display: inline-block;
    margin-left: 4px;
    margin-right: 4px;
}

.oeb-fs-inline-input {
    border: 1.5px solid #d1d5db !important;
    border-radius: var(--radius-sm) !important;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 40px;
    width: 6ch;
    text-align: center;
    outline: none;
    background: #ffffff;
    padding: 4px 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.oeb-fs-inline-input:focus {
    border-color: #CBD5E1 !important;
    box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.4) !important;
}

.oeb-fs-inline-input.correct {
    border-color: var(--success) !important;
}

.oeb-fs-inline-input.wrong {
    border-color: var(--error) !important;
}

.oeb-fs-missed {
    text-decoration: underline;
    text-decoration-color: var(--error);
    text-decoration-style: wavy;
    text-decoration-thickness: 2px;
}

/* =================================================================
   7.6 BILDBESCHREIBUNG — картинка + поле ввода
   ================================================================= */

.oeb-bild-image {
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border: 1.5px solid var(--card-border);
}

/* =================================================================
   8. КНОПКА ПРОВЕРКИ
   ================================================================= */

.oeb-btn-check,
.oeb-btn-send {
    display: block !important;
    width: auto !important;
    min-width: auto !important;
    height: auto !important;
    padding: 10px 24px !important;
    margin: 16px auto 0 !important;
    background: #F98716 !important;
    color: white !important;
    border: none !important;
    font-family: var(--font-main) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: var(--transition);
}

.oeb-btn-check:hover,
.oeb-btn-send:hover {
    opacity: 0.95;
    transform: scale(1.02);
    background: #e07914 !important;
    color: white !important;
}

/* =================================================================
   8.5 ПОДСКАЗКА К УПРАЖНЕНИЯМ
   ================================================================= */

.oeb-input-hint-box {
    display: none;
    align-items: flex-start;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-left: 4px solid #F98716;
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    margin-top: 12px;
    font-size: 14px;
    font-style: italic;
    font-weight: 400;
    color: #23272E;
    line-height: 1.5;
    font-family: var(--font-main);
}

.oeb-text-input:focus+.oeb-input-hint-box {
    display: flex;
}

.oeb-input-hint-box strong,
.oeb-input-hint-box b {
    font-weight: 700;
    font-style: normal;
}

/* =================================================================
   9. ОБРАТНАЯ СВЯЗЬ (feedback)
   ================================================================= */

.oeb-feedback {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    display: none;
}

.oeb-feedback.show {
    display: block;
}

.oeb-feedback.success {
    background: var(--success-bg);
    color: #065f46;
    border: 1.5px solid var(--success);
}

.oeb-feedback.error {
    background: var(--error-bg);
    color: #991b1b;
    border: 1.5px solid var(--error);
}

/* Показ правильного ответа */
.oeb-correct-answer {
    display: inline-block;
    margin-left: 4px;
    margin-right: 4px;
    padding: 2px 10px;
    background: #F0FDF4;
    border: 1px solid #4ADE80;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #166534;
}

.oeb-text-input+.oeb-correct-answer,
select+.oeb-correct-answer {
    margin-top: 12px;
    margin-right: 16px;
    padding: 4px 14px;
}

/* =================================================================
   10. ССЫЛКА НА УПРАЖНЕНИЯ (banner)
   ================================================================= */

.oeb-exercises-link-banner {
    background: #F8F9FA;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 24px 36px !important;
    margin-top: 40px;
    text-align: center;
}

.oeb-exercises-link-title {
    font-size: 18px !important;
    font-weight: 800;
    margin: 0 0 8px;
    color: #23272E;
    font-family: var(--font-heading);
}

.oeb-exercises-link-desc {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 20px;
}

.oeb-exercises-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px !important;
    height: auto !important;
    background: #F98716;
    color: white;
    font-family: var(--font-main);
    font-weight: 700 !important;
    font-size: 15px !important;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.oeb-exercises-link-btn:hover {
    background: #e07914;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(249, 135, 22, 0.35);
    color: white !important;
    text-decoration: none;
}

/* =================================================================
   11. КАТАЛОГ [gb_catalog] — шорткод
   ================================================================= */

.oeb-catalog {
    max-width: 100%;
    margin: 0 auto;
    font-family: var(--font-main);
}

.oeb-catalog-header {
    text-align: center;
    margin-bottom: 20px;
}

.oeb-catalog-label {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #23272E;
    margin-bottom: 10px;
    display: block;
}

.oeb-catalog-title {
    font-size: 32px;
    font-weight: 900;
    color: #23272E;
    margin: 0 0 8px;
}

.oeb-catalog-subtitle {
    font-size: 15px;
    color: #6b7280;
}

/* --- Search --- */
.oeb-catalog-search {
    position: relative;
    max-width: 460px;
    margin: 0 auto 28px;
}

.oeb-catalog-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.oeb-catalog-search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 500;
    color: #23272E;
    background: #ffffff;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 14px !important;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

.oeb-catalog-search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.oeb-catalog-search-input:focus {
    border-color: #F98716;
    box-shadow: 0 0 0 3px rgba(249, 135, 22, 0.12);
}

.oeb-catalog-no-results {
    text-align: center;
    padding: 32px 16px;
    font-size: 15px;
    color: #9ca3af;
    font-family: var(--font-main);
}

.oeb-catalog-section {
    background: var(--card-bg);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius);
    margin-bottom: 6px;
    overflow: hidden;
    transition: var(--transition);
}

.oeb-catalog-section:hover {
    box-shadow: var(--shadow);
}

.oeb-catalog-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
}

.oeb-catalog-section-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.oeb-catalog-section-icon {
    width: 28px;
    height: 28px;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #F98716;
}

.oeb-catalog-section-name {
    font-size: 18px;
    color: #23272E;
    font-weight: 700;
    margin: 0;
    font-family: var(--font-heading);
}

.oeb-catalog-section-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oeb-catalog-section-count {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    background: #FDE047;
    border-radius: 8px;
    color: #23272E;
}

.oeb-catalog-section-arrow {
    transition: transform 0.3s ease;
    color: #23272E;
    font-size: 1.2rem;
}

.oeb-catalog-section.open .oeb-catalog-section-arrow {
    transform: rotate(180deg);
}

.oeb-catalog-section-items {
    display: none;
    padding: 0 20px 10px;
}

.oeb-catalog-section.open .oeb-catalog-section-items {
    display: block;
}

.oeb-catalog-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #FFF7ED;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    transition: var(--transition);
    text-decoration: none;
    margin-bottom: 6px;
}

.oeb-catalog-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.oeb-catalog-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #23272E;
    margin: 0;
    display: flex;
    align-items: center;
    font-family: var(--font-main);
}

.oeb-catalog-item-title::before {
    content: "•";
    margin-right: 12px;
    font-size: 1.4rem;
    color: currentColor;
}

.oeb-catalog-item-arrow {
    font-size: 1.2rem;
    color: #23272E;
    transition: transform 0.2s;
}

/* =================================================================
   12. RESPONSIVE
   ================================================================= */

@media (max-width: 768px) {
    .oeb-page-title {
        font-size: 2rem;
    }

    .oeb-rule-box {
        padding: 24px 20px;
        display: flex;
        flex-direction: column;
    }

    .oeb-eselsbruecke {
        position: relative;
        top: 0;
        right: 0;
        max-width: 100%;
        margin-top: 16px;
        order: 99;
        /* Перемещаем в конец блока правила на мобильных */
    }

    .oeb-info-grid {
        grid-template-columns: 1fr;
    }

    .oeb-dashboard-btn {
        font-size: 0.85rem;
        padding: 8px 14px;
    }

    .oeb-exercises-heading {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .oeb-page-title {
        font-size: 1.6rem;
    }

    .oeb-container {
        padding: 0 12px 40px;
    }

    .oeb-catalog-section-header {
        padding: 12px 14px;
    }
}

/* 4.5 DRAG & DROP COLUMNS */
.oeb-dragcol-columns {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: nowrap;
    align-items: stretch;
}

.oeb-dragcol-column {
    flex: 1;
    border: 2px dashed #F98716;
    border-radius: 12px;
    padding: 16px;
    background: #FFFAF5;
    display: flex;
    flex-direction: column;
}

.oeb-dragcol-header {
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: #23272e;
}

.oeb-dragcol-dropzone {
    flex: 1;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: background 0.3s, border-color 0.3s;
}

.oeb-dragcol-dropzone.drag-over {
    background: #FFF1E0;
    border-color: #E27712;
}

.oeb-dragcol-words-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    background: #F8F9FA;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    min-height: 50px;
}

.oeb-dragcol-word {
    background: #FFFFFF;
    border: 1px solid #F98716;
    color: #F98716;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: grab;
    user-select: none;
    transition: all 0.2s;
    text-align: center;
}

.oeb-dragcol-word:active,
.oeb-dragcol-word.dragging {
    cursor: grabbing;
    opacity: 0.5;
    transform: scale(0.95);
}

.oeb-dragcol-word.correct {
    background: #E8F5E9 !important;
    border-color: #388E3C !important;
    color: #388E3C !important;
    cursor: default;
}

.oeb-dragcol-word.wrong {
    background: #FFEBEE !important;
    border-color: #D32F2F !important;
    color: #D32F2F !important;
}

@keyframes oeb-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@media (max-width: 768px) {
    .oeb-dragcol-columns {
        flex-direction: column;
    }
}

/* =================================================================
   GAPDRAG — перетаскивание слов в пропуски
   ================================================================= */

.oeb-gapdrag-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
    background: #f8fafc;
    border: 1.5px dashed var(--card-border);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    min-height: 48px;
}

.oeb-gapdrag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: #ffffff;
    border: 2px solid #9CA3AF;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    color: #23272E;
    cursor: grab;
    user-select: none;
    transition: var(--transition);
}

.oeb-gapdrag-chip:hover {
    border-color: #F98716;
    background: #FFF7ED;
    color: #F98716;
}

.oeb-gapdrag-chip.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.oeb-gapdrag-chip.placed {
    display: none;
}

.oeb-gapdrag-sentences {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .oeb-gapdrag-sentences {
        grid-template-columns: 1fr;
    }
}

.oeb-gapdrag-sentence {
    font-size: 16px;
    font-weight: 400;
    line-height: 2.6;
    color: #23272E;
    font-family: var(--font-main);
}

.oeb-gapdrag-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    height: 32px;
    border-bottom: 2.5px solid #d1d5db;
    margin: 0 4px;
    padding: 2px 8px;
    vertical-align: bottom;
    font-size: 14px;
    font-weight: 700;
    color: #23272E;
    transition: var(--transition);
    cursor: default;
}

.oeb-gapdrag-slot.drag-over {
    border-bottom-color: #F98716;
    background: #FFF7ED;
    border-radius: 4px;
}

.oeb-gapdrag-slot.filled {
    border-bottom-color: #F98716;
    color: #F98716;
    cursor: pointer;
}

.oeb-gapdrag-slot.correct {
    border-bottom-color: #4ADE80 !important;
    color: #166534 !important;
    background: #F0FDF4;
    border-radius: 4px;
}

.oeb-gapdrag-slot.wrong {
    border-bottom-color: #F87171 !important;
    color: #991B1B !important;
    background: #FEF2F2;
    border-radius: 4px;
}

.oeb-gapdrag-sentences,
.oeb-lueckentext-grid,
.oeb-fehlersuche-grid,
.oeb-satzbaudrag-grid,
.oeb-uebersetzung-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 24px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {

    .oeb-gapdrag-sentences,
    .oeb-lueckentext-grid,
    .oeb-fehlersuche-grid,
    .oeb-satzbaudrag-grid,
    .oeb-uebersetzung-grid {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
   SATZBAU DRAG & DROP
   ================================================================= */
.oeb-satzbaudrag-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oeb-satzbaudrag-dropzone {
    min-height: 48px;
    border: 2px dashed #CBD5E1;
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    transition: var(--transition);
}

.oeb-satzbaudrag-dropzone.drag-over {
    border-color: #F98716;
    background: #FFF7ED;
}

.oeb-satzbaudrag-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 48px;
    padding: 10px;
    border: 2px solid transparent;
}

.oeb-satzbaudrag-word {
    padding: 8px 16px;
    background: #ffffff;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    cursor: grab;
    user-select: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.oeb-satzbaudrag-word:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #CBD5E1;
}

.oeb-satzbaudrag-word:active {
    cursor: grabbing;
}

.oeb-satzbaudrag-word.dragging {
    opacity: 0.5;
}

.oeb-satzbaudrag-word.correct {
    background: #F0FDF4;
    border-color: #4ADE80;
    color: #166534;
}

.oeb-satzbaudrag-word.wrong {
    background: #FEF2F2;
    border-color: #F87171;
    color: #991B1B;
}

/* Empty placeholder */
.oeb-satzbaudrag-dropzone:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    font-style: italic;
    font-size: 15px;
    display: flex;
    align-items: center;
    padding-left: 8px;
}

/* =================================================================
   ÜBERSETZUNG (ПЕРЕВОД)
   ================================================================= */
.oeb-uebersetzung-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.oeb-uebersetzung-phrase {
    font-size: 16px;
    color: #4b5563;
    font-weight: 500;
    line-height: 1.4;
    position: relative;
    padding-left: 16px;
}

.oeb-uebersetzung-phrase::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #23272E;
    font-size: 20px;
    line-height: 1.1;
}

.oeb-uebersetzung-input {
    margin-top: 4px;
}

/* =================================================================
   WORTBANK — банк слов + ввод в текст
   ================================================================= */
.oeb-wortbank-words {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    background: #f8fafc;
    border: 1.5px dashed var(--card-border);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    justify-content: center;
}

.oeb-wortbank-word {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: #ffffff;
    border: 2px solid #9CA3AF;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    color: #23272E;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.oeb-wortbank-word:hover {
    border-color: #F98716;
    background: #FFF7ED;
    color: #F98716;
}

.oeb-wortbank-word.used {
    text-decoration: line-through;
    opacity: 0.45;
    border-color: #d1d5db;
    background: #f3f4f6;
    color: #9ca3af;
}

.oeb-wortbank-text {
    font-size: 16px;
    line-height: 2.4;
    color: #23272E;
    font-family: var(--font-main);
    margin-bottom: 16px;
}

.oeb-wortbank-text p {
    margin: 0 0 12px;
}

.oeb-wortbank-input {
    width: 8ch !important;
    min-width: 50px !important;
}

/* =================================================================
   12. VERGLEICH — сравнение слов
   ================================================================= */

.oeb-exercise-vergleich {
    background: #F8F9FA;
    border: 1.5px solid #d6dce4;
    border-radius: var(--radius);
    padding: 32px;
}

.oeb-vergleich-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .oeb-vergleich-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.oeb-vergleich-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
}

.oeb-vergleich-col {
    text-align: center;
    width: 41.666667%;
}

.oeb-vergleich-word {
    display: block;
    font-weight: 900;
    font-size: 1.125rem;
    color: #1f2937;
    font-family: var(--font-main);
    line-height: 1.2;
}

.oeb-vergleich-translation {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    font-family: var(--font-main);
    margin-top: 4px;
}

.oeb-vergleich-divider {
    color: #fb923c;
    font-weight: 700;
    width: 16.666667%;
    text-align: center;
    font-family: var(--font-main);
    font-size: 1rem;
}

.oeb-text-highlight {
    color: #b45309;
}

/* =================================================================
   12.5 VERGLEICH — Сравнение правил (Правило VS Правило)
   ================================================================= */

.oeb-vergleich-rules-grid {
    display: flex;
    flex-direction: column;
    background: #111111;
    border-radius: var(--radius-sm, 12px);
    overflow: hidden;
    margin-top: 24px;
}

.oeb-vergleich-rules-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 24px 32px 16px;
    gap: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.oeb-vergleich-rules-col-title {
    color: #ffffff;
    font-weight: 700;
    font-family: var(--font-heading, var(--font-main));
    font-size: 17px;
}

.oeb-vergleich-rules-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 20px 32px;
    gap: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s;
}

.oeb-vergleich-rules-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.oeb-vergleich-rules-row:last-child {
    border-bottom: none;
    padding-bottom: 24px;
}

.oeb-vergleich-rules-col-content {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: #d1d5db;
}

.oeb-vergleich-rules-col-content p {
    margin: 0;
}

.oeb-vergleich-rules-col-content strong {
    font-weight: 700;
    color: #ffffff;
}

.oeb-vergleich-rules-col-content em,
.oeb-vergleich-rules-col-content i {
    font-style: italic;
    color: #f3f4f6;
}

@media (max-width: 768px) {
    .oeb-vergleich-rules-header {
        display: none;
    }

    .oeb-vergleich-rules-row {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px 20px;
    }

    .oeb-vergleich-rules-col-content:first-child {
        padding-bottom: 16px;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    }
}

.oeb-cols-1 {
    grid-template-columns: 1fr !important;
}

/* =================================================================
   13. EXERCISE TABELLE (Table filling)
   ================================================================= */
.oeb-tabelle-grid {
    display: grid;
    gap: 0;
    border: 1.5px solid var(--card-border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    margin-top: 10px;
}

.oeb-tabelle-cols-1 {
    grid-template-columns: repeat(1, 1fr);
}

.oeb-tabelle-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.oeb-tabelle-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.oeb-tabelle-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.oeb-tabelle-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.oeb-tabelle-col {
    border-right: 1.5px solid var(--card-border, #e5e7eb);
}

.oeb-tabelle-col:last-child {
    border-right: none;
}

.oeb-tabelle-col-header {
    background: #fdfdf9;
    padding: 12px;
    font-weight: 700;
    text-align: center;
    border-bottom: 1.5px solid var(--card-border, #e5e7eb);
    color: #F98716;
}

.oeb-tabelle-col-body {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oeb-tabelle-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 15px;
}

.oeb-tabelle-item .oeb-input-blank {
    min-width: 60px;
}

@media (max-width: 900px) {

    .oeb-tabelle-cols-5,
    .oeb-tabelle-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .oeb-tabelle-grid {
        grid-template-columns: 1fr !important;
    }

    .oeb-tabelle-col {
        border-right: none;
        border-bottom: 1.5px solid var(--card-border, #e5e7eb);
    }

    .oeb-tabelle-col:last-child {
        border-bottom: none;
    }
}

/* =================================================================
   15. MEMORY MATCH — найди пару (карточки)
   ================================================================= */

.oeb-memory-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #6b7280;
    font-family: var(--font-main);
}

.oeb-memory-stats strong {
    color: #23272E;
}

.oeb-memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 680px;
    margin: 0 auto 24px;
}

.oeb-memory-card {
    aspect-ratio: 1;
    perspective: 800px;
    cursor: pointer;
}

.oeb-memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    border-radius: 12px;
}

.oeb-memory-card.flipped .oeb-memory-card-inner,
.oeb-memory-card.matched .oeb-memory-card-inner {
    transform: rotateY(180deg);
}

.oeb-memory-card-front,
.oeb-memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-main);
    box-sizing: border-box;
}

.oeb-memory-card-front {
    background: #FFF7ED;
    color: #F98716;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(249, 135, 22, 0.2);
    border: 2px solid rgba(249, 135, 22, 0.3);
}

.oeb-memory-card:hover .oeb-memory-card-front {
    box-shadow: 0 4px 16px rgba(249, 135, 22, 0.35);
    transform: scale(1.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.oeb-memory-card-back {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    transform: rotateY(180deg);
    font-weight: 600;
    font-size: 15px;
    padding: 12px;
    text-align: center;
    word-break: break-word;
    color: #23272E;
    line-height: 1.3;
}

.oeb-memory-card.matched .oeb-memory-card-back {
    border-color: var(--success, #4ADE80);
    background: #f0fdf4;
    color: #166534;
}

.oeb-memory-card.matched {
    animation: oeb-memory-match-pulse 0.5s ease;
}

.oeb-memory-card.hidden {
    visibility: hidden;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s 0.4s;
}

.oeb-memory-card.mismatched .oeb-memory-card-back {
    border-color: #F87171;
    background: #FEF2F2;
}

@keyframes oeb-memory-match-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.oeb-memory-restart {
    display: none;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 600px) {
    .oeb-memory-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .oeb-memory-card-front {
        font-size: 1.4rem;
    }

    .oeb-memory-card-back {
        font-size: 0.8rem;
        padding: 8px;
    }

    .oeb-memory-stats {
        gap: 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 400px) {
    .oeb-memory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .oeb-exercise-instruction,
    .oeb-exercise-instruction *,
    .oeb-exercise-instruction p,
    .oeb-exercise-instruction .line-content,
    .oeb-exercise-instruction .line-content p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
}