.occ-calculator {
    width: 100%;
    max-width: 760px;
    margin: 24px auto;
    box-sizing: border-box;
    font-family: inherit;
}

.occ-calculator * {
    box-sizing: border-box;
}

.occ-card {
    background: #ffffff;
    border: 1px solid #e7eaf0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 22px;
}

.occ-header h2 {
    margin: 0 0 8px;
    font-size: clamp(22px, 4vw, 32px);
    line-height: 1.2;
    color: #111827;
}

.occ-header p {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
}

.occ-label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1f2937;
}

.occ-input-row {
    display: grid;
    grid-template-columns: 1fr 58px;
    gap: 10px;
    margin-bottom: 14px;
}

.occ-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 15px 14px;
    font-size: 20px;
    line-height: 1.2;
    color: #111827;
    background: #f9fafb;
    min-height: 56px;
}

.occ-input:focus {
    outline: 3px solid rgba(37, 99, 235, 0.16);
    border-color: #2563eb;
    background: #ffffff;
}

.occ-clear,
.occ-keypad button,
.occ-actions button {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.08s ease;
    -webkit-tap-highlight-color: transparent;
}

.occ-clear:active,
.occ-keypad button:active,
.occ-actions button:active {
    transform: scale(0.98);
}

.occ-clear {
    background: #fee2e2;
    color: #991b1b;
    font-size: 18px;
}

.occ-keypad {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 16px;
}

.occ-keypad button {
    min-height: 52px;
    padding: 12px 8px;
    background: #f3f4f6;
    color: #111827;
    font-size: 20px;
}

.occ-keypad button:hover,
.occ-actions button:hover,
.occ-clear:hover {
    opacity: 0.92;
}

.occ-keypad .occ-operator {
    background: #dbeafe;
    color: #1d4ed8;
}

.occ-keypad .occ-secondary {
    background: #eef2ff;
    color: #3730a3;
}

.occ-actions {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 10px;
}

.occ-calc {
    min-height: 54px;
    background: #2563eb;
    color: #ffffff;
    font-size: 18px;
}

.occ-example {
    min-height: 54px;
    background: #e5e7eb;
    color: #111827;
    font-size: 15px;
}

.occ-message {
    margin-top: 12px;
    color: #b91c1c;
    font-weight: 600;
    min-height: 22px;
}

.occ-results {
    margin-top: 18px;
}

.occ-result-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.occ-result-box span {
    color: #166534;
    font-weight: 700;
}

.occ-result-value {
    color: #14532d;
    font-size: clamp(24px, 5vw, 36px);
    overflow-wrap: anywhere;
    text-align: right;
}

.occ-steps-box {
    margin-top: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
}

.occ-steps-box h3 {
    margin: 0 0 12px;
    font-size: 20px;
    color: #111827;
}

.occ-steps {
    margin: 0;
    padding-left: 22px;
}

.occ-steps li {
    margin: 0 0 10px;
    color: #374151;
    line-height: 1.55;
}

.occ-steps code {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2px 6px;
    font-size: 0.95em;
    color: #111827;
}

@media (max-width: 520px) {
    .occ-card {
        padding: 16px;
        border-radius: 16px;
    }

    .occ-input-row {
        grid-template-columns: 1fr 52px;
    }

    .occ-keypad {
        gap: 8px;
    }

    .occ-keypad button {
        min-height: 48px;
        font-size: 18px;
        border-radius: 12px;
    }

    .occ-actions {
        grid-template-columns: 1fr;
    }

    .occ-result-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .occ-result-value {
        text-align: left;
    }
}
