.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

fieldset {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    margin: 0;
}

.calc-btn {
    align-self: center;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.calc-btn:hover {
    background-color: #0056b3;
}

.output-area {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.output-area h2 {
    margin-top: 0;
}

.result-row {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.highlight {
    background-color: #ffe066;
    padding: 0 4px;
    border-radius: 3px;
    font-weight: bold;
    color: #333;
}

input[type="number"] {
    width: 16ch;
    padding: 4px;
    box-sizing: content-box;
}

.history-area {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.history-toggle {
    margin: 0;
    cursor: pointer;
    user-select: none;
    font-size: 1.2rem;
}

#history-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-weight: bold;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.history-table th, .history-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
}

.history-table th {
    background-color: #e9e9e9;
}