/* 트리거 버튼 */
.ctx-trigger{
    appearance:none; background:none; border:0; padding:4px;
    border-radius:4px; cursor:pointer; line-height:0;
    font-weight: 600; font-size:11pt;
}
.ctx-trigger:hover, .ctx-trigger:focus{ background: rgba(0,0,0,.06); }

/* 메뉴 기본 스타일 (표시는 JS가 제어) */
.ctx-menu{
    position:absolute;            /* JS가 body로 옮긴 뒤 absolute 유지 */
    display:none;                 /* 기본 숨김 */
    min-width:160px;
    padding:6px 0;
    background:#fff;
    border:1px solid #e5e5e5;
    border-radius:8px;
    box-shadow:0 12px 28px rgba(0,0,0,.40);
    max-height: 320px;        /* 기본값 (fallback) */
    max-height: 80vh;         /* 뷰포트 기준 (fallback) */
    max-height: min(80vh, 400px); /* 최신 브라우저용 */
    overflow:auto;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE, Edge 구버전 */
}

/* 열린 상태(보여줌) — JS가 display:block/visibility도 설정 */
.ctx-menu.is-open{ display:block; }

.ctx-item{
    display:block; width:100%;
    padding:9px 12px; text-align:left;
    background:none; border:0;
    font:500 11pt/1.4 "Pretendard", sans-serif;
    color:#111; cursor:pointer;
}
.ctx-item:hover { background: #b7d6ed; }
.ctx-item:focus {
    outline: 2px solid rgba(0,0,0,.2);
    outline-offset: -2px;   /* 보기 좋게 */
    background: transparent; /* 포커스는 배경색 X */
}.ctx-item.is-danger{ color:#cd0000; }
.ctx-item:disabled {
    color: #aaa;
    cursor: not-allowed;
    background: none;
    opacity: 0.6;
}

.ctx-sep{ height:1px; margin:6px 0; background:#eee; }