.homepage-calculator--decimals {
    width: 100%;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.homepage-calculator--decimals * {
    box-sizing: border-box;
}

.decimal-form {
    width: 100%;
}

.decimal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.decimal-panel,
.decimal-operation-panel,
.decimal-result,
.decimal-examples {
    min-width: 0;
    border: 1px solid #e9edf3;
    border-radius: 10px;
    background-color: #fff;
}

.decimal-panel,
.decimal-operation-panel {
    padding: 18px;
}

.decimal-panel-title {
    margin-bottom: 14px;
    color: #333;
    font-size: 15px;
    font-weight: 700;
}

.decimal-input-label {
    display: block;
    margin: 0;
}

.decimal-input-label span {
    display: block;
    margin-bottom: 6px;
    color: #777;
    font-size: 12px;
    font-weight: 600;
}

.decimal-input-label input,
.homepage-calculator--decimals .js-dec-input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 14px;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    outline: none;
}

.decimal-input-label input:focus,
.homepage-calculator--decimals .js-dec-input:focus {
    border-color: #9aa7bd;
    box-shadow: 0 0 0 3px rgba(70, 85, 110, 0.08);
}

.decimal-operation-panel--fixed {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.decimal-fixed-operation {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 86px;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    background-color: #f6f8fb;
    color: #333;
}

.decimal-fixed-operation span {
    display: block;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
}

.homepage-calculator--decimals .calculator-key {
    min-height: 46px;
    height: 46px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.homepage-calculator--decimals .calculator-key--equal {
    background-color: #2f3542;
    border-color: #2f3542;
    color: #fff;
}

.homepage-calculator--decimals .calculator-key--equal:hover {
    background-color: #1f2530;
    border-color: #1f2530;
    color: #fff;
}

.homepage-calculator--decimals .calculator-key--function {
    background-color: #f3f5f8;
    border-color: #dfe5ee;
    color: #333;
}

.homepage-calculator--decimals .calculator-key--function:hover {
    background-color: #e8edf4;
    border-color: #cfd7e3;
    color: #222;
}

.homepage-calculator--decimals .calculator-key--danger {
    background-color: #fff;
    border-color: #e0b4b4;
    color: #9f3a38;
}

.homepage-calculator--decimals .calculator-key--danger:hover {
    background-color: #fff4f4;
    border-color: #d69999;
    color: #8a2f2d;
}

.decimal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.decimal-main-button {
    min-width: 210px;
}

.decimal-result {
    margin-top: 18px;
    padding: 18px;
    background-color: #f8fafc;
}

.decimal-result-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.decimal-result-label {
    margin-bottom: 4px;
    color: #333;
    font-size: 16px;
    font-weight: 700;
}

.decimal-result-expression {
    color: #777;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.decimal-result-value {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    margin: 10px 0 16px;
    color: #222;
    font-size: 34px;
    font-weight: 800;
    text-align: center;
    word-break: break-word;
}

.decimal-result-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.decimal-detail {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
    background-color: #fff;
}

.decimal-detail span {
    display: block;
    margin-bottom: 4px;
    color: #777;
    font-size: 12px;
    font-weight: 600;
}

.decimal-detail strong {
    display: block;
    color: #333;
    font-size: 15px;
    word-break: break-word;
}

.decimal-error {
    display: none;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #e0b4b4;
    border-radius: 8px;
    background-color: #fff4f4;
    color: #9f3a38;
    font-size: 14px;
    font-weight: 600;
}

.decimal-error.is-visible {
    display: block;
}

.decimal-examples {
    margin-top: 18px;
    padding: 16px;
}

.decimal-examples-title {
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

.decimal-example-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.decimal-example-button {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #dfe5ee;
    border-radius: 6px;
    background-color: #f6f8fb;
    color: #333;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.decimal-example-button:hover {
    background-color: #e8edf4;
    border-color: #cfd7e3;
    color: #222;
}

@media (max-width: 991px) {
    .homepage-calculator--decimals {
        max-width: 100%;
    }

    .decimal-layout {
        grid-template-columns: 1fr;
    }

    .decimal-operation-panel {
        justify-content: flex-start;
    }

    .decimal-fixed-operation {
        min-height: 64px;
    }
}

@media (max-width: 575px) {
    .decimal-panel,
    .decimal-operation-panel,
    .decimal-result,
    .decimal-examples {
        border-radius: 8px;
    }

    .decimal-panel,
    .decimal-operation-panel {
        padding: 14px;
    }

    .decimal-input-label input,
    .homepage-calculator--decimals .js-dec-input {
        height: 46px;
        font-size: 18px;
    }

    .homepage-calculator--decimals .calculator-key {
        width: 100%;
        min-height: 44px;
        height: 44px;
        font-size: 14px;
    }

    .decimal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .decimal-main-button {
        width: 100%;
        min-width: 0;
    }

    .decimal-result {
        padding: 14px;
    }

    .decimal-result-value {
        min-height: 72px;
        font-size: 30px;
    }

    .decimal-result-details {
        grid-template-columns: 1fr;
    }

    .decimal-example-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .decimal-example-button {
        width: 100%;
    }
}