#window-calculator .window-body {
    padding: 8px !important;
    background-color: var(--win-gray);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    user-select: none; 
    border: 0px solid;
}

.calc-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
}

.calc-display-wrapper {
    background: var(--win-white);
    border-top: 1px solid var(--win-gray-dark);
    border-left: 1px solid var(--win-gray-dark);
    border-right: 1px solid var(--win-white);
    border-bottom: 1px solid var(--win-white);
    box-shadow: inset -1px -1px 0 var(--win-gray-light), inset 1px 1px 0 var(--win-black);
    padding: 2px;
}

.calc-display {
    height: 25px;
    font-family: var(--system-font);
    font-size: 16px;
    text-align: right;
    color: var(--win-black);
    overflow: hidden;
    white-space: nowrap;
    padding-right: 2px;
}

.calc-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2px;
}

.calc-mem-status-box {
    width: 36px;
    height: 24px;
    background-color: var(--win-gray);
    border-top: 1px solid var(--win-gray-dark);
    border-left: 1px solid var(--win-gray-dark);
    border-right: 1px solid var(--win-white);
    border-bottom: 1px solid var(--win-white);
    box-shadow: inset -1px -1px 0 var(--win-gray-light), inset 1px 1px 0 var(--win-black);
    display: flex;
    align-items: center;
    justify-content: center;
}

#calc-mem-indicator {
    font-family: var(--system-font);
    font-size: 14px;
    font-weight: bold;
    color: var(--win-black);
}

.calc-top-row {
    display: flex;
    gap: 4px;
}

.calc-top-row button {
    width: 60px;
}

.calc-main-grid {
    display: grid;
    grid-template-columns: 36px 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: repeat(4, 1fr);
    gap: 4px;
    flex: 1;
    column-gap: 8px; 
}

.calc-btn {
    width: 100%;
    height: 26px;
    min-width: auto;
    font-family: var(--system-font);
    font-size: 11px;
    font-weight: bold;
    padding: 0;
    margin: 0;
    
    background-color: var(--win-gray);
    border-top: 1px solid var(--win-white);
    border-left: 1px solid var(--win-white);
    border-right: 1px solid var(--win-black);
    border-bottom: 1px solid var(--win-black);
    box-shadow: inset -1px -1px 0 var(--border-dark), inset 1px 1px 0 var(--win-gray-light);
    outline: none;
    cursor: default;
}

.calc-btn:active {
    border-top: 1px solid var(--win-black);
    border-left: 1px solid var(--win-black);
    border-right: 1px solid var(--win-white);
    border-bottom: 1px solid var(--win-white);
    box-shadow: none;
}

.btn-blue { color: #0000ff; }
.btn-red { color: #ff0000; }

.calc-main-grid button:nth-child(6n+1) {
    color: #ff0000;
    margin-right: 4px; 
}