/* 계산기 아이콘 */
#calc-icon {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(110px);
    width: 50px;
    height: 40px;
    font-size: 25px;
    background: none !important;
    border: none !important;
    cursor: pointer;
    z-index: 999;
    transition: transform 0.3s ease, filter 0.2s ease;
}
#calc-icon:hover {
    background-color: none !important;
    transform: translateX(130px) rotate(7deg) scale(1.8);
}
@media (max-width: 768px) {
    #calc-popup {
        transform: translate(-50%, -50%) scale(1.4) !important;
        padding: 12px !important;
    }
    #calc-popup .calc-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 4px !important;
    }
    #calc-popup .calc-grid button {
        width: 100% !important;
        height: 38px !important;
        padding: 0 !important;
        font-size: 16px !important;
    }
    #calc-popup .calc-tab-btn {
        padding: 6px 8px !important;
        font-size: 12px !important;
    }
    #calc-popup .calc-display {
        padding: 8px !important;
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    #calc-popup .calc-close {
        padding: 8px !important;
        margin-top: 8px !important;
    }
}
#calc-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent !important;
    z-index: 9998;
    pointer-events: none;
}
#calc-popup {
    all: initial;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: white !important;
    border: 1px solid #eeeeee !important;
    padding: 20px;
    border-radius: 10px;
    z-index: 9999;
    zoom: 0.8;
    pointer-events: auto;
    touch-action: manipulation; /*폰화면 더블클릭 확대방지 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05),
                0 4px 15px rgba(0,0,0,0.1),
                0 2px 8px rgba(0,0,0,0.05);
    color: #000000 !important;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}
#calc-popup .calc-display::placeholder {
    color: #cccccc !important;
}
#calc-popup #calc-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    cursor: grab;
    user-select: none;
    color: #000000 !important;
}
#calc-popup #calc-header:active {
    cursor: grabbing;
}
#calc-popup .calc-tab-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}
#calc-popup .calc-tab-btn {
    all: unset;
    padding: 12px 15px;
    border: none !important;
    background: #ddd !important;
    color: #000000 !important;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    font-size: 16px;
    text-align: center;
    box-sizing: border-box;
}
#calc-popup .calc-tab-btn.calc-active {
    background: #007bff !important;
    color: white !important;
}
#calc-popup .calc-tab-content {
    display: none;
}
#calc-popup .calc-tab-content.calc-active {
    display: block;
}
#calc-popup .calc-display {
    width: 100%;
    padding: 20px;
    font-size: 28px;
    text-align: right;
    border: 2px solid #ddd !important;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f8f9fa !important;
    color: #000000 !important;
    box-sizing: border-box;
}
#calc-popup .calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
#calc-popup .calc-grid button {
    all: unset;
    padding: 20px;
    font-size: 25px !important;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}
#calc-popup .calc-num { background: #adb5bd !important; color: #000000 !important; }
#calc-popup .calc-num:hover { background: #dee2e6 !important; }
#calc-popup .calc-op { background: #007bff !important; color: white !important; }
#calc-popup .calc-op:hover { background: #0056b3 !important; }
#calc-popup .calc-clear { background: #dc3545 !important; color: white !important; }
#calc-popup .calc-clear:hover { background: #c82333 !important; }
#calc-popup .calc-equals { background: #28a745 !important; color: white !important; }
#calc-popup .calc-equals:hover { background: #218838 !important; }
#calc-popup .calc-close {
    all: unset;
    display: block;
    background: #6c757d !important;
    color: white !important;
    margin-top: 15px;
    width: 100%;
    padding: 15px;
    font-size: 16px !important;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
}
#calc-popup .calc-close:hover {
    background: #5a6268 !important;
}