﻿.book-math {
    color: #2e7d32;
    font-weight: bold;
}

.book-phys {
    color: #ef6c00;
    font-weight: bold;
}

.book-chem {
    color: #0288d1;
    font-weight: bold;
}

.book-bio {
    color: #4802d1;
    font-weight: bold;
}

mjx-container[jax="CHTML"] {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nowrap-span mjx-container[jax="CHTML"] {
    white-space: nowrap !important;
}

#ContentPlaceCalc_SolutionOutput a, #ContentPlaceCalc_Error a, #ContentPlaceCalc_Steps a {
    text-decoration: underline !important;
}

.dice-matrix {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 10px;
    max-width: 500px;
    width: 100%;
    margin: 20px auto;
    padding: 12px;
    background-color: var(--bg-gray-base);
    border-radius: 8px;
    border: 1px solid #e3e3e3;
    box-sizing: border-box;
}

.dice-pair {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 40px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

    .dice-pair:hover {
        transform: scale(1.08);
        border-color: var(--accent);
        box-shadow: 0 4px 8px rgba(59, 130, 246, 0.15);
        z-index: 2;
    }

.dice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 26px;
    line-height: 1;
    color: #2d3748;
}

    .dice.d1::before {
        content: "⚀";
    }

    .dice.d2::before {
        content: "⚁";
    }

    .dice.d3::before {
        content: "⚂";
    }

    .dice.d4::before {
        content: "⚃";
    }

    .dice.d5::before {
        content: "⚄";
    }

    .dice.d6::before {
        content: "⚅";
    }

.dice-pair .dice:first-child {
    color: var(--accent);
}

.calc-theory .letter-m {
    color: #2e7d32;
    font-weight: bold;
}

.calc-theory .letter-a {
    color: #ef6c00;
    font-weight: bold;
}
