/* ✅ 모바일 환경 (768px 이하) 최적화 설정 */
@media (max-width: 768px) {
    #cmt_bottom_bar {
        display: none;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 46px; 
        background: #ffffff;
        /* 경계선을 조금 더 미세하게 조정 */
        border-top: 1px solid rgba(0, 0, 0, 0.05); 
        z-index: 1003;
        align-items: stretch;
        justify-content: space-around;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    #cmt_bottom_bar.visible { display: flex !important; }

    .nav-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        outline: none;
        -webkit-tap-highlight-color: transparent;
        /* 클릭 시 반응 속도 조절 */
        transition: transform 0.1s ease; 
    }

    .nav-btn-icon {
        font-size: 18px; /* 46px 높이에 최적화된 크기 */
        color: #adb5bd; /* 은은하고 세련된 회색 */
        transition: color 0.2s;
    }

    .nav-btn-label {
        font-size: 11px;
        font-weight: 500;
        color: #adb5bd;
        margin-top: 2px;
        white-space: nowrap;
    }

    /* 활성 상태: 너무 튀지 않으면서 명확한 변화 */
    .nav-btn.active .nav-btn-icon {
        color: #0894b8;
    }
    .nav-btn.active .nav-btn-label {
        color: #0894b8;
        font-weight: 600;
    }

    /* 클릭 시 아주 미세하게 눌리는 느낌 추가 */
    .nav-btn:active {
        transform: scale(0.95);
    }

    /* 다크모드: 대비를 낮춰 눈의 피로도 감소 */
    .darkmode #cmt_bottom_bar {
        background: #222;
        border-top-color: #252525;
    }
    .darkmode .nav-btn-icon,
    .darkmode .nav-btn-label {
        color: #6b7280;
    }
    .darkmode .nav-btn.active .nav-btn-icon,
    .darkmode .nav-btn.active .nav-btn-label {
        color: #4db8d8;
    }

    /* 하단 여백 강제 고정 (영상 밀림 방지) */
    #comment .cmt_write,
    #comment .cmt_paging:last-child,
    #comment > *:last-child {
        margin-bottom: calc(46px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* PC 숨김 */
.mobile-only {
    display: none !important;
}