/* ── CONTEXT MENU ──────────────────────────────────────────── */
.ctx-menu{
  position:fixed;
  z-index:940;
  display:none;
  min-width:248px;
  max-width:320px;
  pointer-events:auto;
}
.ctx-menu.open{display:block}
.ctx-menu-card{
  border-radius:14px;
  border:1px solid var(--panel-border);
  background:color-mix(in srgb,var(--panel-bg) 94%, transparent);
  box-shadow:var(--panel-shadow),0 4px 14px rgba(0,0,0,.24);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  padding:6px;
  max-height:min(80vh,560px);
  overflow-y:auto;
  animation:ctxMenuIn .12s ease-out;
}
@keyframes ctxMenuIn{
  from{opacity:0;transform:translateY(-4px) scale(.985)}
  to{opacity:1;transform:none}
}
.ctx-menu-title{
  padding:9px 12px 6px;
  font-size:10.5px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.65px;
  color:var(--t3);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ctx-menu-list{
  display:flex;
  flex-direction:column;
  gap:1px;
}
.ctx-menu-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 11px;
  background:transparent;
  border:0;
  border-radius:9px;
  cursor:pointer;
  text-align:left;
  font:inherit;
  color:var(--t1);
  transition:background .09s ease,color .09s ease;
  min-height:34px;
  width:100%;
}
.ctx-menu-item:hover,
.ctx-menu-item.ctx-menu-focus{
  background:color-mix(in srgb,var(--acc) 12%, transparent);
  color:var(--t1);
}
.ctx-menu-item:disabled,
.ctx-menu-item.disabled{
  color:color-mix(in srgb,var(--t2) 74%, transparent);
  cursor:default;
}
.ctx-menu-item:disabled:hover,
.ctx-menu-item.disabled:hover{
  background:transparent;
  color:color-mix(in srgb,var(--t2) 74%, transparent);
}
.ctx-menu-item.danger{color:#e65b5b}
.ctx-menu-item.danger:hover,
.ctx-menu-item.danger.ctx-menu-focus{
  background:rgba(228,58,58,.14);
  color:#ff7575;
}
.ctx-menu-icon{
  display:inline-flex;
  width:16px;
  height:16px;
  flex:0 0 16px;
  align-items:center;
  justify-content:center;
  color:var(--t2);
}
.ctx-menu-icon svg{width:14px;height:14px}
.ctx-menu-item.danger .ctx-menu-icon{color:inherit}
.ctx-menu-text{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  min-width:0;
}
.ctx-menu-label{
  font-size:13px;
  font-weight:500;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ctx-menu-sub{
  font-size:11px;
  color:var(--t3);
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:2px;
}
.ctx-menu-hint{
  font-size:10.5px;
  color:var(--t3);
  flex:0 0 auto;
  margin-left:6px;
}
.ctx-menu-sep{
  height:1px;
  margin:4px 6px;
  background:var(--sep);
}
.ctx-menu-status-row{
  display:flex;
  gap:4px;
  padding:6px 6px 4px;
}
.ctx-menu-status{
  flex:1 1 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:30px;
  border-radius:8px;
  background:color-mix(in srgb,var(--t1) 4%, transparent);
  border:1px solid color-mix(in srgb,var(--t1) 8%, transparent);
  cursor:pointer;
  transition:background .1s ease,border-color .1s ease,transform .08s ease;
  padding:0;
}
.ctx-menu-status:hover,
.ctx-menu-status.ctx-menu-focus{
  background:color-mix(in srgb,var(--acc) 12%, transparent);
  transform:none;
}
.ctx-menu-status.active{
  background:color-mix(in srgb,var(--acc) 16%, transparent);
  border-color:color-mix(in srgb,var(--acc) 36%, transparent);
}
.ctx-menu-status-checked.active{
  background:rgba(77,184,112,.16);
  border-color:rgba(77,184,112,.34);
}
.ctx-status-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
}
.ctx-status-mark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--t2);
}
.ctx-status-check svg{
  width:13px;
  height:13px;
  display:block;
}
.ctx-menu-status-checked.active .ctx-status-mark{
  color:#bfe6c9;
}

@media (max-width:480px){
  .ctx-menu{
    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:16px!important;
    transform:translateX(-50%);
    width:calc(100vw - 32px);
    max-width:360px;
    min-width:0;
  }
  .ctx-menu-card{max-height:70vh}
}

/* ── INSTANT HOVER FEEDBACK ───────────────────── */
.ctx-menu-item,
.ctx-menu-status{
  transition:none;
}
