.materials-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    margin: 20px auto;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
    max-width: 640px;
}

.materials-block h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-align: center;
    color: #0f172a;
}

.calculator {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.calculator label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.calculator input,
.calculator select {
    padding: 10px 14px;
    font-size: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.calculator input:focus,
.calculator select:focus {
    outline: none;
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.calculator button {
    padding: 11px 18px;
    font-size: 1rem;
    font-weight: 600;
    background-color: #0f766e;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.15s ease;
}

.calculator button:hover {
    background-color: #0d5e58;
}

.result {
    margin-top: 18px;
    font-size: 1rem;
    color: #0f172a;
}

#example_count {
    appearance: none;
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    outline: none;
}

#example_count::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: #0f766e;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.35);
}

#result { padding-bottom: 20px; }
#keys { display: none; }

.stolbik {
    width: 24px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 5px;
    margin: 3px;
}

.otv { width: 24px; margin: 3px; }

@media (max-width: 999px) { #keys { display: block; } }

.stolbik-otv { margin: 8px 3px; text-align: center; }
.otv-answer {
    width: 210px;
    max-width: 70vw;
    padding: 6px 12px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid #0f766e;
    border-radius: 10px;
}
.otv-answer:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}
