#chatDiv {
    position: fixed;
    z-index: 10000;
    height: 80vh;
    min-height: 500px;
    bottom: 0;
    right: 0;
    /* resize: both; */
    width: 450px;
    margin: 10px;
    border-radius: 0.75rem;
}

#chat {
    height: 100%;
    width: 100%;
    border: none;
    border-radius: 0.75rem;
}

/* 操作アイコン（最大化・縮小・閉じる）を丸いボタンにしてわかりやすくする */
.dynaai-ctrl {
    position: absolute;
    top: 8px;
    z-index: 2;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-size: 18px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

#maxmizeicon,
#minimizeicon {
    right: 50px;
}

#closeicon {
    right: 10px;
}

/* 閉じるボタンは赤系にして他と区別し、見つけやすくする */
.dynaai-close {
    background: #e53935;
}

.dynaai-close:hover {
    background: #c62828;
}

/* スマホ向け表示：画面を覆い隠さないようにする */
@media screen and (max-width: 480px) {
    #chatDiv {
        width: auto;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 8px;
        height: 70vh;
        min-height: 0;
        max-height: calc(100% - 16px);
    }

    /* スマホでは最大化ボタンは不要なので隠す */
    #maxmizeicon,
    #minimizeicon {
        display: none !important;
    }

    /* 閉じるボタンをさらに大きくしてタップしやすくする */
    .dynaai-ctrl {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 20px;
    }
}
